1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Bind over parseWithDecorator

This commit is contained in:
Rick Winfrey 2017-03-29 16:33:08 -07:00
parent 7e2d5354e9
commit 83e0600b65

View File

@ -84,10 +84,7 @@ buildProgramNodes
-> [SourceBlob]
-> IO [b]
buildProgramNodes programNodeConstructor algebra termDecorator sourceBlobs =
for sourceBlobs
(\sourceBlob@SourceBlob{..} -> do
terms <- parseWithDecorator (termDecorator source) path sourceBlob
pure $ programNodeConstructor path (para algebra terms))
for sourceBlobs (\sourceBlob@SourceBlob{..} -> pure . programNodeConstructor path . para algebra =<< parseWithDecorator (termDecorator source) path sourceBlob)
sourceBlobsFromPaths :: [FilePath] -> IO [SourceBlob]
sourceBlobsFromPaths filePaths =