1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

Add more expression test fixtures

This commit is contained in:
Rick Winfrey 2018-06-12 14:19:18 -07:00
parent 811a7335a0
commit 00e299ad25
12 changed files with 482 additions and 75 deletions

View File

@ -62,6 +62,14 @@
->(TypeConstructorIdentifier) }
(TypeParameters)
(Empty))
(Constructor
{ (ConstructorIdentifier)
->(ConstructorIdentifier) }
(TypeParameters))
(Constructor
{ (ConstructorIdentifier)
->(ConstructorIdentifier) }
(TypeParameters))
{+(Constructor
{+(ConstructorIdentifier)+}
{+(TypeParameters)+})+}
@ -75,18 +83,6 @@
{+(Constructor
{+(ConstructorIdentifier)+}
{+(TypeParameters)+})+}
{+(Constructor
{+(ConstructorIdentifier)+}
{+(TypeParameters)+})+}
{+(Constructor
{+(ConstructorIdentifier)+}
{+(TypeParameters)+})+}
{-(Constructor
{-(ConstructorIdentifier)-}
{-(TypeParameters)-})-}
{-(Constructor
{-(ConstructorIdentifier)-}
{-(TypeParameters)-})-}
{-(Constructor
{-(ConstructorIdentifier)-}
{-(TypeParameters)-})-}

View File

@ -62,9 +62,10 @@
->(TypeConstructorIdentifier) }
(TypeParameters)
(Empty))
{+(Constructor
{+(ConstructorIdentifier)+}
{+(TypeParameters)+})+}
(Constructor
{ (ConstructorIdentifier)
->(ConstructorIdentifier) }
(TypeParameters))
(Constructor
{ (ConstructorIdentifier)
->(ConstructorIdentifier) }
@ -90,9 +91,6 @@
{-(Constructor
{-(ConstructorIdentifier)-}
{-(TypeParameters)-})-}
{-(Constructor
{-(ConstructorIdentifier)-}
{-(TypeParameters)-})-}
{-(Constructor
{-(ConstructorIdentifier)-}
{-(TypeParameters)-})-}

View File

@ -26,3 +26,17 @@ a = (:< a)
a = (a :)
a = (a :|)
g = h `i` j
a = Data.Just
parseJSON (JSON.Object r) = IncPK <$>
r .: "id" <*>
r .: "nullable_string" <*>
r .: "non_nullable_string" <*>
r .: "inserted_at"
f = do
a <- b =<< c
b <- e >>= g

View File

@ -26,3 +26,17 @@ b = (:< a)
b = (b :)
b = (b :|)
b = h `i` j
b = Data.Just
parseJSON (JSON.Object s) = IncPK <$>
s .: "id" <*>
s .: "nullable_string" <*>
s .: "non_nullable_string" <*>
s .: "inserted_at"
g = do
b <- d =<< e
c <- f >>= h

View File

@ -230,6 +230,15 @@
(ConstructorOperator
(ConstructorSymbol))
(VariableIdentifier))))
(Function
{ (VariableIdentifier)
->(VariableIdentifier) }
(Statements
(LeftOperatorSection
{ (VariableIdentifier)
->(VariableIdentifier) }
(ConstructorOperator
(ConstructorSymbol)))))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
@ -240,10 +249,17 @@
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(LeftOperatorSection
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(ConstructorOperator
{+(ConstructorSymbol)+})+})+})+})+}
{+(VariableOperator
{+(InfixVariableIdentifier)+})+}
{+(VariableIdentifier)+})+})+})+}
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(QualifiedConstructorIdentifier
{+(ModuleIdentifier)+}
{+(ConstructorIdentifier)+})+})+})+}
{-(Function
{-(VariableIdentifier)-}
{-(Statements
@ -254,7 +270,86 @@
{-(Function
{-(VariableIdentifier)-}
{-(Statements
{-(LeftOperatorSection
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(ConstructorOperator
{-(ConstructorSymbol)-})-})-})-})-}))
{-(VariableOperator
{-(InfixVariableIdentifier)-})-}
{-(VariableIdentifier)-})-})-})-}
{-(Function
{-(VariableIdentifier)-}
{-(Statements
{-(QualifiedConstructorIdentifier
{-(ModuleIdentifier)-}
{-(ConstructorIdentifier)-})-})-})-}
(Function
(VariableIdentifier)
(ConstructorPattern
(Statements
(QualifiedConstructorIdentifier
(ModuleIdentifier)
(ConstructorIdentifier))
{ (VariableIdentifier)
->(VariableIdentifier) }))
(Statements
(InfixOperatorApp
(ConstructorIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
{ (VariableIdentifier)
->(VariableIdentifier) }
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
{ (VariableIdentifier)
->(VariableIdentifier) }
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
{ (VariableIdentifier)
->(VariableIdentifier) }
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
{ (VariableIdentifier)
->(VariableIdentifier) }
(VariableOperator
(VariableSymbol))
(TextElement)))))))))))
(Function
{ (VariableIdentifier)
->(VariableIdentifier) }
(Statements
(Do
(BindPattern
{ (VariableIdentifier)
->(VariableIdentifier) }
(InfixOperatorApp
{ (VariableIdentifier)
->(VariableIdentifier) }
(VariableOperator
(VariableSymbol))
{ (VariableIdentifier)
->(VariableIdentifier) }))
(BindPattern
{ (VariableIdentifier)
->(VariableIdentifier) }
(InfixOperatorApp
{ (VariableIdentifier)
->(VariableIdentifier) }
(VariableOperator
(VariableSymbol))
{ (VariableIdentifier)
->(VariableIdentifier) })))))))

View File

@ -230,13 +230,15 @@
(ConstructorOperator
(ConstructorSymbol))
(VariableIdentifier))))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(LeftOperatorSection
{+(VariableIdentifier)+}
{+(ConstructorOperator
{+(ConstructorSymbol)+})+})+})+})+}
(Function
{ (VariableIdentifier)
->(VariableIdentifier) }
(Statements
(LeftOperatorSection
{ (VariableIdentifier)
->(VariableIdentifier) }
(ConstructorOperator
(ConstructorSymbol)))))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
@ -254,7 +256,145 @@
{-(Function
{-(VariableIdentifier)-}
{-(Statements
{-(LeftOperatorSection
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(ConstructorOperator
{-(ConstructorSymbol)-})-})-})-})-}))
{-(VariableOperator
{-(InfixVariableIdentifier)-})-}
{-(VariableIdentifier)-})-})-})-}
{-(Function
{-(VariableIdentifier)-}
{-(Statements
{-(QualifiedConstructorIdentifier
{-(ModuleIdentifier)-}
{-(ConstructorIdentifier)-})-})-})-}
{-(Function
{-(VariableIdentifier)-}
{-(ConstructorPattern
{-(Statements
{-(QualifiedConstructorIdentifier
{-(ModuleIdentifier)-}
{-(ConstructorIdentifier)-})-}
{-(VariableIdentifier)-})-})-}
{-(Statements
{-(InfixOperatorApp
{-(ConstructorIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(TextElement)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(TextElement)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(TextElement)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(TextElement)-})-})-})-})-})-})-})-})-})-})-}
(Function
(VariableIdentifier)
(Statements
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(InfixVariableIdentifier)+})+}
{+(VariableIdentifier)+})+}
{-(Do
{-(BindPattern
{-(VariableIdentifier)-}
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(VariableIdentifier)-})-})-}
{-(BindPattern
{-(VariableIdentifier)-}
{-(InfixOperatorApp
{-(VariableIdentifier)-}
{-(VariableOperator
{-(VariableSymbol)-})-}
{-(VariableIdentifier)-})-})-})-}))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(QualifiedConstructorIdentifier
{+(ModuleIdentifier)+}
{+(ConstructorIdentifier)+})+})+})+}
{+(Function
{+(VariableIdentifier)+}
{+(ConstructorPattern
{+(Statements
{+(QualifiedConstructorIdentifier
{+(ModuleIdentifier)+}
{+(ConstructorIdentifier)+})+}
{+(VariableIdentifier)+})+})+}
{+(Statements
{+(InfixOperatorApp
{+(ConstructorIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(TextElement)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(TextElement)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(TextElement)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(TextElement)+})+})+})+})+})+})+})+})+})+})+}
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(Do
{+(BindPattern
{+(VariableIdentifier)+}
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(VariableIdentifier)+})+})+}
{+(BindPattern
{+(VariableIdentifier)+}
{+(InfixOperatorApp
{+(VariableIdentifier)+}
{+(VariableOperator
{+(VariableSymbol)+})+}
{+(VariableIdentifier)+})+})+})+})+})+}))

View File

@ -205,4 +205,78 @@
(LeftOperatorSection
(VariableIdentifier)
(ConstructorOperator
(ConstructorSymbol)))))))
(ConstructorSymbol)))))
(Function
(VariableIdentifier)
(Statements
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(InfixVariableIdentifier))
(VariableIdentifier))))
(Function
(VariableIdentifier)
(Statements
(QualifiedConstructorIdentifier
(ModuleIdentifier)
(ConstructorIdentifier))))
(Function
(VariableIdentifier)
(ConstructorPattern
(Statements
(QualifiedConstructorIdentifier
(ModuleIdentifier)
(ConstructorIdentifier))
(VariableIdentifier)))
(Statements
(InfixOperatorApp
(ConstructorIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(TextElement)))))))))))
(Function
(VariableIdentifier)
(Statements
(Do
(BindPattern
(VariableIdentifier)
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(VariableIdentifier)))
(BindPattern
(VariableIdentifier)
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(VariableIdentifier))))))))

View File

@ -207,4 +207,78 @@
(LeftOperatorSection
(VariableIdentifier)
(ConstructorOperator
(ConstructorSymbol)))))))
(ConstructorSymbol)))))
(Function
(VariableIdentifier)
(Statements
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(InfixVariableIdentifier))
(VariableIdentifier))))
(Function
(VariableIdentifier)
(Statements
(QualifiedConstructorIdentifier
(ModuleIdentifier)
(ConstructorIdentifier))))
(Function
(VariableIdentifier)
(ConstructorPattern
(Statements
(QualifiedConstructorIdentifier
(ModuleIdentifier)
(ConstructorIdentifier))
(VariableIdentifier)))
(Statements
(InfixOperatorApp
(ConstructorIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(TextElement)
(VariableOperator
(VariableSymbol))
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(TextElement)))))))))))
(Function
(VariableIdentifier)
(Statements
(Do
(BindPattern
(VariableIdentifier)
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(VariableIdentifier)))
(BindPattern
(VariableIdentifier)
(InfixOperatorApp
(VariableIdentifier)
(VariableOperator
(VariableSymbol))
(VariableIdentifier))))))))

View File

@ -1,10 +1,11 @@
(Module
(ModuleIdentifier)
(Statements
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(Integer)+})+})+}
(Function
{ (VariableIdentifier)
->(VariableIdentifier) }
(Statements
(Integer)))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
@ -121,12 +122,10 @@
{+(VariableIdentifier)+}
{+(Statements
{+(Character)+})+})+}
(Function
{ (VariableIdentifier)
->(VariableIdentifier) }
(Statements
{+(Character)+}
{-(Integer)-}))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(Character)+})+})+}
{+(Function
{+(VariableIdentifier)+}
{+(Statements

View File

@ -1,10 +1,11 @@
(Module
(ModuleIdentifier)
(Statements
{+(Function
{+(VariableIdentifier)+}
{+(Statements
{+(Integer)+})+})+}
(Function
{ (VariableIdentifier)
->(VariableIdentifier) }
(Statements
(Integer)))
{+(Function
{+(VariableIdentifier)+}
{+(Statements
@ -283,10 +284,6 @@
{-(VariableIdentifier)-}
{-(Statements
{-(Integer)-})-})-}
{-(Function
{-(VariableIdentifier)-}
{-(Statements
{-(Integer)-})-})-}
{-(Function
{-(VariableIdentifier)-}
{-(Statements

View File

@ -52,17 +52,17 @@
(TypeConstructorIdentifier))
(TypePattern
(TupleConstructor)))
(TypeSynonym
(Statements
(TypeConstructorIdentifier))
(TypePattern
{ (FunctionConstructor)
->(TupleConstructor) }))
{+(TypeSynonym
{+(Statements
{+(TypeConstructorIdentifier)+})+}
{+(TypePattern
{+(FunctionConstructor)+})+})+}
{+(TupleConstructor)+})+})+}
(TypeSynonym
(Statements
{ (TypeConstructorIdentifier)
->(TypeConstructorIdentifier) })
(TypePattern
(FunctionConstructor)))
(TypeSynonym
(Statements
(TypeConstructorIdentifier))

View File

@ -52,12 +52,11 @@
(TypeConstructorIdentifier))
(TypePattern
(TupleConstructor)))
(TypeSynonym
(Statements
(TypeConstructorIdentifier))
(TypePattern
{ (TupleConstructor)
->(FunctionConstructor) }))
{+(TypeSynonym
{+(Statements
{+(TypeConstructorIdentifier)+})+}
{+(TypePattern
{+(FunctionConstructor)+})+})+}
{+(TypeSynonym
{+(Statements
{+(TypeConstructorIdentifier)+})+}
@ -115,14 +114,11 @@
{+(TypeConstructorIdentifier)+}
{+(TypeVariableIdentifier)+})+})+}
{+(Empty)+})+})+})+})+})+}
(TypeSynonym
(Statements
{ (TypeConstructorIdentifier)
->(TypeConstructorIdentifier) }
{+(TypeConstructorIdentifier)+})
{ (TypePattern
{-(FunctionConstructor)-})
->(TextElement) })
{+(TypeSynonym
{+(Statements
{+(TypeConstructorIdentifier)+}
{+(TypeConstructorIdentifier)+})+}
{+(TextElement)+})+}
{+(TypeSynonym
{+(Statements
{+(TypeConstructorIdentifier)+}
@ -171,6 +167,16 @@
{+(TypeConstructorIdentifier)+}
{+(TypeVariableIdentifier)+}
{+(TypeVariableIdentifier)+})+})+})+})+}
{-(TypeSynonym
{-(Statements
{-(TypeConstructorIdentifier)-})-}
{-(TypePattern
{-(TupleConstructor)-})-})-}
{-(TypeSynonym
{-(Statements
{-(TypeConstructorIdentifier)-})-}
{-(TypePattern
{-(FunctionConstructor)-})-})-}
{-(TypeSynonym
{-(Statements
{-(TypeConstructorIdentifier)-})-}