As an example, this invocation appears not to re-build things when any of the matched files changes:
"target" %> \out -> do
getDirectoryFiles "" ["src//*.hs"]
... build target ...
But this works:
"target" %> \out -> do
need =<< getDirectoryFiles "" ["src//*.hs"]
... build target ...
What, then, does the documentation mean when it says this?
"The result is tracked as a dependency, and if it changes the rule will rerun in subsequent builds."
Thanks!
"getDirectoryContents" tracks the list of files itself (so if a new file appears or is deleted, the associated rule will fire), but does not care whether individual files in the list are modified.