Use this file to work with hugs98 in a virtual machine. With this method you can run hugs98 on Windows or on Mac OS X without problems.
Prerequisite: You have to install Vagrant on your machine. Vagrant uses a software that can run virtual machines. Usually vagrant comes bundled with Virtual Box, which can be used without charge. If you use Parallels or VmWare on a mac, please be aware that you must use an edition that works with Vagrant. Usually this means an additional fee (for Parallels you need the "Pro" version, for VMWare you need a separate Vagrant provider).
- Clone the reository
git clone https://github.com/geggo98/vagrant-hugs98.git
- Go to the project directory
cd vagrant-hugs98
- Start vagrant
vagrant up
- Wait until vagrant has done its job (fetch some coffee, this might take a while)
- Connect with the virtual machine
vagrant ssh
- Go to the directory "/vagrant" inside the VM
cd /vagrant
- Run hugs with one of the demo files
hugs helloworld.hs
orhugs greetings.hs
. Inside hugs, startthe program withmain
, edit it with:edit
(quit vim with:q!
), reload with:relaod
and quit hugs98 with:quit
When you edit a file on your machine and put it in the project directory ("vagrant-hugs98"), vagrant will sync it automatically with the "/vagrant" directory inside the VM. So you can use your favorite editor and don't have to use vim inside the VM.