mirror of
https://github.com/github/semantic.git
synced 2024-12-03 00:16:52 +03:00
Assign fixity declarations
This commit is contained in:
parent
f75c1e236b
commit
7e7485d7c4
@ -57,6 +57,7 @@ type Syntax = '[
|
||||
, Syntax.EqualityConstraint
|
||||
, Syntax.Export
|
||||
, Syntax.Field
|
||||
, Syntax.Fixity'
|
||||
, Syntax.FunctionConstructor
|
||||
, Syntax.FunctionType
|
||||
, Syntax.GADT
|
||||
@ -241,6 +242,7 @@ expressionChoices = [
|
||||
, do'
|
||||
, equalityConstraint
|
||||
, expression'
|
||||
, fixityDeclaration
|
||||
, float
|
||||
, functionConstructor
|
||||
, functionDeclaration
|
||||
@ -329,6 +331,9 @@ field = makeTerm
|
||||
where
|
||||
fieldType = makeTerm <$> location <*> (Syntax.Type <$> term (type' <|> typeVariableIdentifier) <*> typeParameters <*> (kindSignature <|> emptyTerm))
|
||||
|
||||
fixityDeclaration :: Assignment
|
||||
fixityDeclaration = makeTerm <$> symbol FixityDeclaration <*> children (Syntax.Fixity' <$> (integer <|> emptyTerm) <*> manyTerm expression)
|
||||
|
||||
float :: Assignment
|
||||
float = makeTerm <$> symbol Float <*> (Literal.Float <$> source)
|
||||
|
||||
|
@ -652,3 +652,12 @@ instance Show1 TypeClass where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable TypeClass
|
||||
|
||||
data Fixity' a = Fixity' { fixityPrecedence :: a, fixityIdentifier :: [a] }
|
||||
deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable)
|
||||
|
||||
instance Eq1 Fixity' where liftEq = genericLiftEq
|
||||
instance Ord1 Fixity' where liftCompare = genericLiftCompare
|
||||
instance Show1 Fixity' where liftShowsPrec = genericLiftShowsPrec
|
||||
|
||||
instance Evaluatable Fixity'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user