1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Placate -Werror.

This commit is contained in:
Rob Rix 2016-09-13 10:41:36 -04:00
parent b4e6e1dbb8
commit 161d98521e

View File

@ -69,11 +69,11 @@ diffFiles parser renderer sourceBlobs = do
cmarkParser :: Parser (Syntax Text) (Record '[Range, Category])
cmarkParser blob = pure $ toTerm $ commonmarkToNode [ optSourcePos, optSafe ] (toText (source blob))
where toTerm :: Node -> Cofree (Syntax Text) (Record '[Range, Category])
toTerm (Node position t children) = cofree $ (Range 0 0 .: toCategory t .: RNil) :< case t of
toTerm (Node _ t children) = cofree $ (Range 0 0 .: toCategory t .: RNil) :< case t of
-- Leaves
CODE text -> Leaf text
TEXT text -> Leaf text
CODE_BLOCK language text -> Leaf text
CODE_BLOCK _ text -> Leaf text
-- Branches
_ -> Indexed (toTerm <$> children)
-- Node (Maybe PosInfo) NodeType [Node]