1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 21:01:35 +03:00

Reformat termConstructor’s signature for haddock.

This commit is contained in:
Rob Rix 2016-08-16 11:40:56 -04:00
parent 1312e384b4
commit 25e6fc6ea2

View File

@ -24,7 +24,12 @@ isOperator = flip Set.member (Set.fromList [ Operator, BinaryOperator ])
-- | Construct a term given source, the span covered, the annotation for the term, and its children.
--
-- This is typically called during parsing, building terms up leaf-to-root.
termConstructor :: forall fields. (Show (Record fields), HasField fields Category, HasField fields Range) => Source Char -> IO SourceSpan -> Record fields -> [Term Text (Record fields)] -> IO (Term Text (Record fields))
termConstructor :: forall fields. (Show (Record fields), HasField fields Category, HasField fields Range)
=> Source Char
-> IO SourceSpan
-> Record fields
-> [Term Text (Record fields)]
-> IO (Term Text (Record fields))
termConstructor source sourceSpan info = fmap cofree . construct
where
withDefaultInfo syntax = pure (info :< syntax)