/live-source

rerun app every time source changes

Primary LanguageHaskellGNU General Public License v3.0GPL-3.0

live-source

basic use:

  1. create client haskell script without a module name
  2. give the script a function named liveMain

eg :

 -- file test.hs
 liveMain = print 2
  1. open ghci
Prelude> import LiveSource
Prelude LiveSource> repeatOnModification "test.hs"
2
  1. edit file test.hs and save it

eg :

 -- file test.hs
 
liveMain = print (take 10 [1..])

Ghc should now run the IO.

Prelude> import LiveSource
Prelude LiveSource> repeatOnModification "test.hs"
2
[1,2,3,4,5,6,7,8,9,10]

For more advanced usage see examples