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:
parent
a7795bca03
commit
fc7c578b9b
@ -191,7 +191,7 @@ gadtConstructor = makeTerm
|
||||
<$> (context' <|> emptyTerm)
|
||||
<*> typeConstructor
|
||||
<* token Annotation
|
||||
<*> type')
|
||||
<*> term type')
|
||||
|
||||
gadtDeclaration :: Assignment
|
||||
gadtDeclaration = makeTerm
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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))))))))))
|
||||
|
@ -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))))))))))
|
||||
|
@ -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))))))))))
|
||||
|
@ -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))))))))))
|
||||
|
Loading…
Reference in New Issue
Block a user