1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

Swap return for pure

This commit is contained in:
Rick Winfrey 2017-03-30 10:52:24 -07:00
parent 278a459389
commit d18c2375cf

View File

@ -61,7 +61,7 @@ instance ToJSON ParseNode where
-- | Parses file contents into an SExpression format for the provided arguments. -- | Parses file contents into an SExpression format for the provided arguments.
parseSExpression :: Arguments -> IO ByteString parseSExpression :: Arguments -> IO ByteString
parseSExpression = parseSExpression =
return . printTerms TreeOnly <=< parse <=< sourceBlobsFromArgs pure . printTerms TreeOnly <=< parse <=< sourceBlobsFromArgs
where parse = traverse (\sourceBlob@SourceBlob{..} -> parserForType (toS (takeExtension path)) sourceBlob) where parse = traverse (\sourceBlob@SourceBlob{..} -> parserForType (toS (takeExtension path)) sourceBlob)
-- | Constructs IndexFile nodes for the provided arguments and encodes them to JSON. -- | Constructs IndexFile nodes for the provided arguments and encodes them to JSON.