Skip to content

Latest commit

 

History

History
executable file
·
44 lines (30 loc) · 600 Bytes

README.md

File metadata and controls

executable file
·
44 lines (30 loc) · 600 Bytes

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