Created
April 4, 2013 00:33
-
-
Save cbarrett/5306724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addDependentTree :: FilePath -> Bool -> Q () | |
addDependentTree p inclFile = do | |
pwd <- runIO getCurrentDirectory | |
let p' = if not inclFile then dropFileName p else p | |
let paths = scanl (</>) pwd (splitDirectories p') | |
mapM_ addDependentFile paths -- We add every subdirectory along `p` in the hopes of catching any new files added therein |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment