diff --git a/src/Language/Haskell/Assignment.hs b/src/Language/Haskell/Assignment.hs index 79174c455..566c11c70 100644 --- a/src/Language/Haskell/Assignment.hs +++ b/src/Language/Haskell/Assignment.hs @@ -33,13 +33,16 @@ type Syntax = '[ , Literal.Float , Literal.Integer , Literal.TextElement + , Syntax.AllConstructors , Syntax.AnnotatedTypeVariable , Syntax.Class + , Syntax.ConstructorOperator , Syntax.Context , Syntax.Context' , Syntax.Deriving , Syntax.Empty , Syntax.Error + , Syntax.Export , Syntax.Field , Syntax.FunctionConstructor , Syntax.FunctionType @@ -52,7 +55,9 @@ type Syntax = '[ , Syntax.KindSignature , Syntax.ListConstructor , Syntax.Module + , Syntax.ModuleExport , Syntax.Pragma + , Syntax.QualifiedModuleIdentifier , Syntax.QualifiedTypeConstructorIdentifier , Syntax.RecordDataConstructor , Syntax.Star @@ -60,9 +65,11 @@ type Syntax = '[ , Syntax.StrictTypeVariable , Syntax.TupleConstructor , Syntax.Type + , Syntax.TypeConstructorExport , Syntax.TypeSignature , Syntax.TypeSynonym , Syntax.UnitConstructor + , Syntax.VariableOperator , Type.TypeParameters , [] ] @@ -84,6 +91,9 @@ algebraicDatatypeDeclaration = makeTerm <|> pure []) <*> (derivingClause <|> emptyTerm)) +allConstructors :: Assignment +allConstructors = makeTerm <$> token AllConstructors <*> pure Syntax.AllConstructors + annotatedTypeVariable :: Assignment annotatedTypeVariable = makeTerm <$> symbol AnnotatedTypeVariable <*> children (Syntax.AnnotatedTypeVariable <$> typeVariableIdentifier <* token Annotation <*> (kind <|> type')) @@ -103,6 +113,12 @@ constructor = (makeTerm <$> symbol DataConstructor <*> children (Declaration.Co constructorIdentifier :: Assignment constructorIdentifier = makeTerm <$> symbol ConstructorIdentifier <*> (Syntax.Identifier . Name.name <$> source) +constructorOperator :: Assignment +constructorOperator = makeTerm <$> symbol ConstructorOperator <*> children (Syntax.ConstructorOperator <$> expression) + +constructorSymbol :: Assignment +constructorSymbol = makeTerm <$> symbol ConstructorSymbol <*> (Syntax.Identifier . Name.name <$> source) + context' :: Assignment context' = makeTerm <$> symbol Context <*> children (Syntax.Context' <$> many (type' <|> contextPattern)) @@ -112,6 +128,9 @@ contextPattern = symbol ContextPattern *> children type' derivingClause :: Assignment derivingClause = makeTerm <$> symbol Deriving <*> children (Syntax.Deriving <$> many typeConstructor) +export :: Assignment +export = makeTerm <$> symbol Export <*> children (Syntax.Export <$> expressions) + expressions :: Assignment expressions = makeTerm'' <$> location <*> many expression @@ -121,11 +140,14 @@ expression = term (handleError (choice expressionChoices)) expressionChoices :: [Assignment.Assignment [] Grammar Term] expressionChoices = [ algebraicDatatypeDeclaration + , allConstructors , annotatedTypeVariable , character , comment , context' , constructorIdentifier + , constructorOperator + , constructorSymbol , derivingClause , float , functionConstructor @@ -139,12 +161,15 @@ expressionChoices = [ , listConstructor , listExpression , listType + , moduleExport , moduleIdentifier + , qualifiedModuleIdentifier , qualifiedTypeConstructorIdentifier , star , strictType , string , type' + , typeConstructorExport , typeConstructorIdentifier , typeSignature , typeSynonymDeclaration @@ -152,6 +177,8 @@ expressionChoices = [ , tuplingConstructor , unitConstructor , variableIdentifier + , variableOperator + , variableSymbol , where' ] @@ -242,7 +269,13 @@ listType = makeTerm <$> symbol ListType <*> children (Literal.Array <$> many typ module' :: Assignment module' = makeTerm <$> symbol Module - <*> children (Syntax.Module <$> (moduleIdentifier <|> emptyTerm) <*> pure [] <*> (where' <|> expressions <|> emptyTerm)) + <*> children (Syntax.Module <$> (term moduleIdentifier <|> emptyTerm) <*> moduleExports <*> (where' <|> expressions <|> emptyTerm)) + where + moduleExports = symbol ModuleExports *> children (many export) + <|> pure [] + +moduleExport :: Assignment +moduleExport = makeTerm <$> symbol ModuleExport <*> children (Syntax.ModuleExport <$> expressions) moduleIdentifier :: Assignment moduleIdentifier = makeTerm <$> symbol ModuleIdentifier <*> (Syntax.Identifier . Name.name <$> source) @@ -253,6 +286,9 @@ parenthesizedTypePattern = symbol ParenthesizedTypePattern *> children typeParam pragma :: Assignment pragma = makeTerm <$> symbol Pragma <*> (Syntax.Pragma <$> source) +qualifiedModuleIdentifier :: Assignment +qualifiedModuleIdentifier = makeTerm <$> symbol QualifiedModuleIdentifier <*> children (Syntax.QualifiedModuleIdentifier <$> many expression) + qualifiedTypeConstructorIdentifier :: Assignment qualifiedTypeConstructorIdentifier = makeTerm <$> symbol QualifiedTypeConstructorIdentifier <*> children (Syntax.QualifiedTypeConstructorIdentifier <$> many expression) @@ -271,6 +307,9 @@ string = makeTerm <$> symbol String <*> (Literal.TextElement <$> source) typeClassIdentifier :: Assignment typeClassIdentifier = makeTerm <$> symbol TypeClassIdentifier <*> (Syntax.Identifier . Name.name <$> source) +typeConstructorExport :: Assignment +typeConstructorExport = makeTerm <$> symbol TypeConstructorExport <*> children (Syntax.TypeConstructorExport <$> expression) + typeConstructorIdentifier :: Assignment typeConstructorIdentifier = makeTerm <$> symbol TypeConstructorIdentifier <*> (Syntax.Identifier . Name.name <$> source) @@ -311,6 +350,7 @@ typeConstructor = constructorIdentifier <|> functionConstructor <|> listConstructor <|> listType + <|> qualifiedModuleIdentifier <|> qualifiedTypeConstructorIdentifier <|> typeClassIdentifier <|> typeConstructorIdentifier @@ -332,6 +372,12 @@ unitConstructor = makeTerm <$> token UnitConstructor <*> pure Syntax.UnitConstru variableIdentifier :: Assignment variableIdentifier = makeTerm <$> symbol VariableIdentifier <*> (Syntax.Identifier . Name.name <$> source) +variableOperator :: Assignment +variableOperator = makeTerm <$> symbol VariableOperator <*> children (Syntax.VariableOperator <$> expression) + +variableSymbol :: Assignment +variableSymbol = makeTerm <$> (symbol VariableSymbol <|> symbol VariableSymbol') <*> (Syntax.Identifier . Name.name <$> source) + variableIdentifiers :: Assignment variableIdentifiers = makeTerm <$> location <*> many variableIdentifier diff --git a/src/Language/Haskell/Syntax.hs b/src/Language/Haskell/Syntax.hs index be1acc529..293caad5c 100644 --- a/src/Language/Haskell/Syntax.hs +++ b/src/Language/Haskell/Syntax.hs @@ -243,3 +243,66 @@ instance Ord1 AnnotatedTypeVariable where liftCompare = genericLiftCompare instance Show1 AnnotatedTypeVariable where liftShowsPrec = genericLiftShowsPrec instance Evaluatable AnnotatedTypeVariable + +newtype QualifiedModuleIdentifier a = QualifiedModuleIdentifier { qualifiedModuleIdentifierName :: [a] } + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 QualifiedModuleIdentifier where liftEq = genericLiftEq +instance Ord1 QualifiedModuleIdentifier where liftCompare = genericLiftCompare +instance Show1 QualifiedModuleIdentifier where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable QualifiedModuleIdentifier + +newtype Export a = Export { exportContent :: a } + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 Export where liftEq = genericLiftEq +instance Ord1 Export where liftCompare = genericLiftCompare +instance Show1 Export where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable Export + +newtype ModuleExport a = ModuleExport { moduleExportContent :: a } + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 ModuleExport where liftEq = genericLiftEq +instance Ord1 ModuleExport where liftCompare = genericLiftCompare +instance Show1 ModuleExport where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable ModuleExport + +newtype TypeConstructorExport a = TypeConstructorExport { typeConstructorExportContent :: a } + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 TypeConstructorExport where liftEq = genericLiftEq +instance Ord1 TypeConstructorExport where liftCompare = genericLiftCompare +instance Show1 TypeConstructorExport where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable TypeConstructorExport + +newtype VariableOperator a = VariableOperator { variableOperatorContent :: a } + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 VariableOperator where liftEq = genericLiftEq +instance Ord1 VariableOperator where liftCompare = genericLiftCompare +instance Show1 VariableOperator where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable VariableOperator + +data AllConstructors a = AllConstructors + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 AllConstructors where liftEq = genericLiftEq +instance Ord1 AllConstructors where liftCompare = genericLiftCompare +instance Show1 AllConstructors where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable AllConstructors + +newtype ConstructorOperator a = ConstructorOperator { constructorOperatorContent :: a } + deriving (Declarations1, Diffable, Eq, Foldable, FreeVariables1, Functor, Generic1, Hashable1, Mergeable, Ord, Show, ToJSONFields1, Traversable) + +instance Eq1 ConstructorOperator where liftEq = genericLiftEq +instance Ord1 ConstructorOperator where liftCompare = genericLiftCompare +instance Show1 ConstructorOperator where liftShowsPrec = genericLiftShowsPrec + +instance Evaluatable ConstructorOperator diff --git a/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffA-B.txt b/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffA-B.txt index 3a46b95c9..c76d18204 100644 --- a/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffA-B.txt +++ b/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffA-B.txt @@ -80,20 +80,26 @@ { (Identifier) ->(Identifier) } (TypeParameters)) - (Constructor - (Empty) - { (Identifier) - ->(Identifier) } - (TypeParameters)) {+(Constructor {+(Empty)+} {+(Identifier)+} {+(TypeParameters)+})+} - (Constructor - (Empty) - { (Identifier) - ->(Identifier) } - (TypeParameters)) + {+(Constructor + {+(Empty)+} + {+(Identifier)+} + {+(TypeParameters)+})+} + {+(Constructor + {+(Empty)+} + {+(Identifier)+} + {+(TypeParameters)+})+} + {-(Constructor + {-(Empty)-} + {-(Identifier)-} + {-(TypeParameters)-})-} + {-(Constructor + {-(Empty)-} + {-(Identifier)-} + {-(TypeParameters)-})-} {-(Constructor {-(Empty)-} {-(Identifier)-} diff --git a/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffB-A.txt b/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffB-A.txt index 56e963130..1c1f40939 100644 --- a/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffB-A.txt +++ b/test/fixtures/haskell/corpus/algebraic-datatype-declarations.diffB-A.txt @@ -80,6 +80,10 @@ { (Identifier) ->(Identifier) } (TypeParameters)) + {+(Constructor + {+(Empty)+} + {+(Identifier)+} + {+(TypeParameters)+})+} (Constructor (Empty) { (Identifier) @@ -89,10 +93,6 @@ {+(Empty)+} {+(Identifier)+} {+(TypeParameters)+})+} - {+(Constructor - {+(Empty)+} - {+(Identifier)+} - {+(TypeParameters)+})+} {-(Constructor {-(Empty)-} {-(Identifier)-} diff --git a/test/fixtures/haskell/corpus/literals.diffA-B.txt b/test/fixtures/haskell/corpus/literals.diffA-B.txt index 462bfd807..e428f0440 100644 --- a/test/fixtures/haskell/corpus/literals.diffA-B.txt +++ b/test/fixtures/haskell/corpus/literals.diffA-B.txt @@ -49,12 +49,10 @@ {+(Identifier)+} {+(Statements {+(Float)+})+})+} - (Function - { (Identifier) - ->(Identifier) } - (Statements - {+(Float)+} - {-(Integer)-})) + {+(Function + {+(Identifier)+} + {+(Statements + {+(Float)+})+})+} {+(Function {+(Identifier)+} {+(Statements @@ -285,6 +283,10 @@ {-(Identifier)-} {-(Statements {-(Integer)-})-})-} + {-(Function + {-(Identifier)-} + {-(Statements + {-(Integer)-})-})-} {-(Function {-(Identifier)-} {-(Statements diff --git a/test/fixtures/haskell/corpus/module-declaration1.A.hs b/test/fixtures/haskell/corpus/module-declaration1.A.hs new file mode 100644 index 000000000..d843c00b7 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration1.A.hs @@ -0,0 +1 @@ +module A where diff --git a/test/fixtures/haskell/corpus/module-declaration1.B.hs b/test/fixtures/haskell/corpus/module-declaration1.B.hs new file mode 100644 index 000000000..c759bc2d1 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration1.B.hs @@ -0,0 +1 @@ +module B where diff --git a/test/fixtures/haskell/corpus/module-declaration1.diffA-B.txt b/test/fixtures/haskell/corpus/module-declaration1.diffA-B.txt new file mode 100644 index 000000000..0c3811f05 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration1.diffA-B.txt @@ -0,0 +1,4 @@ +(Module +{ (Identifier) +->(Identifier) } + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration1.diffB-A.txt b/test/fixtures/haskell/corpus/module-declaration1.diffB-A.txt new file mode 100644 index 000000000..0c3811f05 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration1.diffB-A.txt @@ -0,0 +1,4 @@ +(Module +{ (Identifier) +->(Identifier) } + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration1.parseA.txt b/test/fixtures/haskell/corpus/module-declaration1.parseA.txt new file mode 100644 index 000000000..e3964fea2 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration1.parseA.txt @@ -0,0 +1,3 @@ +(Module + (Identifier) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration1.parseB.txt b/test/fixtures/haskell/corpus/module-declaration1.parseB.txt new file mode 100644 index 000000000..e3964fea2 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration1.parseB.txt @@ -0,0 +1,3 @@ +(Module + (Identifier) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration2.A.hs b/test/fixtures/haskell/corpus/module-declaration2.A.hs new file mode 100644 index 000000000..db45eda42 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration2.A.hs @@ -0,0 +1 @@ +module A () where diff --git a/test/fixtures/haskell/corpus/module-declaration2.B.hs b/test/fixtures/haskell/corpus/module-declaration2.B.hs new file mode 100644 index 000000000..78d217a1a --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration2.B.hs @@ -0,0 +1 @@ +module B () where diff --git a/test/fixtures/haskell/corpus/module-declaration2.diffA-B.txt b/test/fixtures/haskell/corpus/module-declaration2.diffA-B.txt new file mode 100644 index 000000000..0c3811f05 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration2.diffA-B.txt @@ -0,0 +1,4 @@ +(Module +{ (Identifier) +->(Identifier) } + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration2.diffB-A.txt b/test/fixtures/haskell/corpus/module-declaration2.diffB-A.txt new file mode 100644 index 000000000..0c3811f05 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration2.diffB-A.txt @@ -0,0 +1,4 @@ +(Module +{ (Identifier) +->(Identifier) } + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration2.parseA.txt b/test/fixtures/haskell/corpus/module-declaration2.parseA.txt new file mode 100644 index 000000000..e3964fea2 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration2.parseA.txt @@ -0,0 +1,3 @@ +(Module + (Identifier) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration2.parseB.txt b/test/fixtures/haskell/corpus/module-declaration2.parseB.txt new file mode 100644 index 000000000..e3964fea2 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration2.parseB.txt @@ -0,0 +1,3 @@ +(Module + (Identifier) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration3.A.hs b/test/fixtures/haskell/corpus/module-declaration3.A.hs new file mode 100644 index 000000000..dcc9920ec --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration3.A.hs @@ -0,0 +1 @@ +module A.B' where diff --git a/test/fixtures/haskell/corpus/module-declaration3.B.hs b/test/fixtures/haskell/corpus/module-declaration3.B.hs new file mode 100644 index 000000000..2e9ea13e8 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration3.B.hs @@ -0,0 +1 @@ +module B.A' where diff --git a/test/fixtures/haskell/corpus/module-declaration3.diffA-B.txt b/test/fixtures/haskell/corpus/module-declaration3.diffA-B.txt new file mode 100644 index 000000000..fca54cb79 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration3.diffA-B.txt @@ -0,0 +1,9 @@ +(Module + (Empty) + (Statements + (QualifiedModuleIdentifier + { (Identifier) + ->(Identifier) } + { (Identifier) + ->(Identifier) }) + (Statements))) diff --git a/test/fixtures/haskell/corpus/module-declaration3.diffB-A.txt b/test/fixtures/haskell/corpus/module-declaration3.diffB-A.txt new file mode 100644 index 000000000..fca54cb79 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration3.diffB-A.txt @@ -0,0 +1,9 @@ +(Module + (Empty) + (Statements + (QualifiedModuleIdentifier + { (Identifier) + ->(Identifier) } + { (Identifier) + ->(Identifier) }) + (Statements))) diff --git a/test/fixtures/haskell/corpus/module-declaration3.parseA.txt b/test/fixtures/haskell/corpus/module-declaration3.parseA.txt new file mode 100644 index 000000000..723ca1047 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration3.parseA.txt @@ -0,0 +1,7 @@ +(Module + (Empty) + (Statements + (QualifiedModuleIdentifier + (Identifier) + (Identifier)) + (Statements))) diff --git a/test/fixtures/haskell/corpus/module-declaration3.parseB.txt b/test/fixtures/haskell/corpus/module-declaration3.parseB.txt new file mode 100644 index 000000000..723ca1047 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration3.parseB.txt @@ -0,0 +1,7 @@ +(Module + (Empty) + (Statements + (QualifiedModuleIdentifier + (Identifier) + (Identifier)) + (Statements))) diff --git a/test/fixtures/haskell/corpus/module-declaration4.A.hs b/test/fixtures/haskell/corpus/module-declaration4.A.hs new file mode 100644 index 000000000..287769eb3 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration4.A.hs @@ -0,0 +1 @@ +module A (type(+), (+)) where diff --git a/test/fixtures/haskell/corpus/module-declaration4.B.hs b/test/fixtures/haskell/corpus/module-declaration4.B.hs new file mode 100644 index 000000000..3e0806651 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration4.B.hs @@ -0,0 +1 @@ +module A (type(-), (-)) where diff --git a/test/fixtures/haskell/corpus/module-declaration4.diffA-B.txt b/test/fixtures/haskell/corpus/module-declaration4.diffA-B.txt new file mode 100644 index 000000000..831c9c3f8 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration4.diffA-B.txt @@ -0,0 +1,12 @@ +(Module + (Identifier) + (Export + (TypeConstructorExport + (VariableOperator + { (Identifier) + ->(Identifier) }))) + (Export + (VariableOperator + { (Identifier) + ->(Identifier) })) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration4.diffB-A.txt b/test/fixtures/haskell/corpus/module-declaration4.diffB-A.txt new file mode 100644 index 000000000..831c9c3f8 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration4.diffB-A.txt @@ -0,0 +1,12 @@ +(Module + (Identifier) + (Export + (TypeConstructorExport + (VariableOperator + { (Identifier) + ->(Identifier) }))) + (Export + (VariableOperator + { (Identifier) + ->(Identifier) })) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration4.parseA.txt b/test/fixtures/haskell/corpus/module-declaration4.parseA.txt new file mode 100644 index 000000000..7f31126c8 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration4.parseA.txt @@ -0,0 +1,10 @@ +(Module + (Identifier) + (Export + (TypeConstructorExport + (VariableOperator + (Identifier)))) + (Export + (VariableOperator + (Identifier))) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration4.parseB.txt b/test/fixtures/haskell/corpus/module-declaration4.parseB.txt new file mode 100644 index 000000000..7f31126c8 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration4.parseB.txt @@ -0,0 +1,10 @@ +(Module + (Identifier) + (Export + (TypeConstructorExport + (VariableOperator + (Identifier)))) + (Export + (VariableOperator + (Identifier))) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration5.A.hs b/test/fixtures/haskell/corpus/module-declaration5.A.hs new file mode 100644 index 000000000..aacbea70d --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration5.A.hs @@ -0,0 +1 @@ +module A (Maybe(..), type(:<), type(+), maybe', module A, type Foo,) where diff --git a/test/fixtures/haskell/corpus/module-declaration5.B.hs b/test/fixtures/haskell/corpus/module-declaration5.B.hs new file mode 100644 index 000000000..19c334f90 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration5.B.hs @@ -0,0 +1 @@ +module B (Maybe(..), type(:+), type(-), maybe', module B, type Bar,) where diff --git a/test/fixtures/haskell/corpus/module-declaration5.diffA-B.txt b/test/fixtures/haskell/corpus/module-declaration5.diffA-B.txt new file mode 100644 index 000000000..6bd003671 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration5.diffA-B.txt @@ -0,0 +1,28 @@ +(Module +{ (Identifier) +->(Identifier) } + (Export + (Statements + (Identifier) + (AllConstructors))) + (Export + (TypeConstructorExport + (ConstructorOperator + { (Identifier) + ->(Identifier) }))) + (Export + (TypeConstructorExport + (VariableOperator + { (Identifier) + ->(Identifier) }))) + (Export + (Identifier)) + (Export + (ModuleExport + { (Identifier) + ->(Identifier) })) + (Export + (TypeConstructorExport + { (Identifier) + ->(Identifier) })) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration5.diffB-A.txt b/test/fixtures/haskell/corpus/module-declaration5.diffB-A.txt new file mode 100644 index 000000000..6bd003671 --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration5.diffB-A.txt @@ -0,0 +1,28 @@ +(Module +{ (Identifier) +->(Identifier) } + (Export + (Statements + (Identifier) + (AllConstructors))) + (Export + (TypeConstructorExport + (ConstructorOperator + { (Identifier) + ->(Identifier) }))) + (Export + (TypeConstructorExport + (VariableOperator + { (Identifier) + ->(Identifier) }))) + (Export + (Identifier)) + (Export + (ModuleExport + { (Identifier) + ->(Identifier) })) + (Export + (TypeConstructorExport + { (Identifier) + ->(Identifier) })) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration5.parseA.txt b/test/fixtures/haskell/corpus/module-declaration5.parseA.txt new file mode 100644 index 000000000..aed76fcbd --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration5.parseA.txt @@ -0,0 +1,23 @@ +(Module + (Identifier) + (Export + (Statements + (Identifier) + (AllConstructors))) + (Export + (TypeConstructorExport + (ConstructorOperator + (Identifier)))) + (Export + (TypeConstructorExport + (VariableOperator + (Identifier)))) + (Export + (Identifier)) + (Export + (ModuleExport + (Identifier))) + (Export + (TypeConstructorExport + (Identifier))) + (Statements)) diff --git a/test/fixtures/haskell/corpus/module-declaration5.parseB.txt b/test/fixtures/haskell/corpus/module-declaration5.parseB.txt new file mode 100644 index 000000000..aed76fcbd --- /dev/null +++ b/test/fixtures/haskell/corpus/module-declaration5.parseB.txt @@ -0,0 +1,23 @@ +(Module + (Identifier) + (Export + (Statements + (Identifier) + (AllConstructors))) + (Export + (TypeConstructorExport + (ConstructorOperator + (Identifier)))) + (Export + (TypeConstructorExport + (VariableOperator + (Identifier)))) + (Export + (Identifier)) + (Export + (ModuleExport + (Identifier))) + (Export + (TypeConstructorExport + (Identifier))) + (Statements))