attoparsec 0.10 fix
This commit is contained in:
parent
09d41c8e36
commit
ae4a3dbe9c
@ -10,7 +10,7 @@ module Build
|
|||||||
-- FIXME there's a bug when getFileStatus applies to a file
|
-- FIXME there's a bug when getFileStatus applies to a file
|
||||||
-- temporary deleted (e.g., Vim saving a file)
|
-- temporary deleted (e.g., Vim saving a file)
|
||||||
|
|
||||||
import Control.Applicative ((<|>))
|
import Control.Applicative ((<|>), many)
|
||||||
import Control.Exception (SomeException, try)
|
import Control.Exception (SomeException, try)
|
||||||
import Control.Monad (when, filterM, forM, forM_)
|
import Control.Monad (when, filterM, forM, forM_)
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ data TempType = Hamlet | Verbatim | Messages FilePath | StaticFiles FilePath
|
|||||||
determineHamletDeps :: FilePath -> IO [FilePath]
|
determineHamletDeps :: FilePath -> IO [FilePath]
|
||||||
determineHamletDeps x = do
|
determineHamletDeps x = do
|
||||||
y <- TIO.readFile x -- FIXME catch IO exceptions
|
y <- TIO.readFile x -- FIXME catch IO exceptions
|
||||||
let z = A.parse (A.many $ (parser <|> (A.anyChar >> return Nothing))) y
|
let z = A.parse (many $ (parser <|> (A.anyChar >> return Nothing))) y
|
||||||
case z of
|
case z of
|
||||||
A.Fail{} -> return []
|
A.Fail{} -> return []
|
||||||
A.Done _ r -> mapM go r >>= filterM doesFileExist . concat
|
A.Done _ r -> mapM go r >>= filterM doesFileExist . concat
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user