Skip to content

xpika/live-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

rerun app every time source changes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published