Correctly identify source files in ~/.lib (David McLean)

This commit is contained in:
Adam Vogt
2012-04-30 15:42:22 +00:00
parent 108c2280ef
commit 6c51745122

View File

@@ -477,7 +477,7 @@ recompile force = io $ do
return (status == ExitSuccess)
else return True
where getModTime f = catch (Just <$> getModificationTime f) (\(SomeException _) -> return Nothing)
isSource = flip elem [".hs",".lhs",".hsc"]
isSource = flip elem [".hs",".lhs",".hsc"] . takeExtension
allFiles t = do
let prep = map (t</>) . Prelude.filter (`notElem` [".",".."])
cs <- prep <$> catch (getDirectoryContents t) (\(SomeException _) -> return [])