Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to iterate in snap framework without cabal install

I love the snap framework but I hate running 'cabal install' with each iteration (minor code change) I want to try out.

Is there an alternative for rapid iteration?

like image 914
Brad Clawsie Avatar asked Dec 21 '22 00:12

Brad Clawsie


1 Answers

Start with

cabal install --reinstall -fhint snap

Then, for your project:

cabal clean
cabal configure -fdevelopment
cabal build
./dist/build/projname/projname

You shouldn't ever use cabal install for binaries that you don't want to be able to execute from arbitrary locations, anyway. You should be using cabal build for things you only want to run locally.

You will need to run cabal build and start the program again when you change Main.hs or your project's .cabal file.

If you have any further questions, comment - I'm the guy who implemented this functionality for Snap.

like image 91
Carl Avatar answered Jan 28 '23 21:01

Carl