twitch-0.1.2.0: A high level file watcher DSL
Twitch is monadic DSL and library for file watching. It conveniently utilizes 'do' notation in the style of Shake and clay to expose the functionality of the fsnotify cross-platform file system watcher.
Here is an example that converts Markdown files to Html and reloads Safari whenever the input files change.
-# LANGUAGE OverloadedStrings #- import Twitch import Filesystem.Path.CurrentOS main = defaultMain $ do "*.md" |> \filePath -> system $ "pandoc -t html " ++ encodeString filePath "*.html" |> \_ -> system $ "osascript refreshSafari.AppleScript"
Modules