mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Assign primitive constructor identifiers
This commit is contained in:
parent
0cc63f89f3
commit
867170b39a
@ -174,6 +174,7 @@ expressionChoices = [
|
|||||||
, operator
|
, operator
|
||||||
, parenthesizedTypePattern
|
, parenthesizedTypePattern
|
||||||
, pragma
|
, pragma
|
||||||
|
, primitiveConstructorIdentifier
|
||||||
, qualifiedModuleIdentifier
|
, qualifiedModuleIdentifier
|
||||||
, qualifiedTypeConstructorIdentifier
|
, qualifiedTypeConstructorIdentifier
|
||||||
, quotedName
|
, quotedName
|
||||||
@ -316,6 +317,9 @@ parenthesizedTypePattern = symbol ParenthesizedTypePattern *> children expressio
|
|||||||
pragma :: Assignment
|
pragma :: Assignment
|
||||||
pragma = makeTerm <$> symbol Pragma <*> (Syntax.Pragma <$> source)
|
pragma = makeTerm <$> symbol Pragma <*> (Syntax.Pragma <$> source)
|
||||||
|
|
||||||
|
primitiveConstructorIdentifier :: Assignment
|
||||||
|
primitiveConstructorIdentifier = makeTerm <$> symbol PrimitiveConstructorIdentifier <*> (Syntax.Identifier . Name.name <$> source)
|
||||||
|
|
||||||
qualifiedModuleIdentifier :: Assignment
|
qualifiedModuleIdentifier :: Assignment
|
||||||
qualifiedModuleIdentifier = makeTerm <$> symbol QualifiedModuleIdentifier <*> children (Syntax.QualifiedModuleIdentifier <$> someTerm' expression)
|
qualifiedModuleIdentifier = makeTerm <$> symbol QualifiedModuleIdentifier <*> children (Syntax.QualifiedModuleIdentifier <$> someTerm' expression)
|
||||||
|
|
||||||
@ -335,7 +339,7 @@ strictType :: Assignment
|
|||||||
strictType = makeTerm'
|
strictType = makeTerm'
|
||||||
<$> symbol StrictType
|
<$> symbol StrictType
|
||||||
<*> children ( (inject <$> (Syntax.StrictType <$> typeConstructor <*> typeParameters))
|
<*> children ( (inject <$> (Syntax.StrictType <$> typeConstructor <*> typeParameters))
|
||||||
<|> (inject <$> (Syntax.StrictTypeVariable <$> typeVariableIdentifier)))
|
<|> (inject <$> (Syntax.StrictTypeVariable <$> expression)))
|
||||||
|
|
||||||
string :: Assignment
|
string :: Assignment
|
||||||
string = makeTerm <$> symbol String <*> (Literal.TextElement <$> source)
|
string = makeTerm <$> symbol String <*> (Literal.TextElement <$> source)
|
||||||
|
@ -26,3 +26,5 @@ data (Eq (f a), Functor f) => N f a = N f a
|
|||||||
|
|
||||||
data Foo bar = HasCallStack => Foo bar
|
data Foo bar = HasCallStack => Foo bar
|
||||||
data Baz foo = Show foo => Baz foo
|
data Baz foo = Show foo => Baz foo
|
||||||
|
|
||||||
|
data Foo = Foo !Double#
|
||||||
|
@ -26,3 +26,6 @@ data (Eq (f a), Applicative f) => N f a = N f a
|
|||||||
|
|
||||||
data Foo bar = HasCallStack => Wiz bar
|
data Foo bar = HasCallStack => Wiz bar
|
||||||
data Baz a = Show a => Baz a
|
data Baz a = Show a => Baz a
|
||||||
|
|
||||||
|
|
||||||
|
data Bar = Bar !Double#
|
||||||
|
@ -423,4 +423,19 @@
|
|||||||
(TypeParameters
|
(TypeParameters
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }))
|
->(Identifier) }))
|
||||||
|
(Empty))
|
||||||
|
(Datatype
|
||||||
|
(Empty)
|
||||||
|
(Type
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
(TypeParameters)
|
||||||
|
(Empty))
|
||||||
|
(Constructor
|
||||||
|
(Empty)
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
(TypeParameters
|
||||||
|
(StrictTypeVariable
|
||||||
|
(Identifier))))
|
||||||
(Empty))))
|
(Empty))))
|
||||||
|
@ -420,4 +420,19 @@
|
|||||||
(TypeParameters
|
(TypeParameters
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }))
|
->(Identifier) }))
|
||||||
|
(Empty))
|
||||||
|
(Datatype
|
||||||
|
(Empty)
|
||||||
|
(Type
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
(TypeParameters)
|
||||||
|
(Empty))
|
||||||
|
(Constructor
|
||||||
|
(Empty)
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
(TypeParameters
|
||||||
|
(StrictTypeVariable
|
||||||
|
(Identifier))))
|
||||||
(Empty))))
|
(Empty))))
|
||||||
|
@ -354,4 +354,17 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
(TypeParameters
|
(TypeParameters
|
||||||
(Identifier)))
|
(Identifier)))
|
||||||
|
(Empty))
|
||||||
|
(Datatype
|
||||||
|
(Empty)
|
||||||
|
(Type
|
||||||
|
(Identifier)
|
||||||
|
(TypeParameters)
|
||||||
|
(Empty))
|
||||||
|
(Constructor
|
||||||
|
(Empty)
|
||||||
|
(Identifier)
|
||||||
|
(TypeParameters
|
||||||
|
(StrictTypeVariable
|
||||||
|
(Identifier))))
|
||||||
(Empty))))
|
(Empty))))
|
||||||
|
@ -354,4 +354,17 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
(TypeParameters
|
(TypeParameters
|
||||||
(Identifier)))
|
(Identifier)))
|
||||||
|
(Empty))
|
||||||
|
(Datatype
|
||||||
|
(Empty)
|
||||||
|
(Type
|
||||||
|
(Identifier)
|
||||||
|
(TypeParameters)
|
||||||
|
(Empty))
|
||||||
|
(Constructor
|
||||||
|
(Empty)
|
||||||
|
(Identifier)
|
||||||
|
(TypeParameters
|
||||||
|
(StrictTypeVariable
|
||||||
|
(Identifier))))
|
||||||
(Empty))))
|
(Empty))))
|
||||||
|
Loading…
Reference in New Issue
Block a user