1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Allow pragmas within gadt constructors

This commit is contained in:
Rick Winfrey 2018-06-06 16:58:54 -07:00
parent a7795bca03
commit fc7c578b9b
7 changed files with 145 additions and 5 deletions

View File

@ -191,7 +191,7 @@ gadtConstructor = makeTerm
<$> (context' <|> emptyTerm)
<*> typeConstructor
<* token Annotation
<*> type')
<*> term type')
gadtDeclaration :: Assignment
gadtDeclaration = makeTerm

View File

@ -10,3 +10,6 @@ data Number a where
Integer :: !Prelude.Integer -> Number Prelude.Integer
Ratio :: !Prelude.Rational -> Number Prelude.Rational
Decimal :: !Scientific -> Number Scientific
data Union r v where
Union :: {-# UNPACK #-} !Int -> t v -> Union r v

View File

@ -10,3 +10,6 @@ data Number' a where
Integer' :: !Prelude.Integer -> Number Prelude.Integer
Ratio' :: !Prelude.Rational -> Number Prelude.Rational
Decimal' :: !Scientific -> Number Scientific
data Union r v where
Union :: {-# UNPACK #-} !Integer -> t v -> Union r v

View File

@ -161,4 +161,38 @@
(Identifier)
(TypeParameters
(Identifier))
(Empty))))))))
(Empty))))))
(GADT
(Empty)
(Type
(Identifier)
(Statements
(Identifier)
(Identifier))
(Empty))
(Statements
(GADTConstructor
(Empty)
(Identifier)
(Context
(Pragma)
(FunctionType
(Type
(StrictType
{ (Identifier)
->(Identifier) }
(TypeParameters))
(TypeParameters)
(Empty))
(FunctionType
(Type
(Identifier)
(TypeParameters
(Identifier))
(Empty))
(Type
(Identifier)
(TypeParameters
(Identifier)
(Identifier))
(Empty))))))))))

View File

@ -161,4 +161,38 @@
(Identifier)
(TypeParameters
(Identifier))
(Empty))))))))
(Empty))))))
(GADT
(Empty)
(Type
(Identifier)
(Statements
(Identifier)
(Identifier))
(Empty))
(Statements
(GADTConstructor
(Empty)
(Identifier)
(Context
(Pragma)
(FunctionType
(Type
(StrictType
{ (Identifier)
->(Identifier) }
(TypeParameters))
(TypeParameters)
(Empty))
(FunctionType
(Type
(Identifier)
(TypeParameters
(Identifier))
(Empty))
(Type
(Identifier)
(TypeParameters
(Identifier)
(Identifier))
(Empty))))))))))

View File

@ -149,4 +149,37 @@
(Identifier)
(TypeParameters
(Identifier))
(Empty))))))))
(Empty))))))
(GADT
(Empty)
(Type
(Identifier)
(Statements
(Identifier)
(Identifier))
(Empty))
(Statements
(GADTConstructor
(Empty)
(Identifier)
(Context
(Pragma)
(FunctionType
(Type
(StrictType
(Identifier)
(TypeParameters))
(TypeParameters)
(Empty))
(FunctionType
(Type
(Identifier)
(TypeParameters
(Identifier))
(Empty))
(Type
(Identifier)
(TypeParameters
(Identifier)
(Identifier))
(Empty))))))))))

View File

@ -150,4 +150,37 @@
(Identifier)
(TypeParameters
(Identifier))
(Empty))))))))
(Empty))))))
(GADT
(Empty)
(Type
(Identifier)
(Statements
(Identifier)
(Identifier))
(Empty))
(Statements
(GADTConstructor
(Empty)
(Identifier)
(Context
(Pragma)
(FunctionType
(Type
(StrictType
(Identifier)
(TypeParameters))
(TypeParameters)
(Empty))
(FunctionType
(Type
(Identifier)
(TypeParameters
(Identifier))
(Empty))
(Type
(Identifier)
(TypeParameters
(Identifier)
(Identifier))
(Empty))))))))))