@@ 113,7 113,13 @@
vsInitial <- liftIO $ B.readFile vsFileAbs
fsInitial <- liftIO $ B.readFile fsFileAbs
- -- Watch the dir for changes to the files we're interested in
+ -- Watch the dir for changes to the files we're interested in. In
+ -- this demo program, we only care about one of the constructors of
+ -- a 'FS.Event'. This means we can get away with
+ -- 'mapMaybe'.
+ -- Exercise: Learn how to use 'fan' to efficiently split an 'Event t
+ -- FS.Event' into four different 'Event's.
onlyModifications (FS.Modified path mtime isDir) = Just (path, mtime, isDir)
onlyModifications _ = Nothing