Skip to content

Instantly share code, notes, and snippets.

@louissalin
Created August 19, 2014 15:05
Show Gist options
  • Save louissalin/54a9df3c9b252d2d9591 to your computer and use it in GitHub Desktop.
Save louissalin/54a9df3c9b252d2d9591 to your computer and use it in GitHub Desktop.
$ sudo gem install guard
$ sudo gem install guard-shell
links:
- https://github.com/guard/guard
- https://github.com/guard/guard-shell
Create a file named "Guardfile" in the root of the project and put the following lines in it:
guard :shell do
watch(/lib\/.*\.hs/) { |m| `cabal build | grep -v -e "Loading package"` }
end
Run the following line to start guard:
$ guard
This will read the Guardfile and start watching the .hs files in lib and sub directories and run the cabal build command whenever such a file changes. It will also filter out lines that match "Loading package", since they take up a lot of space.
To exit, type "quit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment