diagrams/diagrams-lib — pull request #213 by bergey (2014-09-07 22:47:36+00:00)
Title: add semi-portable looping using fsnotify

generic defaultLoopRender for use in Backends

See matching branches of `-cairo` and `-rasterific`.

This seems to work well on Linux. It works some of the time on Windows; other times `fsnotify` seems to not register a change, or the program compiles and runs an older copy of the source file. Please don't merge until I have spent more time debugging that.

I'd appreciate if someone could test this on a Mac. The `-rasterific` branch should be fine. My test program is:
``` haskell
import Diagrams.Prelude
import Diagrams.Backend.Rasterific.CmdLine

dia :: Animation B R2
dia = c <$> ui where
c t = circle 1 # fc (blend t white green) # pad 1.01

main :: IO ()
main = mainWith dia
```
- compile test program
- run as ./Animation -w 400 --fpu 5 -o animTest.png -l
- edit source file at least twice to trigger recompilation
(there were some earlier bugs where it would recompile after the first edit, but not again)