unionmount is a Haskell library that wraps fsnotify
to provide a Dynamic-friendly API to listen on filesystem changes and update an in-memory Model type. The library interface is such that you can “mount” multiple directories (union'ing them in the process), and have it update the model when files on any of those directories change.
Emanote uses it to monitor Markdown files (and other files) in its layers.