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
|
||||
, parenthesizedTypePattern
|
||||
, pragma
|
||||
, primitiveConstructorIdentifier
|
||||
, qualifiedModuleIdentifier
|
||||
, qualifiedTypeConstructorIdentifier
|
||||
, quotedName
|
||||
@ -316,6 +317,9 @@ parenthesizedTypePattern = symbol ParenthesizedTypePattern *> children expressio
|
||||
pragma :: Assignment
|
||||
pragma = makeTerm <$> symbol Pragma <*> (Syntax.Pragma <$> source)
|
||||
|
||||
primitiveConstructorIdentifier :: Assignment
|
||||
primitiveConstructorIdentifier = makeTerm <$> symbol PrimitiveConstructorIdentifier <*> (Syntax.Identifier . Name.name <$> source)
|
||||
|
||||
qualifiedModuleIdentifier :: Assignment
|
||||
qualifiedModuleIdentifier = makeTerm <$> symbol QualifiedModuleIdentifier <*> children (Syntax.QualifiedModuleIdentifier <$> someTerm' expression)
|
||||
|
||||
@ -335,7 +339,7 @@ strictType :: Assignment
|
||||
strictType = makeTerm'
|
||||
<$> symbol StrictType
|
||||
<*> children ( (inject <$> (Syntax.StrictType <$> typeConstructor <*> typeParameters))
|
||||
<|> (inject <$> (Syntax.StrictTypeVariable <$> typeVariableIdentifier)))
|
||||
<|> (inject <$> (Syntax.StrictTypeVariable <$> expression)))
|
||||
|
||||
string :: Assignment
|
||||
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 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 Baz a = Show a => Baz a
|
||||
|
||||
|
||||
data Bar = Bar !Double#
|
||||
|
@ -423,4 +423,19 @@
|
||||
(TypeParameters
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Empty))
|
||||
(Datatype
|
||||
(Empty)
|
||||
(Type
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(TypeParameters)
|
||||
(Empty))
|
||||
(Constructor
|
||||
(Empty)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(TypeParameters
|
||||
(StrictTypeVariable
|
||||
(Identifier))))
|
||||
(Empty))))
|
||||
|
@ -420,4 +420,19 @@
|
||||
(TypeParameters
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Empty))
|
||||
(Datatype
|
||||
(Empty)
|
||||
(Type
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(TypeParameters)
|
||||
(Empty))
|
||||
(Constructor
|
||||
(Empty)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(TypeParameters
|
||||
(StrictTypeVariable
|
||||
(Identifier))))
|
||||
(Empty))))
|
||||
|
@ -354,4 +354,17 @@
|
||||
(Identifier)
|
||||
(TypeParameters
|
||||
(Identifier)))
|
||||
(Empty))
|
||||
(Datatype
|
||||
(Empty)
|
||||
(Type
|
||||
(Identifier)
|
||||
(TypeParameters)
|
||||
(Empty))
|
||||
(Constructor
|
||||
(Empty)
|
||||
(Identifier)
|
||||
(TypeParameters
|
||||
(StrictTypeVariable
|
||||
(Identifier))))
|
||||
(Empty))))
|
||||
|
@ -354,4 +354,17 @@
|
||||
(Identifier)
|
||||
(TypeParameters
|
||||
(Identifier)))
|
||||
(Empty))
|
||||
(Datatype
|
||||
(Empty)
|
||||
(Type
|
||||
(Identifier)
|
||||
(TypeParameters)
|
||||
(Empty))
|
||||
(Constructor
|
||||
(Empty)
|
||||
(Identifier)
|
||||
(TypeParameters
|
||||
(StrictTypeVariable
|
||||
(Identifier))))
|
||||
(Empty))))
|
||||
|
Loading…
Reference in New Issue
Block a user