├── .gitattributes ├── .gitignore ├── .travis.yml ├── CHANGELOG ├── CONTRIBUTING.md ├── HISTORY ├── LICENSE ├── README.md ├── RELEASENOTES-1.17.0 ├── Setup.hs ├── examples ├── Prettify.hs └── hse-examples.cabal ├── haskell-src-exts.cabal ├── src └── Language │ ├── Haskell │ ├── Exts.hs │ └── Exts │ │ ├── Build.hs │ │ ├── Comments.hs │ │ ├── ExactPrint.hs │ │ ├── ExtScheme.hs │ │ ├── Extension.hs │ │ ├── Fixity.hs │ │ ├── InternalLexer.hs │ │ ├── InternalParser.ly │ │ ├── Lexer.hs │ │ ├── ParseMonad.hs │ │ ├── ParseSyntax.hs │ │ ├── ParseUtils.hs │ │ ├── Parser.hs │ │ ├── Pretty.hs │ │ ├── SrcLoc.hs │ │ └── Syntax.hs │ └── Preprocessor │ └── Unlit.hs └── tests ├── Extensions.hs ├── Runner.hs └── examples ├── AmbiguousFixities.hs ├── AmbiguousFixities.hs.exactprinter.golden ├── AmbiguousFixities.hs.parser.golden ├── AmbiguousFixities.hs.prettyparser.golden ├── AmbiguousFixities.hs.prettyprinter.golden ├── ArityMismatch.hs ├── ArityMismatch.hs.exactprinter.golden ├── ArityMismatch.hs.parser.golden ├── ArityMismatch.hs.prettyparser.golden ├── ArityMismatch.hs.prettyprinter.golden ├── ArrowBrackets.hs ├── ArrowBrackets.hs.exactprinter.golden ├── ArrowBrackets.hs.parser.golden ├── ArrowBrackets.hs.prettyparser.golden ├── ArrowBrackets.hs.prettyprinter.golden ├── ArrowLayout.hs ├── ArrowLayout.hs.exactprinter.golden ├── ArrowLayout.hs.parser.golden ├── ArrowLayout.hs.prettyparser.golden ├── ArrowLayout.hs.prettyprinter.golden ├── AtOperator.hs ├── AtOperator.hs.exactprinter.golden ├── AtOperator.hs.parser.golden ├── AtOperator.hs.prettyparser.golden ├── AtOperator.hs.prettyprinter.golden ├── AtSign.hs ├── AtSign.hs.exactprinter.golden ├── AtSign.hs.parser.golden ├── AtSign.hs.prettyparser.golden ├── AtSign.hs.prettyprinter.golden ├── Attributes.hs ├── Attributes.hs.exactprinter.golden ├── Attributes.hs.parser.golden ├── Attributes.hs.prettyparser.golden ├── Attributes.hs.prettyprinter.golden ├── BadStringLineBreak.hs ├── BadStringLineBreak.hs.exactprinter.golden ├── BadStringLineBreak.hs.parser.golden ├── BadStringLineBreak.hs.prettyparser.golden ├── BadStringLineBreak.hs.prettyprinter.golden ├── BangPatterns.hs ├── BangPatterns.hs.exactprinter.golden ├── BangPatterns.hs.parser.golden ├── BangPatterns.hs.prettyparser.golden ├── BangPatterns.hs.prettyprinter.golden ├── BangViewPat.hs ├── BangViewPat.hs.exactprinter.golden ├── BangViewPat.hs.parser.golden ├── BangViewPat.hs.prettyparser.golden ├── BangViewPat.hs.prettyprinter.golden ├── BinaryLiteralsBad.hs ├── BinaryLiteralsBad.hs.exactprinter.golden ├── BinaryLiteralsBad.hs.parser.golden ├── BinaryLiteralsBad.hs.prettyparser.golden ├── BinaryLiteralsBad.hs.prettyprinter.golden ├── BinaryLiteralsGood.hs ├── BinaryLiteralsGood.hs.exactprinter.golden ├── BinaryLiteralsGood.hs.parser.golden ├── BinaryLiteralsGood.hs.prettyparser.golden ├── BinaryLiteralsGood.hs.prettyprinter.golden ├── BlockArguments.hs ├── BlockArguments.hs.exactprinter.golden ├── BlockArguments.hs.parser.golden ├── BlockArguments.hs.prettyparser.golden ├── BlockArguments.hs.prettyprinter.golden ├── BracketInstanceHead.hs ├── BracketInstanceHead.hs.exactprinter.golden ├── BracketInstanceHead.hs.parser.golden ├── BracketInstanceHead.hs.prettyparser.golden ├── BracketInstanceHead.hs.prettyprinter.golden ├── Bug.hs ├── Bug.hs.exactprinter.golden ├── Bug.hs.parser.golden ├── Bug.hs.prettyparser.golden ├── Bug.hs.prettyprinter.golden ├── Bundles.hs ├── Bundles.hs.exactprinter.golden ├── Bundles.hs.parser.golden ├── Bundles.hs.prettyparser.golden ├── Bundles.hs.prettyprinter.golden ├── ByteStringUtils.hs ├── ByteStringUtils.hs.exactprinter.golden ├── ByteStringUtils.hs.parser.golden ├── ByteStringUtils.hs.prettyparser.golden ├── ByteStringUtils.hs.prettyprinter.golden ├── CApiFFI.hs ├── CApiFFI.hs.exactprinter.golden ├── CApiFFI.hs.parser.golden ├── CApiFFI.hs.prettyparser.golden ├── CApiFFI.hs.prettyprinter.golden ├── CStyleLinePragmas.hs ├── CStyleLinePragmas.hs.exactprinter.golden ├── CStyleLinePragmas.hs.parser.golden ├── CStyleLinePragmas.hs.prettyparser.golden ├── CStyleLinePragmas.hs.prettyprinter.golden ├── ClassContext.hs ├── ClassContext.hs.exactprinter.golden ├── ClassContext.hs.parser.golden ├── ClassContext.hs.prettyparser.golden ├── ClassContext.hs.prettyprinter.golden ├── ClassDeclSrcSpan.hs ├── ClassDeclSrcSpan.hs.exactprinter.golden ├── ClassDeclSrcSpan.hs.parser.golden ├── ClassDeclSrcSpan.hs.prettyparser.golden ├── ClassDeclSrcSpan.hs.prettyprinter.golden ├── ClassInstType.hs ├── ClassInstType.hs.exactprinter.golden ├── ClassInstType.hs.parser.golden ├── ClassInstType.hs.prettyparser.golden ├── ClassInstType.hs.prettyprinter.golden ├── ClosedTypeFamily.hs ├── ClosedTypeFamily.hs.exactprinter.golden ├── ClosedTypeFamily.hs.parser.golden ├── ClosedTypeFamily.hs.prettyparser.golden ├── ClosedTypeFamily.hs.prettyprinter.golden ├── Completesig03A.hs ├── Completesig03A.hs.exactprinter.golden ├── Completesig03A.hs.parser.golden ├── Completesig03A.hs.prettyparser.golden ├── Completesig03A.hs.prettyprinter.golden ├── ConstraintKinds.hs ├── ConstraintKinds.hs.exactprinter.golden ├── ConstraintKinds.hs.parser.golden ├── ConstraintKinds.hs.prettyparser.golden ├── ConstraintKinds.hs.prettyprinter.golden ├── ConstraintKinds2.hs ├── ConstraintKinds2.hs.exactprinter.golden ├── ConstraintKinds2.hs.parser.golden ├── ConstraintKinds2.hs.prettyparser.golden ├── ConstraintKinds2.hs.prettyprinter.golden ├── ConstraintKinds3.hs ├── ConstraintKinds3.hs.exactprinter.golden ├── ConstraintKinds3.hs.parser.golden ├── ConstraintKinds3.hs.prettyparser.golden ├── ConstraintKinds3.hs.prettyprinter.golden ├── ConstructorAndClassOperators.hs ├── ConstructorAndClassOperators.hs.exactprinter.golden ├── ConstructorAndClassOperators.hs.parser.golden ├── ConstructorAndClassOperators.hs.prettyparser.golden ├── ConstructorAndClassOperators.hs.prettyprinter.golden ├── ContextOrdering.hs ├── ContextOrdering.hs.exactprinter.golden ├── ContextOrdering.hs.parser.golden ├── ContextOrdering.hs.prettyparser.golden ├── ContextOrdering.hs.prettyprinter.golden ├── CxtWhitespace.hs ├── CxtWhitespace.hs.exactprinter.golden ├── CxtWhitespace.hs.parser.golden ├── CxtWhitespace.hs.prettyparser.golden ├── CxtWhitespace.hs.prettyprinter.golden ├── DataHeadParen.hs ├── DataHeadParen.hs.exactprinter.golden ├── DataHeadParen.hs.parser.golden ├── DataHeadParen.hs.prettyparser.golden ├── DataHeadParen.hs.prettyprinter.golden ├── DataKinds.hs ├── DataKinds.hs.exactprinter.golden ├── DataKinds.hs.parser.golden ├── DataKinds.hs.prettyparser.golden ├── DataKinds.hs.prettyprinter.golden ├── DataKinds2.hs ├── DataKinds2.hs.exactprinter.golden ├── DataKinds2.hs.parser.golden ├── DataKinds2.hs.prettyparser.golden ├── DataKinds2.hs.prettyprinter.golden ├── DefaultSignatures.hs ├── DefaultSignatures.hs.exactprinter.golden ├── DefaultSignatures.hs.parser.golden ├── DefaultSignatures.hs.prettyparser.golden ├── DefaultSignatures.hs.prettyprinter.golden ├── DeriveGeneric.hs ├── DeriveGeneric.hs.exactprinter.golden ├── DeriveGeneric.hs.parser.golden ├── DeriveGeneric.hs.prettyparser.golden ├── DeriveGeneric.hs.prettyprinter.golden ├── DerivingParen.hs ├── DerivingParen.hs.exactprinter.golden ├── DerivingParen.hs.parser.golden ├── DerivingParen.hs.prettyparser.golden ├── DerivingParen.hs.prettyprinter.golden ├── DerivingStrategies.hs ├── DerivingStrategies.hs.exactprinter.golden ├── DerivingStrategies.hs.parser.golden ├── DerivingStrategies.hs.prettyparser.golden ├── DerivingStrategies.hs.prettyprinter.golden ├── DerivingVia.hs ├── DerivingVia.hs.exactprinter.golden ├── DerivingVia.hs.parser.golden ├── DerivingVia.hs.prettyparser.golden ├── DerivingVia.hs.prettyprinter.golden ├── DerivingVia2.hs ├── DerivingVia2.hs.exactprinter.golden ├── DerivingVia2.hs.parser.golden ├── DerivingVia2.hs.prettyparser.golden ├── DerivingVia2.hs.prettyprinter.golden ├── DerivingViaStealing.hs ├── DerivingViaStealing.hs.exactprinter.golden ├── DerivingViaStealing.hs.parser.golden ├── DerivingViaStealing.hs.prettyparser.golden ├── DerivingViaStealing.hs.prettyprinter.golden ├── Directory.hs ├── Directory.hs.exactprinter.golden ├── Directory.hs.parser.golden ├── Directory.hs.prettyparser.golden ├── Directory.hs.prettyprinter.golden ├── DoRec.hs ├── DoRec.hs.exactprinter.golden ├── DoRec.hs.parser.golden ├── DoRec.hs.prettyparser.golden ├── DoRec.hs.prettyprinter.golden ├── DoubleHashOp.hs ├── DoubleHashOp.hs.exactprinter.golden ├── DoubleHashOp.hs.parser.golden ├── DoubleHashOp.hs.prettyparser.golden ├── DoubleHashOp.hs.prettyprinter.golden ├── DsStrictData.hs ├── DsStrictData.hs.exactprinter.golden ├── DsStrictData.hs.parser.golden ├── DsStrictData.hs.prettyparser.golden ├── DsStrictData.hs.prettyprinter.golden ├── EmptyAnn.hs ├── EmptyAnn.hs.exactprinter.golden ├── EmptyAnn.hs.parser.golden ├── EmptyAnn.hs.prettyparser.golden ├── EmptyAnn.hs.prettyprinter.golden ├── EmptyCase.hs ├── EmptyCase.hs.exactprinter.golden ├── EmptyCase.hs.parser.golden ├── EmptyCase.hs.prettyparser.golden ├── EmptyCase.hs.prettyprinter.golden ├── EmptyContext.hs ├── EmptyContext.hs.exactprinter.golden ├── EmptyContext.hs.parser.golden ├── EmptyContext.hs.prettyparser.golden ├── EmptyContext.hs.prettyprinter.golden ├── EmptyFunDepPremise.hs ├── EmptyFunDepPremise.hs.exactprinter.golden ├── EmptyFunDepPremise.hs.parser.golden ├── EmptyFunDepPremise.hs.prettyparser.golden ├── EmptyFunDepPremise.hs.prettyprinter.golden ├── EmptyInstance.hs ├── EmptyInstance.hs.exactprinter.golden ├── EmptyInstance.hs.parser.golden ├── EmptyInstance.hs.prettyparser.golden ├── EmptyInstance.hs.prettyprinter.golden ├── EmptyList.hs ├── EmptyList.hs.exactprinter.golden ├── EmptyList.hs.parser.golden ├── EmptyList.hs.prettyparser.golden ├── EmptyList.hs.prettyprinter.golden ├── EmptyWhere.hs ├── EmptyWhere.hs.exactprinter.golden ├── EmptyWhere.hs.parser.golden ├── EmptyWhere.hs.prettyparser.golden ├── EmptyWhere.hs.prettyprinter.golden ├── EqualityConstraints1.hs ├── EqualityConstraints1.hs.exactprinter.golden ├── EqualityConstraints1.hs.parser.golden ├── EqualityConstraints1.hs.prettyparser.golden ├── EqualityConstraints1.hs.prettyprinter.golden ├── EqualityConstraints2.hs ├── EqualityConstraints2.hs.exactprinter.golden ├── EqualityConstraints2.hs.parser.golden ├── EqualityConstraints2.hs.prettyparser.golden ├── EqualityConstraints2.hs.prettyprinter.golden ├── ExplicitNamespaces1.hs ├── ExplicitNamespaces1.hs.exactprinter.golden ├── ExplicitNamespaces1.hs.parser.golden ├── ExplicitNamespaces1.hs.prettyparser.golden ├── ExplicitNamespaces1.hs.prettyprinter.golden ├── ExplicitNamespaces2.hs ├── ExplicitNamespaces2.hs.exactprinter.golden ├── ExplicitNamespaces2.hs.parser.golden ├── ExplicitNamespaces2.hs.prettyparser.golden ├── ExplicitNamespaces2.hs.prettyprinter.golden ├── ExplicitNamespaces3.hs ├── ExplicitNamespaces3.hs.exactprinter.golden ├── ExplicitNamespaces3.hs.parser.golden ├── ExplicitNamespaces3.hs.prettyparser.golden ├── ExplicitNamespaces3.hs.prettyprinter.golden ├── ExplicitNamespaces4.hs ├── ExplicitNamespaces4.hs.exactprinter.golden ├── ExplicitNamespaces4.hs.parser.golden ├── ExplicitNamespaces4.hs.prettyparser.golden ├── ExplicitNamespaces4.hs.prettyprinter.golden ├── ExprHole.hs ├── ExprHole.hs.exactprinter.golden ├── ExprHole.hs.parser.golden ├── ExprHole.hs.prettyparser.golden ├── ExprHole.hs.prettyprinter.golden ├── ExtraEndBrace.hs ├── ExtraEndBrace.hs.exactprinter.golden ├── ExtraEndBrace.hs.parser.golden ├── ExtraEndBrace.hs.prettyparser.golden ├── ExtraEndBrace.hs.prettyprinter.golden ├── ExtraPrettyParentheses.hs ├── ExtraPrettyParentheses.hs.exactprinter.golden ├── ExtraPrettyParentheses.hs.parser.golden ├── ExtraPrettyParentheses.hs.prettyparser.golden ├── ExtraPrettyParentheses.hs.prettyprinter.golden ├── FFIExtensions.hs ├── FFIExtensions.hs.exactprinter.golden ├── FFIExtensions.hs.parser.golden ├── FFIExtensions.hs.prettyparser.golden ├── FFIExtensions.hs.prettyprinter.golden ├── FFIInterruptible.hs ├── FFIInterruptible.hs.exactprinter.golden ├── FFIInterruptible.hs.parser.golden ├── FFIInterruptible.hs.prettyparser.golden ├── FFIInterruptible.hs.prettyprinter.golden ├── FamilyKindSig.hs ├── FamilyKindSig.hs.exactprinter.golden ├── FamilyKindSig.hs.parser.golden ├── FamilyKindSig.hs.prettyparser.golden ├── FamilyKindSig.hs.prettyprinter.golden ├── FamilyVarid.hs ├── FamilyVarid.hs.exactprinter.golden ├── FamilyVarid.hs.parser.golden ├── FamilyVarid.hs.prettyparser.golden ├── FamilyVarid.hs.prettyprinter.golden ├── Fixity2.hs ├── Fixity2.hs.exactprinter.golden ├── Fixity2.hs.parser.golden ├── Fixity2.hs.prettyparser.golden ├── Fixity2.hs.prettyprinter.golden ├── Fixity3.hs ├── Fixity3.hs.exactprinter.golden ├── Fixity3.hs.parser.golden ├── Fixity3.hs.prettyparser.golden ├── Fixity3.hs.prettyprinter.golden ├── FixityTests.hs ├── FixityTests.hs.exactprinter.golden ├── FixityTests.hs.parser.golden ├── FixityTests.hs.prettyparser.golden ├── FixityTests.hs.prettyprinter.golden ├── FlexibleContextsWithoutVars.hs ├── FlexibleContextsWithoutVars.hs.exactprinter.golden ├── FlexibleContextsWithoutVars.hs.parser.golden ├── FlexibleContextsWithoutVars.hs.prettyparser.golden ├── FlexibleContextsWithoutVars.hs.prettyprinter.golden ├── ForallInInstance.hs ├── ForallInInstance.hs.exactprinter.golden ├── ForallInInstance.hs.parser.golden ├── ForallInInstance.hs.prettyparser.golden ├── ForallInInstance.hs.prettyprinter.golden ├── ForeignImport.hs ├── ForeignImport.hs.exactprinter.golden ├── ForeignImport.hs.parser.golden ├── ForeignImport.hs.prettyparser.golden ├── ForeignImport.hs.prettyprinter.golden ├── ForeignImportJavascript.hs ├── ForeignImportJavascript.hs.exactprinter.golden ├── ForeignImportJavascript.hs.parser.golden ├── ForeignImportJavascript.hs.prettyparser.golden ├── ForeignImportJavascript.hs.prettyprinter.golden ├── GADTRecord.hs ├── GADTRecord.hs.exactprinter.golden ├── GADTRecord.hs.parser.golden ├── GADTRecord.hs.prettyparser.golden ├── GADTRecord.hs.prettyprinter.golden ├── GADTRecord2.hs ├── GADTRecord2.hs.exactprinter.golden ├── GADTRecord2.hs.parser.golden ├── GADTRecord2.hs.prettyparser.golden ├── GADTRecord2.hs.prettyprinter.golden ├── GadtDeriving.hs ├── GadtDeriving.hs.exactprinter.golden ├── GadtDeriving.hs.parser.golden ├── GadtDeriving.hs.prettyparser.golden ├── GadtDeriving.hs.prettyprinter.golden ├── GadtRecordFields.hs ├── GadtRecordFields.hs.exactprinter.golden ├── GadtRecordFields.hs.parser.golden ├── GadtRecordFields.hs.prettyparser.golden ├── GadtRecordFields.hs.prettyprinter.golden ├── GadtStrictness.hs ├── GadtStrictness.hs.exactprinter.golden ├── GadtStrictness.hs.parser.golden ├── GadtStrictness.hs.prettyparser.golden ├── GadtStrictness.hs.prettyprinter.golden ├── GenericTree.hs ├── GenericTree.hs.exactprinter.golden ├── GenericTree.hs.parser.golden ├── GenericTree.hs.prettyparser.golden ├── GenericTree.hs.prettyprinter.golden ├── GhcDeriving.hs ├── GhcDeriving.hs.exactprinter.golden ├── GhcDeriving.hs.parser.golden ├── GhcDeriving.hs.prettyparser.golden ├── GhcDeriving.hs.prettyprinter.golden ├── GroupKeyword.hs ├── GroupKeyword.hs.exactprinter.golden ├── GroupKeyword.hs.parser.golden ├── GroupKeyword.hs.prettyparser.golden ├── GroupKeyword.hs.prettyprinter.golden ├── HaddockComments.hs ├── HaddockComments.hs.comments.golden ├── HaddockComments.hs.exactprinter.golden ├── HaddockComments.hs.parser.golden ├── HaddockComments.hs.prettyparser.golden ├── HaddockComments.hs.prettyprinter.golden ├── HappyDoAction.hs ├── HappyDoAction.hs.exactprinter.golden ├── HappyDoAction.hs.parser.golden ├── HappyDoAction.hs.prettyparser.golden ├── HappyDoAction.hs.prettyprinter.golden ├── HashOperator.hs ├── HashOperator.hs.exactprinter.golden ├── HashOperator.hs.parser.golden ├── HashOperator.hs.prettyparser.golden ├── HashOperator.hs.prettyprinter.golden ├── HaskellParser.hs ├── HaskellParser.hs.exactprinter.golden ├── HaskellParser.hs.parser.golden ├── HaskellParser.hs.prettyparser.golden ├── HaskellParser.hs.prettyprinter.golden ├── HexPrec.hs ├── HexPrec.hs.exactprinter.golden ├── HexPrec.hs.parser.golden ├── HexPrec.hs.prettyparser.golden ├── HexPrec.hs.prettyprinter.golden ├── IfThenElseLayout.hs ├── IfThenElseLayout.hs.exactprinter.golden ├── IfThenElseLayout.hs.parser.golden ├── IfThenElseLayout.hs.prettyparser.golden ├── IfThenElseLayout.hs.prettyprinter.golden ├── IllDataTypeDecl.hs ├── IllDataTypeDecl.hs.exactprinter.golden ├── IllDataTypeDecl.hs.parser.golden ├── IllDataTypeDecl.hs.prettyparser.golden ├── IllDataTypeDecl.hs.prettyprinter.golden ├── ImplicitWhereBlocks.hs ├── ImplicitWhereBlocks.hs.exactprinter.golden ├── ImplicitWhereBlocks.hs.parser.golden ├── ImplicitWhereBlocks.hs.prettyparser.golden ├── ImplicitWhereBlocks.hs.prettyprinter.golden ├── IndentedModule1.hs ├── IndentedModule1.hs.exactprinter.golden ├── IndentedModule1.hs.parser.golden ├── IndentedModule1.hs.prettyparser.golden ├── IndentedModule1.hs.prettyprinter.golden ├── IndentedModule2.hs ├── IndentedModule2.hs.exactprinter.golden ├── IndentedModule2.hs.parser.golden ├── IndentedModule2.hs.prettyparser.golden ├── IndentedModule2.hs.prettyprinter.golden ├── IndentedTopLevelWhere.hs ├── IndentedTopLevelWhere.hs.exactprinter.golden ├── IndentedTopLevelWhere.hs.parser.golden ├── IndentedTopLevelWhere.hs.prettyparser.golden ├── IndentedTopLevelWhere.hs.prettyprinter.golden ├── IndentedWhere.hs ├── IndentedWhere.hs.exactprinter.golden ├── IndentedWhere.hs.parser.golden ├── IndentedWhere.hs.prettyparser.golden ├── IndentedWhere.hs.prettyprinter.golden ├── IndentedWhereBlock.hs ├── IndentedWhereBlock.hs.exactprinter.golden ├── IndentedWhereBlock.hs.parser.golden ├── IndentedWhereBlock.hs.prettyparser.golden ├── IndentedWhereBlock.hs.prettyprinter.golden ├── InfixApp.hs ├── InfixApp.hs.exactprinter.golden ├── InfixApp.hs.parser.golden ├── InfixApp.hs.prettyparser.golden ├── InfixApp.hs.prettyprinter.golden ├── InfixBang.hs ├── InfixBang.hs.exactprinter.golden ├── InfixBang.hs.parser.golden ├── InfixBang.hs.prettyparser.golden ├── InfixBang.hs.prettyprinter.golden ├── InfixFunBind.hs ├── InfixFunBind.hs.exactprinter.golden ├── InfixFunBind.hs.parser.golden ├── InfixFunBind.hs.prettyparser.golden ├── InfixFunBind.hs.prettyprinter.golden ├── InfixParser.hs ├── InfixParser.hs.exactprinter.golden ├── InfixParser.hs.parser.golden ├── InfixParser.hs.prettyparser.golden ├── InfixParser.hs.prettyprinter.golden ├── InfixTypeMinus.hs ├── InfixTypeMinus.hs.exactprinter.golden ├── InfixTypeMinus.hs.parser.golden ├── InfixTypeMinus.hs.prettyparser.golden ├── InfixTypeMinus.hs.prettyprinter.golden ├── InjectiveTypeFamilies.hs ├── InjectiveTypeFamilies.hs.exactprinter.golden ├── InjectiveTypeFamilies.hs.parser.golden ├── InjectiveTypeFamilies.hs.prettyparser.golden ├── InjectiveTypeFamilies.hs.prettyprinter.golden ├── InlineConlike.hs ├── InlineConlike.hs.exactprinter.golden ├── InlineConlike.hs.parser.golden ├── InlineConlike.hs.prettyparser.golden ├── InlineConlike.hs.prettyprinter.golden ├── InstanceSigs.hs ├── InstanceSigs.hs.exactprinter.golden ├── InstanceSigs.hs.parser.golden ├── InstanceSigs.hs.prettyparser.golden ├── InstanceSigs.hs.prettyprinter.golden ├── LambdaCase.hs ├── LambdaCase.hs.exactprinter.golden ├── LambdaCase.hs.parser.golden ├── LambdaCase.hs.prettyparser.golden ├── LambdaCase.hs.prettyprinter.golden ├── LanguagePragma.hs ├── LanguagePragma.hs.exactprinter.golden ├── LanguagePragma.hs.parser.golden ├── LanguagePragma.hs.prettyparser.golden ├── LanguagePragma.hs.prettyprinter.golden ├── Lib.hs ├── Lib.hs.exactprinter.golden ├── Lib.hs.parser.golden ├── Lib.hs.prettyparser.golden ├── Lib.hs.prettyprinter.golden ├── LineOptionsPragma.hs ├── LineOptionsPragma.hs.exactprinter.golden ├── LineOptionsPragma.hs.parser.golden ├── LineOptionsPragma.hs.prettyparser.golden ├── LineOptionsPragma.hs.prettyprinter.golden ├── List2.hs ├── List2.hs.exactprinter.golden ├── List2.hs.parser.golden ├── List2.hs.prettyparser.golden ├── List2.hs.prettyprinter.golden ├── MagicHashN.hs ├── MagicHashN.hs.exactprinter.golden ├── MagicHashN.hs.parser.golden ├── MagicHashN.hs.prettyparser.golden ├── MagicHashN.hs.prettyprinter.golden ├── MagicHashUnboxedTuples.hs ├── MagicHashUnboxedTuples.hs.exactprinter.golden ├── MagicHashUnboxedTuples.hs.parser.golden ├── MagicHashUnboxedTuples.hs.prettyparser.golden ├── MagicHashUnboxedTuples.hs.prettyprinter.golden ├── MinimalPragma.hs ├── MinimalPragma.hs.exactprinter.golden ├── MinimalPragma.hs.parser.golden ├── MinimalPragma.hs.prettyparser.golden ├── MinimalPragma.hs.prettyprinter.golden ├── MultiCtxt.hs ├── MultiCtxt.hs.exactprinter.golden ├── MultiCtxt.hs.parser.golden ├── MultiCtxt.hs.prettyparser.golden ├── MultiCtxt.hs.prettyprinter.golden ├── MultiLinePragma.hs ├── MultiLinePragma.hs.exactprinter.golden ├── MultiLinePragma.hs.parser.golden ├── MultiLinePragma.hs.prettyparser.golden ├── MultiLinePragma.hs.prettyprinter.golden ├── MultiParam.hs ├── MultiParam.hs.exactprinter.golden ├── MultiParam.hs.parser.golden ├── MultiParam.hs.prettyparser.golden ├── MultiParam.hs.prettyprinter.golden ├── MultiWayIf.hs ├── MultiWayIf.hs.exactprinter.golden ├── MultiWayIf.hs.parser.golden ├── MultiWayIf.hs.prettyparser.golden ├── MultiWayIf.hs.prettyprinter.golden ├── NPlusK.hs ├── NPlusK.hs.exactprinter.golden ├── NPlusK.hs.parser.golden ├── NPlusK.hs.prettyparser.golden ├── NPlusK.hs.prettyprinter.golden ├── NegPrimWordLiteral.hs ├── NegPrimWordLiteral.hs.exactprinter.golden ├── NegPrimWordLiteral.hs.parser.golden ├── NegPrimWordLiteral.hs.prettyparser.golden ├── NegPrimWordLiteral.hs.prettyprinter.golden ├── NegativePatterns.hs ├── NegativePatterns.hs.exactprinter.golden ├── NegativePatterns.hs.parser.golden ├── NegativePatterns.hs.prettyparser.golden ├── NegativePatterns.hs.prettyprinter.golden ├── NestedAsPat.hs ├── NestedAsPat.hs.exactprinter.golden ├── NestedAsPat.hs.parser.golden ├── NestedAsPat.hs.prettyparser.golden ├── NestedAsPat.hs.prettyprinter.golden ├── NoStartNumIdents.hs ├── NoStartNumIdents.hs.exactprinter.golden ├── NoStartNumIdents.hs.parser.golden ├── NoStartNumIdents.hs.prettyparser.golden ├── NoStartNumIdents.hs.prettyprinter.golden ├── NonDecreasing.hs ├── NonDecreasing.hs.exactprinter.golden ├── NonDecreasing.hs.parser.golden ├── NonDecreasing.hs.prettyparser.golden ├── NonDecreasing.hs.prettyprinter.golden ├── Nounpack2.hs ├── Nounpack2.hs.exactprinter.golden ├── Nounpack2.hs.parser.golden ├── Nounpack2.hs.prettyparser.golden ├── Nounpack2.hs.prettyprinter.golden ├── OptionsPragma.hs ├── OptionsPragma.hs.exactprinter.golden ├── OptionsPragma.hs.parser.golden ├── OptionsPragma.hs.prettyparser.golden ├── OptionsPragma.hs.prettyprinter.golden ├── Overlapable.hs ├── Overlapable.hs.exactprinter.golden ├── Overlapable.hs.parser.golden ├── Overlapable.hs.prettyparser.golden ├── Overlapable.hs.prettyprinter.golden ├── Overlapping.hs ├── Overlapping.hs.exactprinter.golden ├── Overlapping.hs.parser.golden ├── Overlapping.hs.prettyparser.golden ├── Overlapping.hs.prettyprinter.golden ├── OverloadedLabels.hs ├── OverloadedLabels.hs.exactprinter.golden ├── OverloadedLabels.hs.parser.golden ├── OverloadedLabels.hs.prettyparser.golden ├── OverloadedLabels.hs.prettyprinter.golden ├── PackageImports.hs ├── PackageImports.hs.exactprinter.golden ├── PackageImports.hs.parser.golden ├── PackageImports.hs.prettyparser.golden ├── PackageImports.hs.prettyprinter.golden ├── PackageImportsMissing.hs ├── PackageImportsMissing.hs.exactprinter.golden ├── PackageImportsMissing.hs.parser.golden ├── PackageImportsMissing.hs.prettyparser.golden ├── PackageImportsMissing.hs.prettyprinter.golden ├── ParallelArrays.hs ├── ParallelArrays.hs.exactprinter.golden ├── ParallelArrays.hs.parser.golden ├── ParallelArrays.hs.prettyparser.golden ├── ParallelArrays.hs.prettyprinter.golden ├── ParallelArrays2.hs ├── ParallelArrays2.hs.exactprinter.golden ├── ParallelArrays2.hs.parser.golden ├── ParallelArrays2.hs.prettyparser.golden ├── ParallelArrays2.hs.prettyprinter.golden ├── ParallelListComp.hs ├── ParallelListComp.hs.exactprinter.golden ├── ParallelListComp.hs.parser.golden ├── ParallelListComp.hs.prettyparser.golden ├── ParallelListComp.hs.prettyprinter.golden ├── ParenFunBind.hs ├── ParenFunBind.hs.exactprinter.golden ├── ParenFunBind.hs.parser.golden ├── ParenFunBind.hs.prettyparser.golden ├── ParenFunBind.hs.prettyprinter.golden ├── PartialSignatures.hs ├── PartialSignatures.hs.exactprinter.golden ├── PartialSignatures.hs.parser.golden ├── PartialSignatures.hs.prettyparser.golden ├── PartialSignatures.hs.prettyprinter.golden ├── PatSynFix.hs ├── PatSynFix.hs.exactprinter.golden ├── PatSynFix.hs.parser.golden ├── PatSynFix.hs.prettyparser.golden ├── PatSynFix.hs.prettyprinter.golden ├── PatternSplice.hs ├── PatternSplice.hs.exactprinter.golden ├── PatternSplice.hs.parser.golden ├── PatternSplice.hs.prettyparser.golden ├── PatternSplice.hs.prettyprinter.golden ├── PatternSynonymImport.hs ├── PatternSynonymImport.hs.exactprinter.golden ├── PatternSynonymImport.hs.parser.golden ├── PatternSynonymImport.hs.prettyparser.golden ├── PatternSynonymImport.hs.prettyprinter.golden ├── PatternSynonymSignatures.hs ├── PatternSynonymSignatures.hs.exactprinter.golden ├── PatternSynonymSignatures.hs.parser.golden ├── PatternSynonymSignatures.hs.prettyparser.golden ├── PatternSynonymSignatures.hs.prettyprinter.golden ├── PatternSynonyms.hs ├── PatternSynonyms.hs.exactprinter.golden ├── PatternSynonyms.hs.parser.golden ├── PatternSynonyms.hs.prettyparser.golden ├── PatternSynonyms.hs.prettyprinter.golden ├── PatternSynonyms2.hs ├── PatternSynonyms2.hs.exactprinter.golden ├── PatternSynonyms2.hs.parser.golden ├── PatternSynonyms2.hs.prettyparser.golden ├── PatternSynonyms2.hs.prettyprinter.golden ├── PatternSynonyms3.hs ├── PatternSynonyms3.hs.exactprinter.golden ├── PatternSynonyms3.hs.parser.golden ├── PatternSynonyms3.hs.prettyparser.golden ├── PatternSynonyms3.hs.prettyprinter.golden ├── PolyKindSigs.hs ├── PolyKindSigs.hs.exactprinter.golden ├── PolyKindSigs.hs.parser.golden ├── PolyKindSigs.hs.prettyparser.golden ├── PolyKindSigs.hs.prettyprinter.golden ├── PolyKinds.hs ├── PolyKinds.hs.exactprinter.golden ├── PolyKinds.hs.parser.golden ├── PolyKinds.hs.prettyparser.golden ├── PolyKinds.hs.prettyprinter.golden ├── Ppr048.hs ├── Ppr048.hs.exactprinter.golden ├── Ppr048.hs.parser.golden ├── Ppr048.hs.prettyparser.golden ├── Ppr048.hs.prettyprinter.golden ├── PrimitiveIntHexLiteral.hs ├── PrimitiveIntHexLiteral.hs.exactprinter.golden ├── PrimitiveIntHexLiteral.hs.parser.golden ├── PrimitiveIntHexLiteral.hs.prettyparser.golden ├── PrimitiveIntHexLiteral.hs.prettyprinter.golden ├── QQType.hs ├── QQType.hs.exactprinter.golden ├── QQType.hs.parser.golden ├── QQType.hs.prettyparser.golden ├── QQType.hs.prettyprinter.golden ├── QualifiedDot.hs ├── QualifiedDot.hs.exactprinter.golden ├── QualifiedDot.hs.parser.golden ├── QualifiedDot.hs.prettyparser.golden ├── QualifiedDot.hs.prettyprinter.golden ├── QualifiedQQuote.hs ├── QualifiedQQuote.hs.exactprinter.golden ├── QualifiedQQuote.hs.parser.golden ├── QualifiedQQuote.hs.prettyparser.golden ├── QualifiedQQuote.hs.prettyprinter.golden ├── QualifiedRecordfieldPuns.hs ├── QualifiedRecordfieldPuns.hs.exactprinter.golden ├── QualifiedRecordfieldPuns.hs.parser.golden ├── QualifiedRecordfieldPuns.hs.prettyparser.golden ├── QualifiedRecordfieldPuns.hs.prettyprinter.golden ├── QuantifiedConstraints.hs ├── QuantifiedConstraints.hs.exactprinter.golden ├── QuantifiedConstraints.hs.parser.golden ├── QuantifiedConstraints.hs.prettyparser.golden ├── QuantifiedConstraints.hs.prettyprinter.golden ├── QuasiQuoteLines.hs ├── QuasiQuoteLines.hs.exactprinter.golden ├── QuasiQuoteLines.hs.parser.golden ├── QuasiQuoteLines.hs.prettyparser.golden ├── QuasiQuoteLines.hs.prettyprinter.golden ├── QuasiQuoteOld.hs ├── QuasiQuoteOld.hs.exactprinter.golden ├── QuasiQuoteOld.hs.parser.golden ├── QuasiQuoteOld.hs.prettyparser.golden ├── QuasiQuoteOld.hs.prettyprinter.golden ├── QuasiQuoteQual2.hs ├── QuasiQuoteQual2.hs.exactprinter.golden ├── QuasiQuoteQual2.hs.parser.golden ├── QuasiQuoteQual2.hs.prettyparser.golden ├── QuasiQuoteQual2.hs.prettyprinter.golden ├── QuasiQuoteSplice.hs ├── QuasiQuoteSplice.hs.exactprinter.golden ├── QuasiQuoteSplice.hs.parser.golden ├── QuasiQuoteSplice.hs.prettyparser.golden ├── QuasiQuoteSplice.hs.prettyprinter.golden ├── QuasiQuoteToplevel.hs ├── QuasiQuoteToplevel.hs.exactprinter.golden ├── QuasiQuoteToplevel.hs.parser.golden ├── QuasiQuoteToplevel.hs.prettyparser.golden ├── QuasiQuoteToplevel.hs.prettyprinter.golden ├── QuasiQuoteUnit.hs ├── QuasiQuoteUnit.hs.exactprinter.golden ├── QuasiQuoteUnit.hs.parser.golden ├── QuasiQuoteUnit.hs.prettyparser.golden ├── QuasiQuoteUnit.hs.prettyprinter.golden ├── RCategory.hs ├── RCategory.hs.exactprinter.golden ├── RCategory.hs.parser.golden ├── RCategory.hs.prettyparser.golden ├── RCategory.hs.prettyprinter.golden ├── RCategory2.hs ├── RCategory2.hs.exactprinter.golden ├── RCategory2.hs.parser.golden ├── RCategory2.hs.prettyparser.golden ├── RCategory2.hs.prettyprinter.golden ├── RCategory3.hs ├── RCategory3.hs.exactprinter.golden ├── RCategory3.hs.parser.golden ├── RCategory3.hs.prettyparser.golden ├── RCategory3.hs.prettyprinter.golden ├── ReadP.hs ├── ReadP.hs.exactprinter.golden ├── ReadP.hs.parser.golden ├── ReadP.hs.prettyparser.golden ├── ReadP.hs.prettyprinter.golden ├── RealGHC.lhs ├── RealGHC.lhs.exactprinter.golden ├── RealGHC.lhs.parser.golden ├── RealGHC.lhs.prettyparser.golden ├── RealGHC.lhs.prettyprinter.golden ├── RecordInfixSelector.hs ├── RecordInfixSelector.hs.exactprinter.golden ├── RecordInfixSelector.hs.parser.golden ├── RecordInfixSelector.hs.prettyparser.golden ├── RecordInfixSelector.hs.prettyprinter.golden ├── RecordPatternSynonyms.hs ├── RecordPatternSynonyms.hs.exactprinter.golden ├── RecordPatternSynonyms.hs.parser.golden ├── RecordPatternSynonyms.hs.prettyparser.golden ├── RecordPatternSynonyms.hs.prettyprinter.golden ├── RecordPuns.hs ├── RecordPuns.hs.exactprinter.golden ├── RecordPuns.hs.parser.golden ├── RecordPuns.hs.prettyparser.golden ├── RecordPuns.hs.prettyprinter.golden ├── RecordWildcard.hs ├── RecordWildcard.hs.exactprinter.golden ├── RecordWildcard.hs.parser.golden ├── RecordWildcard.hs.prettyparser.golden ├── RecordWildcard.hs.prettyprinter.golden ├── RecordWildcardError.hs ├── RecordWildcardError.hs.exactprinter.golden ├── RecordWildcardError.hs.parser.golden ├── RecordWildcardError.hs.prettyparser.golden ├── RecordWildcardError.hs.prettyprinter.golden ├── RecursiveDo.hs ├── RecursiveDo.hs.exactprinter.golden ├── RecursiveDo.hs.parser.golden ├── RecursiveDo.hs.prettyparser.golden ├── RecursiveDo.hs.prettyprinter.golden ├── RegularPatterns.hs ├── RegularPatterns.hs.exactprinter.golden ├── RegularPatterns.hs.parser.golden ├── RegularPatterns.hs.prettyparser.golden ├── RegularPatterns.hs.prettyprinter.golden ├── RelaxedDo.hs ├── RelaxedDo.hs.exactprinter.golden ├── RelaxedDo.hs.parser.golden ├── RelaxedDo.hs.prettyparser.golden ├── RelaxedDo.hs.prettyprinter.golden ├── RoleAnnotations.hs ├── RoleAnnotations.hs.exactprinter.golden ├── RoleAnnotations.hs.parser.golden ├── RoleAnnotations.hs.prettyparser.golden ├── RoleAnnotations.hs.prettyprinter.golden ├── RoleAnnotations2.hs ├── RoleAnnotations2.hs.exactprinter.golden ├── RoleAnnotations2.hs.parser.golden ├── RoleAnnotations2.hs.prettyparser.golden ├── RoleAnnotations2.hs.prettyprinter.golden ├── Rules.hs ├── Rules.hs.exactprinter.golden ├── Rules.hs.parser.golden ├── Rules.hs.prettyparser.golden ├── Rules.hs.prettyprinter.golden ├── SCCPragmas.hs ├── SCCPragmas.hs.exactprinter.golden ├── SCCPragmas.hs.parser.golden ├── SCCPragmas.hs.prettyparser.golden ├── SCCPragmas.hs.prettyprinter.golden ├── SafeImports1.hs ├── SafeImports1.hs.exactprinter.golden ├── SafeImports1.hs.parser.golden ├── SafeImports1.hs.prettyparser.golden ├── SafeImports1.hs.prettyprinter.golden ├── SafeImports2.hs ├── SafeImports2.hs.exactprinter.golden ├── SafeImports2.hs.parser.golden ├── SafeImports2.hs.prettyparser.golden ├── SafeImports2.hs.prettyprinter.golden ├── SafeImports3.hs ├── SafeImports3.hs.exactprinter.golden ├── SafeImports3.hs.parser.golden ├── SafeImports3.hs.prettyparser.golden ├── SafeImports3.hs.prettyprinter.golden ├── ScopedTypeVariables.hs ├── ScopedTypeVariables.hs.exactprinter.golden ├── ScopedTypeVariables.hs.parser.golden ├── ScopedTypeVariables.hs.prettyparser.golden ├── ScopedTypeVariables.hs.prettyprinter.golden ├── SimpleDeriving.hs ├── SimpleDeriving.hs.exactprinter.golden ├── SimpleDeriving.hs.parser.golden ├── SimpleDeriving.hs.prettyparser.golden ├── SimpleDeriving.hs.prettyprinter.golden ├── SingleClassAsst.hs ├── SingleClassAsst.hs.exactprinter.golden ├── SingleClassAsst.hs.parser.golden ├── SingleClassAsst.hs.prettyparser.golden ├── SingleClassAsst.hs.prettyprinter.golden ├── SpecializeInstance.hs ├── SpecializeInstance.hs.exactprinter.golden ├── SpecializeInstance.hs.parser.golden ├── SpecializeInstance.hs.prettyparser.golden ├── SpecializeInstance.hs.prettyprinter.golden ├── SpecializePhaseControl.hs ├── SpecializePhaseControl.hs.exactprinter.golden ├── SpecializePhaseControl.hs.parser.golden ├── SpecializePhaseControl.hs.prettyparser.golden ├── SpecializePhaseControl.hs.prettyprinter.golden ├── StarInType.hs ├── StarInType.hs.exactprinter.golden ├── StarInType.hs.parser.golden ├── StarInType.hs.prettyparser.golden ├── StarInType.hs.prettyprinter.golden ├── T11727.hs ├── T11727.hs.exactprinter.golden ├── T11727.hs.parser.golden ├── T11727.hs.prettyparser.golden ├── T11727.hs.prettyprinter.golden ├── T13050.hs ├── T13050.hs.exactprinter.golden ├── T13050.hs.parser.golden ├── T13050.hs.prettyparser.golden ├── T13050.hs.prettyprinter.golden ├── THTSplices.hs ├── THTSplices.hs.exactprinter.golden ├── THTSplices.hs.parser.golden ├── THTSplices.hs.prettyparser.golden ├── THTSplices.hs.prettyprinter.golden ├── THTypedSplices.hs ├── THTypedSplices.hs.exactprinter.golden ├── THTypedSplices.hs.parser.golden ├── THTypedSplices.hs.prettyparser.golden ├── THTypedSplices.hs.prettyprinter.golden ├── THTypedSplices ├── Defs.hs ├── Defs.hs.exactprinter.golden ├── Defs.hs.parser.golden ├── Defs.hs.prettyparser.golden └── Defs.hs.prettyprinter.golden ├── THTypes.hs ├── THTypes.hs.exactprinter.golden ├── THTypes.hs.parser.golden ├── THTypes.hs.prettyparser.golden ├── THTypes.hs.prettyprinter.golden ├── TabWhitespace.hs ├── TabWhitespace.hs.exactprinter.golden ├── TabWhitespace.hs.parser.golden ├── TabWhitespace.hs.prettyparser.golden ├── TabWhitespace.hs.prettyprinter.golden ├── TemplateHaskellQuotedNames.hs ├── TemplateHaskellQuotedNames.hs.exactprinter.golden ├── TemplateHaskellQuotedNames.hs.parser.golden ├── TemplateHaskellQuotedNames.hs.prettyparser.golden ├── TemplateHaskellQuotedNames.hs.prettyprinter.golden ├── TensorTests.hs ├── TensorTests.hs.exactprinter.golden ├── TensorTests.hs.parser.golden ├── TensorTests.hs.prettyparser.golden ├── TensorTests.hs.prettyprinter.golden ├── Testing.hs ├── Testing.hs.exactprinter.golden ├── Testing.hs.parser.golden ├── Testing.hs.prettyparser.golden ├── Testing.hs.prettyprinter.golden ├── TrailingWhere.hs ├── TrailingWhere.hs.exactprinter.golden ├── TrailingWhere.hs.parser.golden ├── TrailingWhere.hs.prettyparser.golden ├── TrailingWhere.hs.prettyprinter.golden ├── TrailingWhere2.hs ├── TrailingWhere2.hs.exactprinter.golden ├── TrailingWhere2.hs.parser.golden ├── TrailingWhere2.hs.prettyparser.golden ├── TrailingWhere2.hs.prettyprinter.golden ├── TrailingWhere3.hs ├── TrailingWhere3.hs.exactprinter.golden ├── TrailingWhere3.hs.parser.golden ├── TrailingWhere3.hs.prettyparser.golden ├── TrailingWhere3.hs.prettyprinter.golden ├── TupleSections.hs ├── TupleSections.hs.exactprinter.golden ├── TupleSections.hs.parser.golden ├── TupleSections.hs.prettyparser.golden ├── TupleSections.hs.prettyprinter.golden ├── TyQuasiQuote.hs ├── TyQuasiQuote.hs.exactprinter.golden ├── TyQuasiQuote.hs.parser.golden ├── TyQuasiQuote.hs.prettyparser.golden ├── TyQuasiQuote.hs.prettyprinter.golden ├── TySplice.hs ├── TySplice.hs.exactprinter.golden ├── TySplice.hs.parser.golden ├── TySplice.hs.prettyparser.golden ├── TySplice.hs.prettyprinter.golden ├── TySplice2.hs ├── TySplice2.hs.exactprinter.golden ├── TySplice2.hs.parser.golden ├── TySplice2.hs.prettyparser.golden ├── TySplice2.hs.prettyprinter.golden ├── TySplice3.hs ├── TySplice3.hs.exactprinter.golden ├── TySplice3.hs.parser.golden ├── TySplice3.hs.prettyparser.golden ├── TySplice3.hs.prettyprinter.golden ├── TySplice4.hs ├── TySplice4.hs.exactprinter.golden ├── TySplice4.hs.parser.golden ├── TySplice4.hs.prettyparser.golden ├── TySplice4.hs.prettyprinter.golden ├── TypeEqualityParen.hs ├── TypeEqualityParen.hs.exactprinter.golden ├── TypeEqualityParen.hs.parser.golden ├── TypeEqualityParen.hs.prettyparser.golden ├── TypeEqualityParen.hs.prettyprinter.golden ├── TypeErrorMessage.hs ├── TypeErrorMessage.hs.exactprinter.golden ├── TypeErrorMessage.hs.parser.golden ├── TypeErrorMessage.hs.prettyparser.golden ├── TypeErrorMessage.hs.prettyprinter.golden ├── TypeFunctions.hs ├── TypeFunctions.hs.exactprinter.golden ├── TypeFunctions.hs.parser.golden ├── TypeFunctions.hs.prettyparser.golden ├── TypeFunctions.hs.prettyprinter.golden ├── TypeInstances.hs ├── TypeInstances.hs.exactprinter.golden ├── TypeInstances.hs.parser.golden ├── TypeInstances.hs.prettyparser.golden ├── TypeInstances.hs.prettyprinter.golden ├── TypeListCons.hs ├── TypeListCons.hs.exactprinter.golden ├── TypeListCons.hs.parser.golden ├── TypeListCons.hs.prettyparser.golden ├── TypeListCons.hs.prettyprinter.golden ├── TypeOperatorAsVariable.hs ├── TypeOperatorAsVariable.hs.exactprinter.golden ├── TypeOperatorAsVariable.hs.parser.golden ├── TypeOperatorAsVariable.hs.prettyparser.golden ├── TypeOperatorAsVariable.hs.prettyprinter.golden ├── TypeOperatorsTest.hs ├── TypeOperatorsTest.hs.exactprinter.golden ├── TypeOperatorsTest.hs.parser.golden ├── TypeOperatorsTest.hs.prettyparser.golden ├── TypeOperatorsTest.hs.prettyprinter.golden ├── UnboxedSingleton.hs ├── UnboxedSingleton.hs.exactprinter.golden ├── UnboxedSingleton.hs.parser.golden ├── UnboxedSingleton.hs.prettyparser.golden ├── UnboxedSingleton.hs.prettyprinter.golden ├── UnboxedTuples.hs ├── UnboxedTuples.hs.exactprinter.golden ├── UnboxedTuples.hs.parser.golden ├── UnboxedTuples.hs.prettyparser.golden ├── UnboxedTuples.hs.prettyprinter.golden ├── Unicode.hs ├── Unicode.hs.exactprinter.golden ├── Unicode.hs.parser.golden ├── Unicode.hs.prettyparser.golden ├── Unicode.hs.prettyprinter.golden ├── Unicode2.hs ├── Unicode2.hs.exactprinter.golden ├── Unicode2.hs.parser.golden ├── Unicode2.hs.prettyparser.golden ├── Unicode2.hs.prettyprinter.golden ├── UnicodeArrow.hs ├── UnicodeArrow.hs.exactprinter.golden ├── UnicodeArrow.hs.parser.golden ├── UnicodeArrow.hs.prettyparser.golden ├── UnicodeArrow.hs.prettyprinter.golden ├── UnicodeIdents.hs ├── UnicodeIdents.hs.exactprinter.golden ├── UnicodeIdents.hs.parser.golden ├── UnicodeIdents.hs.prettyparser.golden ├── UnicodeIdents.hs.prettyprinter.golden ├── UnicodeRelation.hs ├── UnicodeRelation.hs.exactprinter.golden ├── UnicodeRelation.hs.parser.golden ├── UnicodeRelation.hs.prettyparser.golden ├── UnicodeRelation.hs.prettyprinter.golden ├── UnicodeSubscript.hs ├── UnicodeSubscript.hs.exactprinter.golden ├── UnicodeSubscript.hs.parser.golden ├── UnicodeSubscript.hs.prettyparser.golden ├── UnicodeSubscript.hs.prettyprinter.golden ├── UnicodeSuperscript.hs ├── UnicodeSuperscript.hs.exactprinter.golden ├── UnicodeSuperscript.hs.parser.golden ├── UnicodeSuperscript.hs.prettyparser.golden ├── UnicodeSuperscript.hs.prettyprinter.golden ├── UnicodeSyntax.hs ├── UnicodeSyntax.hs.exactprinter.golden ├── UnicodeSyntax.hs.parser.golden ├── UnicodeSyntax.hs.prettyparser.golden ├── UnicodeSyntax.hs.prettyprinter.golden ├── UnindentedPragmaClose.hs ├── UnindentedPragmaClose.hs.exactprinter.golden ├── UnindentedPragmaClose.hs.parser.golden ├── UnindentedPragmaClose.hs.prettyparser.golden ├── UnindentedPragmaClose.hs.prettyprinter.golden ├── Unpack.hs ├── Unpack.hs.exactprinter.golden ├── Unpack.hs.parser.golden ├── Unpack.hs.prettyparser.golden ├── Unpack.hs.prettyprinter.golden ├── ViewPatterns.hs ├── ViewPatterns.hs.exactprinter.golden ├── ViewPatterns.hs.parser.golden ├── ViewPatterns.hs.prettyparser.golden ├── ViewPatterns.hs.prettyprinter.golden ├── Vta1.hs ├── Vta1.hs.exactprinter.golden ├── Vta1.hs.parser.golden ├── Vta1.hs.prettyparser.golden ├── Vta1.hs.prettyprinter.golden ├── Vta2.hs ├── Vta2.hs.exactprinter.golden ├── Vta2.hs.parser.golden ├── Vta2.hs.prettyparser.golden ├── Vta2.hs.prettyprinter.golden ├── WhereBlock.hs ├── WhereBlock.hs.exactprinter.golden ├── WhereBlock.hs.parser.golden ├── WhereBlock.hs.prettyparser.golden ├── WhereBlock.hs.prettyprinter.golden ├── WildcardTyFam.hs ├── WildcardTyFam.hs.exactprinter.golden ├── WildcardTyFam.hs.parser.golden ├── WildcardTyFam.hs.prettyparser.golden ├── WildcardTyFam.hs.prettyprinter.golden ├── brackets.hs ├── brackets.hs.exactprinter.golden ├── brackets.hs.parser.golden ├── brackets.hs.prettyparser.golden ├── brackets.hs.prettyprinter.golden ├── completesig01.hs ├── completesig01.hs.exactprinter.golden ├── completesig01.hs.parser.golden ├── completesig01.hs.prettyparser.golden ├── completesig01.hs.prettyprinter.golden ├── t403.hs ├── t403.hs.exactprinter.golden ├── t403.hs.parser.golden ├── t403.hs.prettyparser.golden ├── t403.hs.prettyprinter.golden ├── t412.hs ├── t412.hs.exactprinter.golden ├── t412.hs.parser.golden ├── t412.hs.prettyparser.golden └── t412.hs.prettyprinter.golden /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.golden -text 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /dist/ 2 | /dist-newstyle/ 3 | .stack-work/ 4 | *.out 5 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /tests/examples/AmbiguousFixities.hs: -------------------------------------------------------------------------------- 1 | f = (+ 1) . head &&& tail 2 | -------------------------------------------------------------------------------- /tests/examples/AmbiguousFixities.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "" (-1) (-1)) "Ambiguous infix expression" 2 | -------------------------------------------------------------------------------- /tests/examples/AmbiguousFixities.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "" (-1) (-1)) "Ambiguous infix expression" 2 | -------------------------------------------------------------------------------- /tests/examples/AmbiguousFixities.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "" (-1) (-1)) "Ambiguous infix expression" 2 | -------------------------------------------------------------------------------- /tests/examples/AmbiguousFixities.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "" (-1) (-1)) "Ambiguous infix expression" 2 | -------------------------------------------------------------------------------- /tests/examples/ArityMismatch.hs: -------------------------------------------------------------------------------- 1 | module ArityMismatch where 2 | 3 | foo a b = 1 4 | foo a = 2 5 | 6 | bar = 1 7 | baz = 2 8 | -------------------------------------------------------------------------------- /tests/examples/ArityMismatch.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ArityMismatch.hs" 3 1) "arity mismatch for 'foo'" 2 | -------------------------------------------------------------------------------- /tests/examples/ArityMismatch.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/ArityMismatch.hs" 3 1) 3 | "arity mismatch for 'foo'" 4 | -------------------------------------------------------------------------------- /tests/examples/ArityMismatch.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ArityMismatch.hs" 3 1) "arity mismatch for 'foo'" 2 | -------------------------------------------------------------------------------- /tests/examples/ArityMismatch.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ArityMismatch.hs" 3 1) "arity mismatch for 'foo'" 2 | -------------------------------------------------------------------------------- /tests/examples/ArrowBrackets.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Arrows #-} 2 | module ArrowBrackets where 3 | 4 | foo = proc (x, y) -> (| f (g -< x) |) y 5 | 6 | bar = proc (x, y) -> do 7 | z <- (| f (g -< x) |) y 8 | (| f (h -< z) |) y 9 | -------------------------------------------------------------------------------- /tests/examples/ArrowBrackets.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ArrowBrackets.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ArrowBrackets.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Arrows #-} 2 | module ArrowBrackets where 3 | foo = proc (x, y) -> (| f (g -< x) |) y 4 | bar 5 | = proc (x, y) -> 6 | do z <- (| f (g -< x) |) y 7 | (| f (h -< z) |) y 8 | -------------------------------------------------------------------------------- /tests/examples/ArrowLayout.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Arrows #-} 2 | module ArrowLayout where 3 | 4 | exp = proc () -> do 5 | rec let e = 1 + i 6 | i <- integral -< e 7 | returnA -< e 8 | -------------------------------------------------------------------------------- /tests/examples/ArrowLayout.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ArrowLayout.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ArrowLayout.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Arrows #-} 2 | module ArrowLayout where 3 | exp 4 | = proc () -> 5 | do rec let e = 1 + i 6 | i <- integral -< e 7 | returnA -< e 8 | -------------------------------------------------------------------------------- /tests/examples/AtOperator.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeApplications #-} 2 | {-# LANGUAGE TypeOperators #-} 3 | 4 | data a :+: b = Proxy 5 | 6 | foo = id @(Int :+: Int) 7 | 8 | _ @> m = m 9 | -------------------------------------------------------------------------------- /tests/examples/AtOperator.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/AtOperator.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/AtOperator.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeApplications #-} 2 | {-# LANGUAGE TypeOperators #-} 3 | 4 | data a :+: b = Proxy 5 | foo = id @(Int :+: Int) 6 | _ @> m = m 7 | -------------------------------------------------------------------------------- /tests/examples/AtSign.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/AtSign.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Attributes.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Attributes.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BadStringLineBreak.hs: -------------------------------------------------------------------------------- 1 | module BadStringLineBreak where 2 | 3 | main = print $ "hello" ++ "world 4 | -- any random junk that goes here gets added onto the character count 5 | -- and the quote ends it with some garbage " 6 | -------------------------------------------------------------------------------- /tests/examples/BadStringLineBreak.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/BadStringLineBreak.hs" 3 27) "Improperly terminated string" 2 | -------------------------------------------------------------------------------- /tests/examples/BadStringLineBreak.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/BadStringLineBreak.hs" 3 27) 3 | "Improperly terminated string" 4 | -------------------------------------------------------------------------------- /tests/examples/BadStringLineBreak.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/BadStringLineBreak.hs" 3 27) "Improperly terminated string" 2 | -------------------------------------------------------------------------------- /tests/examples/BadStringLineBreak.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/BadStringLineBreak.hs" 3 27) "Improperly terminated string" 2 | -------------------------------------------------------------------------------- /tests/examples/BangPatterns.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | module BangPatterns where 3 | 4 | firstnonspace :: Ptr Word8 -> Int -> Int -> IO Int 5 | firstnonspace !ptr !n !m 6 | | n >= m = return n 7 | | otherwise = do w <- peekElemOff ptr n 8 | if isSpaceWord8 w then firstnonspace ptr (n+1) m else return n 9 | -------------------------------------------------------------------------------- /tests/examples/BangPatterns.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BangPatterns.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BangPatterns.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | module BangPatterns where 3 | 4 | firstnonspace :: Ptr Word8 -> Int -> Int -> IO Int 5 | firstnonspace !ptr !n !m 6 | | n >= m = return n 7 | | otherwise = 8 | do w <- peekElemOff ptr n 9 | if isSpaceWord8 w then firstnonspace ptr (n + 1) m else return n 10 | -------------------------------------------------------------------------------- /tests/examples/BangViewPat.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns, ViewPatterns #-} 2 | someFun (id -> !arg) = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/BangViewPat.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BangViewPat.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BangViewPat.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns, ViewPatterns #-} 2 | someFun (id -> !arg) = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/BinaryLiteralsBad.hs: -------------------------------------------------------------------------------- 1 | -- Missing binary literals extension. Should fail. 2 | f :: Int -> () 3 | f 0b0 = () 4 | f _ = () 5 | -------------------------------------------------------------------------------- /tests/examples/BinaryLiteralsBad.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/BinaryLiteralsBad.hs" 3 1) "arity mismatch for 'f'" 2 | -------------------------------------------------------------------------------- /tests/examples/BinaryLiteralsBad.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/BinaryLiteralsBad.hs" 3 1) 3 | "arity mismatch for 'f'" 4 | -------------------------------------------------------------------------------- /tests/examples/BinaryLiteralsBad.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/BinaryLiteralsBad.hs" 3 1) "arity mismatch for 'f'" 2 | -------------------------------------------------------------------------------- /tests/examples/BinaryLiteralsBad.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/BinaryLiteralsBad.hs" 3 1) "arity mismatch for 'f'" 2 | -------------------------------------------------------------------------------- /tests/examples/BinaryLiteralsGood.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BlockArguments.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BracketInstanceHead.hs: -------------------------------------------------------------------------------- 1 | instance (Bounded a => Bounded [a]) where 2 | -------------------------------------------------------------------------------- /tests/examples/BracketInstanceHead.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BracketInstanceHead.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/BracketInstanceHead.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | instance (Bounded a => Bounded [a]) where 2 | -------------------------------------------------------------------------------- /tests/examples/Bug.hs: -------------------------------------------------------------------------------- 1 | import Test.QuickCheck 2 | -- prop_susShortest = 2 > 1 ==> 1 /= 2 3 | -------------------------------------------------------------------------------- /tests/examples/Bug.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Bug.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Bug.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | import Test.QuickCheck 2 | -------------------------------------------------------------------------------- /tests/examples/Bundles.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | module Bundles(Foo(..), Baz(..,Q), Qux(F,..), Tux(Q,..,F)) where 3 | 4 | main = main 5 | -------------------------------------------------------------------------------- /tests/examples/Bundles.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Bundles.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Bundles.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | module Bundles (Foo(..), Baz(.., Q), Qux(F, ..), Tux(Q, .., F)) 3 | where 4 | main = main 5 | -------------------------------------------------------------------------------- /tests/examples/ByteStringUtils.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/CApiFFI.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CApiFFI #-} 2 | foo = capi 3 | 4 | -------------------------------------------------------------------------------- /tests/examples/CApiFFI.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/CApiFFI.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/CApiFFI.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CApiFFI #-} 2 | foo = capi 3 | -------------------------------------------------------------------------------- /tests/examples/CStyleLinePragmas.hs: -------------------------------------------------------------------------------- 1 | #line 1 "Main.hs" 2 | #line 2 "Main.hs" 3 | -------------------------------------------------------------------------------- /tests/examples/CStyleLinePragmas.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/CStyleLinePragmas.hs" 1 1) "Parse error: #" 2 | -------------------------------------------------------------------------------- /tests/examples/CStyleLinePragmas.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/CStyleLinePragmas.hs" 1 1) "Parse error: #" 3 | -------------------------------------------------------------------------------- /tests/examples/CStyleLinePragmas.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/CStyleLinePragmas.hs" 1 1) "Parse error: #" 2 | -------------------------------------------------------------------------------- /tests/examples/CStyleLinePragmas.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/CStyleLinePragmas.hs" 1 1) "Parse error: #" 2 | -------------------------------------------------------------------------------- /tests/examples/ClassContext.hs: -------------------------------------------------------------------------------- 1 | f :: Ord (i Int) => i Int -> i Int 2 | f = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/ClassContext.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClassContext.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClassContext.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | f :: Ord (i Int) => i Int -> i Int 2 | f = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/ClassDeclSrcSpan.hs: -------------------------------------------------------------------------------- 1 | 2 | class C1 a where 3 | toString :: a -> String 4 | 5 | t1 :: String 6 | t1 = "Hello" 7 | -------------------------------------------------------------------------------- /tests/examples/ClassDeclSrcSpan.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClassDeclSrcSpan.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClassDeclSrcSpan.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | class C1 a where 2 | toString :: a -> String 3 | 4 | t1 :: String 5 | t1 = "Hello" 6 | -------------------------------------------------------------------------------- /tests/examples/ClassInstType.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClassInstType.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClosedTypeFamily.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, DataKinds #-} 2 | 3 | module ClosedTypeFamily where 4 | 5 | type family Eq x y where 6 | Eq x x = True 7 | Eq x y = False 8 | 9 | -------------------------------------------------------------------------------- /tests/examples/ClosedTypeFamily.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClosedTypeFamily.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ClosedTypeFamily.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, DataKinds #-} 2 | module ClosedTypeFamily where 3 | 4 | type family Eq x y where 5 | Eq x x = True 6 | Eq x y = False 7 | -------------------------------------------------------------------------------- /tests/examples/Completesig03A.hs: -------------------------------------------------------------------------------- 1 | module Completesig03A where 2 | 3 | data A = A | B 4 | 5 | {-# COMPLETE A #-} 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/Completesig03A.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Completesig03A.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Completesig03A.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module Completesig03A where 2 | 3 | data A = A 4 | | B 5 | 6 | {-# COMPLETE A #-} 7 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | {-# LANGUAGE ConstraintKinds #-} 3 | {-# LANGUAGE MultiParamTypeClasses #-} 4 | class Foo a where 5 | 6 | data Bar a 7 | type Bazable a b = (Bar a ~ Maybe b) 8 | 9 | baz :: Bazable a b => a -> a 10 | baz = id 11 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | {-# LANGUAGE ConstraintKinds #-} 3 | {-# LANGUAGE MultiParamTypeClasses #-} 4 | 5 | class Foo a where 6 | 7 | data Bar a 8 | 9 | type Bazable a b = (Bar a ~ Maybe b) 10 | 11 | baz :: Bazable a b => a -> a 12 | baz = id 13 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | {-# LANGUAGE GADTs #-} 3 | {-# LANGUAGE RankNTypes #-} 4 | 5 | data Dict p where 6 | Dict :: p => Dict p 7 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | {-# LANGUAGE GADTs #-} 3 | {-# LANGUAGE RankNTypes #-} 4 | 5 | data Dict p where 6 | Dict :: p => Dict p 7 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds3.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | {-# LANGUAGE MultiParamTypeClasses #-} 3 | 4 | class Foo c a where 5 | 6 | bar :: (c a) => a -> a 7 | 8 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstraintKinds3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | {-# LANGUAGE MultiParamTypeClasses #-} 3 | 4 | class Foo c a where 5 | bar :: (c a) => a -> a 6 | -------------------------------------------------------------------------------- /tests/examples/ConstructorAndClassOperators.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, MultiParamTypeClasses #-} 2 | 3 | ins :: (:=>) b h => b :- h 4 | 5 | data (:><:) a b = (:><:) a b 6 | -------------------------------------------------------------------------------- /tests/examples/ConstructorAndClassOperators.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, MultiParamTypeClasses #-} 2 | 3 | ins :: (:=>) b h => b :- h 4 | 5 | data :><: a b = :><: a b 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/ConstructorAndClassOperators.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ConstructorAndClassOperators.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, MultiParamTypeClasses #-} 2 | 3 | ins :: (:=>) b h => b :- h 4 | 5 | data (:><:) a b = (:><:) a b 6 | -------------------------------------------------------------------------------- /tests/examples/ContextOrdering.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | module ContextOrdering where 3 | 4 | foo :: (x m a) => Int 5 | foo = 5 6 | -------------------------------------------------------------------------------- /tests/examples/ContextOrdering.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ContextOrdering.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ContextOrdering.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | module ContextOrdering where 3 | 4 | foo :: (x m a) => Int 5 | foo = 5 6 | -------------------------------------------------------------------------------- /tests/examples/CxtWhitespace.hs: -------------------------------------------------------------------------------- 1 | -- is not ok 2 | instance ( Eq h) => Eq h 3 | 4 | -- is ok 5 | instance ( Eq h, Eq h) => Eq h 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/CxtWhitespace.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/CxtWhitespace.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/CxtWhitespace.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | instance (Eq h) => Eq h 2 | 3 | instance (Eq h, Eq h) => Eq h 4 | -------------------------------------------------------------------------------- /tests/examples/DataHeadParen.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | module DataHeadParen where 3 | 4 | data (a1 :< a2) = Foo 5 | -------------------------------------------------------------------------------- /tests/examples/DataHeadParen.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DataHeadParen.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DataHeadParen.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | module DataHeadParen where 3 | 4 | data (a1 :< a2) = Foo 5 | -------------------------------------------------------------------------------- /tests/examples/DataKinds.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DataKinds.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DataKinds2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds #-} 2 | 3 | data Foo a = Foo 4 | 5 | type FooB = Foo "a" 6 | 7 | type FooC = Foo 1 8 | 9 | instance Show (Foo "bar") where 10 | -------------------------------------------------------------------------------- /tests/examples/DataKinds2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DataKinds2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DataKinds2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds #-} 2 | 3 | data Foo a = Foo 4 | 5 | type FooB = Foo "a" 6 | 7 | type FooC = Foo 1 8 | 9 | instance Show (Foo "bar") where 10 | -------------------------------------------------------------------------------- /tests/examples/DefaultSignatures.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DefaultSignatures #-} 2 | class C a where 3 | f :: a -> a -> Bool 4 | default f :: (Eq a) => a -> a -> Bool 5 | f x y = x == y 6 | -------------------------------------------------------------------------------- /tests/examples/DefaultSignatures.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DefaultSignatures.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DefaultSignatures.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DefaultSignatures #-} 2 | 3 | class C a where 4 | f :: a -> a -> Bool 5 | 6 | default f :: (Eq a) => a -> a -> Bool 7 | f x y = x == y 8 | -------------------------------------------------------------------------------- /tests/examples/DeriveGeneric.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveGeneric #-} 2 | 3 | data UserTree a = Node a (UserTree a) (UserTree a) | Leaf 4 | deriving Generic 5 | -------------------------------------------------------------------------------- /tests/examples/DeriveGeneric.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DeriveGeneric.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DeriveGeneric.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveGeneric #-} 2 | 3 | data UserTree a = Node a (UserTree a) (UserTree a) 4 | | Leaf 5 | deriving Generic 6 | -------------------------------------------------------------------------------- /tests/examples/DerivingParen.hs: -------------------------------------------------------------------------------- 1 | data X = X deriving Show 2 | data X = X deriving (Show) 3 | -------------------------------------------------------------------------------- /tests/examples/DerivingParen.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingParen.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingParen.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | data X = X deriving Show 2 | 3 | data X = X deriving (Show) 4 | -------------------------------------------------------------------------------- /tests/examples/DerivingStrategies.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingStrategies.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingVia.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingVia2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingViaStealing.hs: -------------------------------------------------------------------------------- 1 | module DerivingViaStealing where 2 | 3 | via = () 4 | stock = () 5 | anyclass = () 6 | -------------------------------------------------------------------------------- /tests/examples/DerivingViaStealing.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingViaStealing.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DerivingViaStealing.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module DerivingViaStealing where 2 | via = () 3 | stock = () 4 | anyclass = () 5 | -------------------------------------------------------------------------------- /tests/examples/Directory.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Directory.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DoRec.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DoRec #-} 2 | 3 | main = do rec let x = 1 4 | return () 5 | -------------------------------------------------------------------------------- /tests/examples/DoRec.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DoRec.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DoRec.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DoRec #-} 2 | main 3 | = do rec let x = 1 4 | return () 5 | -------------------------------------------------------------------------------- /tests/examples/DoubleHashOp.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | module DoubleHashOp where 3 | 4 | (##) :: a -> b -> Int 5 | a ## b = 0 6 | 7 | (#*) :: a -> b -> Int 8 | a #* b = 1 9 | 10 | -- This still does not work though: 11 | -- (#) :: a -> b -> Int 12 | -- a # b = 2 13 | -------------------------------------------------------------------------------- /tests/examples/DoubleHashOp.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DoubleHashOp.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DoubleHashOp.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | module DoubleHashOp where 3 | 4 | ( ## ) :: a -> b -> Int 5 | a ## b = 0 6 | 7 | ( #* ) :: a -> b -> Int 8 | a #* b = 1 9 | -------------------------------------------------------------------------------- /tests/examples/DsStrictData.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/DsStrictData.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyAnn.hs: -------------------------------------------------------------------------------- 1 | {-# ANN foo "Hlint: ignore Test4" #-} 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyAnn.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyAnn.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyAnn.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# ANN foo "Hlint: ignore Test4" #-} 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyCase.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE EmptyCase #-} 2 | {-# LANGUAGE LambdaCase #-} 3 | 4 | f x = case x of {} 5 | 6 | g x = \case {} 7 | -------------------------------------------------------------------------------- /tests/examples/EmptyCase.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyCase.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyCase.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE EmptyCase #-} 2 | {-# LANGUAGE LambdaCase #-} 3 | f x = case x of { } 4 | g x = \case { } 5 | -------------------------------------------------------------------------------- /tests/examples/EmptyContext.hs: -------------------------------------------------------------------------------- 1 | happyThen :: () => P a 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyContext.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyContext.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyContext.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | happyThen :: () => P a 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyFunDepPremise.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FunctionalDependencies #-} 2 | module EmptyFunDepPremise where 3 | 4 | class C a | -> a 5 | -------------------------------------------------------------------------------- /tests/examples/EmptyFunDepPremise.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyFunDepPremise.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyFunDepPremise.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FunctionalDependencies #-} 2 | module EmptyFunDepPremise where 3 | 4 | class C a | -> a 5 | -------------------------------------------------------------------------------- /tests/examples/EmptyInstance.hs: -------------------------------------------------------------------------------- 1 | instance Traversable Tree where 2 | 3 | x :: Int 4 | x = 1 5 | -------------------------------------------------------------------------------- /tests/examples/EmptyInstance.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyInstance.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyInstance.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | instance Traversable Tree where 2 | 3 | x :: Int 4 | x = 1 5 | -------------------------------------------------------------------------------- /tests/examples/EmptyList.hs: -------------------------------------------------------------------------------- 1 | module EmptyList where 2 | 3 | eAttrs = [] 4 | -------------------------------------------------------------------------------- /tests/examples/EmptyList.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyList.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyList.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module EmptyList where 2 | eAttrs = [] 3 | -------------------------------------------------------------------------------- /tests/examples/EmptyWhere.hs: -------------------------------------------------------------------------------- 1 | foo = 5 where 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyWhere.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyWhere.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EmptyWhere.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | foo = 5 2 | where 3 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints1.hs: -------------------------------------------------------------------------------- 1 | -- https://github.com/haskell-suite/haskell-src-exts/issues/91 2 | {-# LANGUAGE GADTs #-} 3 | 4 | one :: a ~ Int => a 5 | one = 1 6 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints1.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints1.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints1.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | one :: a ~ Int => a 4 | one = 1 5 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints2.hs: -------------------------------------------------------------------------------- 1 | one :: a ~ Int => a 2 | one = 1 3 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/EqualityConstraints2.hs" 1 19) "At least one of TypeFamilies or GADTs language extensions needs to be enabled. Please add: {-# LANGUAGE TypeFamilies #-} or {-# LANGUAGE GADTs #-} language pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints2.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/EqualityConstraints2.hs" 1 19) 3 | "At least one of TypeFamilies or GADTs language extensions needs to be enabled. Please add: {-# LANGUAGE TypeFamilies #-} or {-# LANGUAGE GADTs #-} language pragma at the top of your module." 4 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/EqualityConstraints2.hs" 1 19) "At least one of TypeFamilies or GADTs language extensions needs to be enabled. Please add: {-# LANGUAGE TypeFamilies #-} or {-# LANGUAGE GADTs #-} language pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/EqualityConstraints2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/EqualityConstraints2.hs" 1 19) "At least one of TypeFamilies or GADTs language extensions needs to be enabled. Please add: {-# LANGUAGE TypeFamilies #-} or {-# LANGUAGE GADTs #-} language pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces1.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | import Data.Array.Repa ( type (++) ) 3 | import Data.Array.Repa ( type {- comment here -} (++) ) 4 | import Data.Array.Repa ( type {- comment2 here -} (++) {- and here -} ) 5 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces1.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces1.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces1.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | import Data.Array.Repa (type (++)) 3 | import Data.Array.Repa (type (++)) 4 | import Data.Array.Repa (type (++)) 5 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | module ExplicitNamespaces2 ( f, type (++) ) where 3 | 4 | f = undefined 5 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | module ExplicitNamespaces2 (f, type (++)) where 3 | f = undefined 4 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces3.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | 3 | module Foo(type Str) where 4 | 5 | data Str = Str 6 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | module Foo (type Str) where 3 | 4 | data Str = Str 5 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces4.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | {-# LANGUAGE TypeOperators #-} 3 | module Foo (type (:-)) where 4 | 5 | data (:-) = Foo 6 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces4.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | {-# LANGUAGE TypeOperators #-} 3 | module Foo (type (:-)) where 4 | 5 | data :- = Foo 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces4.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExplicitNamespaces4.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitNamespaces #-} 2 | {-# LANGUAGE TypeOperators #-} 3 | module Foo (type (:-)) where 4 | 5 | data (:-) = Foo 6 | -------------------------------------------------------------------------------- /tests/examples/ExprHole.hs: -------------------------------------------------------------------------------- 1 | 2 | foo = _ 3 | 4 | foo = _ x 5 | 6 | foo = _ 7 | 8 | foo x = baz 9 | where 10 | foo _ = _ 11 | -------------------------------------------------------------------------------- /tests/examples/ExprHole.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExprHole.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExprHole.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | foo = _ 2 | foo = _ x 3 | foo = _ 4 | foo x = baz 5 | where foo _ = _ 6 | -------------------------------------------------------------------------------- /tests/examples/ExtraEndBrace.hs: -------------------------------------------------------------------------------- 1 | module ExtraEndBrace where 2 | 3 | data A = B {c :: D}} 4 | -------------------------------------------------------------------------------- /tests/examples/ExtraEndBrace.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ExtraEndBrace.hs" 3 20) "Unexpected }" 2 | -------------------------------------------------------------------------------- /tests/examples/ExtraEndBrace.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/ExtraEndBrace.hs" 3 20) "Unexpected }" 3 | -------------------------------------------------------------------------------- /tests/examples/ExtraEndBrace.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ExtraEndBrace.hs" 3 20) "Unexpected }" 2 | -------------------------------------------------------------------------------- /tests/examples/ExtraEndBrace.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ExtraEndBrace.hs" 3 20) "Unexpected }" 2 | -------------------------------------------------------------------------------- /tests/examples/ExtraPrettyParentheses.hs: -------------------------------------------------------------------------------- 1 | data Q a = Q a a 2 | 3 | -- In this example, the pretty-printer should insert extra parentheses around 4 | -- the negative literal pattern. 5 | x * - 1 = negate x 6 | 7 | -- In these examples, the pretty-printer should not insert extra parentheses. 8 | Just x <> Nothing = Just x 9 | f (- 1 `Q` _) = () 10 | -------------------------------------------------------------------------------- /tests/examples/ExtraPrettyParentheses.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ExtraPrettyParentheses.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | data Q a = Q a a 2 | x * (-1) = negate x 3 | Just x <> Nothing = Just x 4 | f (-1 `Q` _) = () 5 | -------------------------------------------------------------------------------- /tests/examples/FFIExtensions.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI, CApiFFI #-} 2 | module FFIExtensions where 3 | 4 | foreign import ccall interruptible 5 | "sleep" sleep :: CUint -> IO CUint 6 | 7 | foreign import capi "header.h f" f :: CInt -> IO CInt 8 | -------------------------------------------------------------------------------- /tests/examples/FFIExtensions.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FFIExtensions.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FFIExtensions.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI, CApiFFI 2 | #-} 3 | module FFIExtensions where 4 | 5 | foreign import ccall interruptible "sleep" sleep :: 6 | CUint -> IO CUint 7 | 8 | foreign import capi "header.h f" f :: CInt -> IO CInt 9 | -------------------------------------------------------------------------------- /tests/examples/FFIInterruptible.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE InterruptibleFFI #-} 2 | foo = interruptible 3 | 4 | -------------------------------------------------------------------------------- /tests/examples/FFIInterruptible.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FFIInterruptible.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FFIInterruptible.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE InterruptibleFFI #-} 2 | foo = interruptible 3 | -------------------------------------------------------------------------------- /tests/examples/FamilyKindSig.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | module FamilyKindSig where 3 | 4 | type family WithKindSig (a :: * -> *) 5 | -------------------------------------------------------------------------------- /tests/examples/FamilyKindSig.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FamilyKindSig.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FamilyKindSig.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | module FamilyKindSig where 3 | 4 | type family WithKindSig (a :: * -> *) 5 | -------------------------------------------------------------------------------- /tests/examples/FamilyVarid.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | module FamilyVarid where 3 | 4 | f family forall = undefined 5 | -------------------------------------------------------------------------------- /tests/examples/FamilyVarid.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FamilyVarid.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FamilyVarid.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | module FamilyVarid where 3 | f family forall = undefined 4 | -------------------------------------------------------------------------------- /tests/examples/Fixity2.hs: -------------------------------------------------------------------------------- 1 | foo = pure 1 <^> pure 2 <^> pure (+) where 2 | (<^>) = flip (<*>) 3 | infixr 4 <^> 4 | -------------------------------------------------------------------------------- /tests/examples/Fixity2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Fixity2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Fixity2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | foo = pure 1 <^> pure 2 <^> pure (+) 2 | where (<^>) = flip (<*>) 3 | 4 | infixr 4 <^> 5 | -------------------------------------------------------------------------------- /tests/examples/Fixity3.hs: -------------------------------------------------------------------------------- 1 | class Foo f where 2 | (<^>) :: Applicative f => f a -> f (a -> b) -> f b 3 | infixr 4 <^> 4 | 5 | foo = pure 1 <^> pure 2 <^> pure (+) 6 | -------------------------------------------------------------------------------- /tests/examples/Fixity3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Fixity3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Fixity3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | class Foo f where 2 | (<^>) :: Applicative f => f a -> f (a -> b) -> f b 3 | 4 | infixr 4 <^> 5 | foo = pure 1 <^> pure 2 <^> pure (+) 6 | -------------------------------------------------------------------------------- /tests/examples/FixityTests.hs: -------------------------------------------------------------------------------- 1 | main = forM_ cmdReports $ \x -> do 2 | putStrLn $ "Writing report to " ++ x ++ " ..." 3 | writeReport x ideas 4 | -------------------------------------------------------------------------------- /tests/examples/FixityTests.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FixityTests.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FixityTests.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | main 2 | = forM_ cmdReports $ 3 | \ x -> 4 | do putStrLn $ "Writing report to " ++ x ++ " ..." 5 | writeReport x ideas 6 | -------------------------------------------------------------------------------- /tests/examples/FlexibleContextsWithoutVars.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleContexts #-} 2 | f :: Log.Stack => a -> a 3 | f = id 4 | -------------------------------------------------------------------------------- /tests/examples/FlexibleContextsWithoutVars.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FlexibleContextsWithoutVars.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/FlexibleContextsWithoutVars.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleContexts #-} 2 | 3 | f :: Log.Stack => a -> a 4 | f = id 5 | -------------------------------------------------------------------------------- /tests/examples/ForallInInstance.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | module ForallInInstance where 3 | 4 | instance forall a. MyClass a => MyClass [a] where 5 | -------------------------------------------------------------------------------- /tests/examples/ForallInInstance.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ForallInInstance.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ForallInInstance.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | module ForallInInstance where 3 | 4 | instance forall a . MyClass a => MyClass [a] where 5 | -------------------------------------------------------------------------------- /tests/examples/ForeignImport.hs: -------------------------------------------------------------------------------- 1 | {- If compiled without ForeignFunctionInterface (part of Haskell2010), 2 | it complains not about FFI but about missing TemplateHaskell -} 3 | foreign import ccall unsafe "getProgArgv" 4 | getProgArgv :: Ptr CInt -> Ptr (Ptr CString) -> IO () 5 | -------------------------------------------------------------------------------- /tests/examples/ForeignImport.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ForeignImport.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ForeignImport.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | foreign import ccall unsafe "getProgArgv" getProgArgv :: 2 | Ptr CInt -> Ptr (Ptr CString) -> IO () 3 | -------------------------------------------------------------------------------- /tests/examples/ForeignImportJavascript.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE JavascriptFFI #-} 2 | 3 | foreign import javascript unsafe "somethingUseful_ = $1" 4 | js_set_somethingUseful :: JSFun a -> IO () 5 | -------------------------------------------------------------------------------- /tests/examples/ForeignImportJavascript.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ForeignImportJavascript.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ForeignImportJavascript.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE JavascriptFFI #-} 2 | 3 | foreign import javascript unsafe "somethingUseful_ = $1" 4 | js_set_somethingUseful :: JSFun a -> IO () 5 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data T where 4 | T :: { field :: Int } -> T 5 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data T where 4 | T :: {field :: Int} -> T 5 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data T where 4 | T :: () => { field :: Int } -> T 5 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GADTRecord2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data T where 4 | T :: () => {field :: Int} -> T 5 | -------------------------------------------------------------------------------- /tests/examples/GadtDeriving.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data Foo where 4 | Foo :: Int -> Foo 5 | deriving (Eq,Ord,Typeable) 6 | -------------------------------------------------------------------------------- /tests/examples/GadtDeriving.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GadtDeriving.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GadtDeriving.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data Foo where 4 | Foo :: Int -> Foo 5 | deriving (Eq, Ord, Typeable) 6 | -------------------------------------------------------------------------------- /tests/examples/GadtRecordFields.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data Ty where 4 | TCon :: { field1 :: Int, field2 :: Bool } -> Ty 5 | TCon2 :: Ty 6 | -------------------------------------------------------------------------------- /tests/examples/GadtRecordFields.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GadtRecordFields.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GadtRecordFields.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data Ty where 4 | TCon :: {field1 :: Int, field2 :: Bool} -> Ty 5 | TCon2 :: Ty 6 | -------------------------------------------------------------------------------- /tests/examples/GadtStrictness.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data X where 4 | X :: !Int -> X 5 | -------------------------------------------------------------------------------- /tests/examples/GadtStrictness.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GadtStrictness.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GadtStrictness.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data X where 4 | X :: !Int -> X 5 | -------------------------------------------------------------------------------- /tests/examples/GenericTree.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | module GenericTree where 3 | 4 | import Data.Typeable 5 | 6 | dynRep :: (Typeable a) => a -> (TypeRep, forall b. (Typeable b) => b -> (Maybe b)) 7 | dynRep a = (typeOf a, \_ -> cast a) 8 | -------------------------------------------------------------------------------- /tests/examples/GenericTree.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GenericTree.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GenericTree.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | module GenericTree where 3 | import Data.Typeable 4 | 5 | dynRep :: 6 | (Typeable a) => 7 | a -> (TypeRep, forall b . (Typeable b) => b -> (Maybe b)) 8 | dynRep a = (typeOf a, \ _ -> cast a) 9 | -------------------------------------------------------------------------------- /tests/examples/GhcDeriving.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | newtype CodeGenModule a = CGM (StateT CGMState IO a) 4 | deriving (Monad, MonadState [s], MonadIO) 5 | -------------------------------------------------------------------------------- /tests/examples/GhcDeriving.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GhcDeriving.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GhcDeriving.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | newtype CodeGenModule a = CGM (StateT CGMState IO a) 2 | deriving (Monad, MonadState [s], MonadIO) 3 | -------------------------------------------------------------------------------- /tests/examples/GroupKeyword.hs: -------------------------------------------------------------------------------- 1 | -- {-# LANGUAGE TransformListComp #-} 2 | module GroupKeyword where 3 | 4 | a = map head $ group $ sort [1..100] 5 | -------------------------------------------------------------------------------- /tests/examples/GroupKeyword.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GroupKeyword.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/GroupKeyword.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module GroupKeyword where 2 | a = map head $ group $ sort [1 .. 100] 3 | -------------------------------------------------------------------------------- /tests/examples/HaddockComments.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HaddockComments.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HappyDoAction.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HappyDoAction.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HashOperator.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedLabels #-} 2 | 3 | (#.) :: Int -> Int -> Int 4 | x #. y = x + y 5 | 6 | infixr 9 #. 7 | -------------------------------------------------------------------------------- /tests/examples/HashOperator.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HashOperator.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HashOperator.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedLabels #-} 2 | 3 | ( #. ) :: Int -> Int -> Int 4 | x #. y = x + y 5 | 6 | infixr 9 #. 7 | -------------------------------------------------------------------------------- /tests/examples/HaskellParser.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HaskellParser.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HexPrec.hs: -------------------------------------------------------------------------------- 1 | module HexPrec where 2 | 3 | (%%) :: Int -> Int -> Int 4 | a %% b = 0 5 | 6 | infixl 0x02 %% 7 | -------------------------------------------------------------------------------- /tests/examples/HexPrec.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | module HexPrec where 2 | 3 | (%%) :: Int -> Int -> Int 4 | a %% b = 0 5 | 6 | infixl 2 %% 7 | 8 | -------------------------------------------------------------------------------- /tests/examples/HexPrec.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/HexPrec.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module HexPrec where 2 | 3 | (%%) :: Int -> Int -> Int 4 | a %% b = 0 5 | 6 | infixl 2 %% 7 | -------------------------------------------------------------------------------- /tests/examples/IfThenElseLayout.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IfThenElseLayout.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IllDataTypeDecl.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | module IllDataTypeDecl where 3 | 4 | data (f :+: g) p = L 5 | -------------------------------------------------------------------------------- /tests/examples/IllDataTypeDecl.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IllDataTypeDecl.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IllDataTypeDecl.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | module IllDataTypeDecl where 3 | 4 | data (f :+: g) p = L 5 | -------------------------------------------------------------------------------- /tests/examples/ImplicitWhereBlocks.hs: -------------------------------------------------------------------------------- 1 | foo = x where x = 1 2 | z = 19 3 | 4 | 5 | y = 2 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/ImplicitWhereBlocks.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ImplicitWhereBlocks.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ImplicitWhereBlocks.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | foo = x 2 | where x = 1 3 | z = 19 4 | y = 2 5 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule1.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | module Main where 3 | main = putStr "foo" 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule1.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule1.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule1.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | module Main where 3 | main = putStr "foo" 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | {- -} module Main where 3 | main = putStr "foo" 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedModule2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | module Main where 3 | main = putStr "foo" 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedTopLevelWhere.hs: -------------------------------------------------------------------------------- 1 | module IndentedTopLevelWhere where 2 | 3 | foo :: Int 4 | foo = 5 where 5 | 6 | bar :: Int 7 | bar = 3 8 | -------------------------------------------------------------------------------- /tests/examples/IndentedTopLevelWhere.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/IndentedTopLevelWhere.hs" 8 1) "Parse error: virtual }" 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedTopLevelWhere.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/IndentedTopLevelWhere.hs" 8 1) 3 | "Parse error: virtual }" 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedTopLevelWhere.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/IndentedTopLevelWhere.hs" 8 1) "Parse error: virtual }" 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedTopLevelWhere.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/IndentedTopLevelWhere.hs" 8 1) "Parse error: virtual }" 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhere.hs: -------------------------------------------------------------------------------- 1 | 2 | f x = g 3 | where g :: Int 4 | g = 0 5 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhere.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhere.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhere.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | f x = g 2 | where g :: Int 3 | g = 0 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhereBlock.hs: -------------------------------------------------------------------------------- 1 | module Graph where 2 | 3 | countryLookUp :: String -> Graph -> Maybe Int 4 | countryLookUp country graph = indexOf country graph where 5 | 6 | indexOf :: String -> Graph -> Maybe Int 7 | indexOf _ Empty = Nothing 8 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhereBlock.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/IndentedWhereBlock.hs" 8 1) "Parse error: virtual }" 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhereBlock.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/IndentedWhereBlock.hs" 8 1) 3 | "Parse error: virtual }" 4 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhereBlock.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/IndentedWhereBlock.hs" 8 1) "Parse error: virtual }" 2 | -------------------------------------------------------------------------------- /tests/examples/IndentedWhereBlock.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/IndentedWhereBlock.hs" 8 1) "Parse error: virtual }" 2 | -------------------------------------------------------------------------------- /tests/examples/InfixApp.hs: -------------------------------------------------------------------------------- 1 | f = -w/2 2 | 3 | -------------------------------------------------------------------------------- /tests/examples/InfixApp.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixApp.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixApp.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | f = -w / 2 2 | -------------------------------------------------------------------------------- /tests/examples/InfixBang.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | 3 | (!) arr i = arr i 4 | -------------------------------------------------------------------------------- /tests/examples/InfixBang.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixBang.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixBang.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | (!) arr i = arr i 3 | -------------------------------------------------------------------------------- /tests/examples/InfixFunBind.hs: -------------------------------------------------------------------------------- 1 | left `first` _ = left 2 | -------------------------------------------------------------------------------- /tests/examples/InfixFunBind.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixFunBind.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixFunBind.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | left `first` _ = left 2 | -------------------------------------------------------------------------------- /tests/examples/InfixParser.hs: -------------------------------------------------------------------------------- 1 | module InfixParser where 2 | 3 | type Parse a b = [a] -> [(b, [a])] 4 | 5 | (<|>) :: Parse a b -> Parse a b -> Parse a b 6 | (p1 <|> p2) i = p1 i ++ p2 i 7 | -------------------------------------------------------------------------------- /tests/examples/InfixParser.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixParser.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixParser.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module InfixParser where 2 | 3 | type Parse a b = [a] -> [(b, [a])] 4 | 5 | (<|>) :: Parse a b -> Parse a b -> Parse a b 6 | (p1 <|> p2) i = p1 i ++ p2 i 7 | -------------------------------------------------------------------------------- /tests/examples/InfixTypeMinus.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InfixTypeMinus.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InjectiveTypeFamilies.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InjectiveTypeFamilies.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InlineConlike.hs: -------------------------------------------------------------------------------- 1 | {-# INLINE CONLIKE size #-} 2 | size :: Int 3 | size = 64 4 | -------------------------------------------------------------------------------- /tests/examples/InlineConlike.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InlineConlike.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InlineConlike.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# INLINE CONLIKE size #-} 2 | 3 | size :: Int 4 | size = 64 5 | -------------------------------------------------------------------------------- /tests/examples/InstanceSigs.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | {-# LANGUAGE InstanceSigs #-} 3 | {-# LANGUAGE TypeFamilies #-} 4 | 5 | instance SupportsDelta (Map k v) where 6 | type Delta (Map k v) = Map k v 7 | 8 | mkDelta :: Map k v -> Map k v -> Delta (Map k v) 9 | mkDelta = undefined 10 | -------------------------------------------------------------------------------- /tests/examples/InstanceSigs.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InstanceSigs.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/InstanceSigs.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | {-# LANGUAGE InstanceSigs #-} 3 | {-# LANGUAGE TypeFamilies #-} 4 | 5 | instance SupportsDelta (Map k v) where 6 | type Delta (Map k v) = Map k v 7 | 8 | mkDelta :: Map k v -> Map k v -> Delta (Map k v) 9 | mkDelta = undefined 10 | -------------------------------------------------------------------------------- /tests/examples/LambdaCase.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE LambdaCase #-} 2 | module LambdaCase where 3 | 4 | foo = \case 5 | Nothing -> e1 6 | Just e2 -> e2 7 | 8 | bar = \ case { _ -> True } 9 | -------------------------------------------------------------------------------- /tests/examples/LambdaCase.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LambdaCase.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LambdaCase.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE LambdaCase #-} 2 | module LambdaCase where 3 | foo 4 | = \case 5 | Nothing -> e1 6 | Just e2 -> e2 7 | bar 8 | = \case 9 | _ -> True 10 | -------------------------------------------------------------------------------- /tests/examples/LanguagePragma.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE 2 | RecordWildCards 3 | #-} 4 | main = print "hello" 5 | -------------------------------------------------------------------------------- /tests/examples/LanguagePragma.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LanguagePragma.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LanguagePragma.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecordWildCards #-} 2 | main = print "hello" 3 | -------------------------------------------------------------------------------- /tests/examples/Lib.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Lib.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LineOptionsPragma.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS #-} 2 | {-# LINE 49 "src/Language/C/Parser/Lexer.x" #-} 3 | module Fail where 4 | -------------------------------------------------------------------------------- /tests/examples/LineOptionsPragma.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LineOptionsPragma.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/LineOptionsPragma.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# OPTIONS #-} 2 | module Fail where 3 | -------------------------------------------------------------------------------- /tests/examples/List2.hs.exactprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/List2.hs.exactprinter.golden -------------------------------------------------------------------------------- /tests/examples/List2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/List2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/List2.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/MagicHashN.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | module MagicHashN where 3 | 4 | a# = 1 5 | b## = 2 6 | c### = 3 7 | main = print (a#, b##, c###) 8 | -------------------------------------------------------------------------------- /tests/examples/MagicHashN.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MagicHashN.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MagicHashN.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | module MagicHashN where 3 | a# = 1 4 | b## = 2 5 | c### = 3 6 | main = print (a#, b##, c###) 7 | -------------------------------------------------------------------------------- /tests/examples/MagicHashUnboxedTuples.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash, UnboxedTuples #-} 2 | module MagicHashUnboxedTuples where 3 | 4 | f (#x, y #) = (# a#, b #) where 5 | a# = a# 6 | b = b 7 | -------------------------------------------------------------------------------- /tests/examples/MagicHashUnboxedTuples.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MagicHashUnboxedTuples.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MagicHashUnboxedTuples.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash, UnboxedTuples #-} 2 | module MagicHashUnboxedTuples where 3 | f (# x, y #) = (# a#, b #) 4 | where a# = a# 5 | b = b 6 | -------------------------------------------------------------------------------- /tests/examples/MinimalPragma.hs: -------------------------------------------------------------------------------- 1 | class Eq a where 2 | (==) :: a -> a -> Bool 3 | (/=) :: a -> a -> Bool 4 | x == y = not (x /= y) 5 | x /= y = not (x == y) 6 | {-# MINIMAL (==) | (/=) #-} 7 | 8 | -------------------------------------------------------------------------------- /tests/examples/MinimalPragma.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MinimalPragma.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MinimalPragma.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | class Eq a where 2 | (==) :: a -> a -> Bool 3 | 4 | (/=) :: a -> a -> Bool 5 | x == y = not (x /= y) 6 | x /= y = not (x == y) 7 | 8 | {-# MINIMAL (==) | (/=) #-} 9 | -------------------------------------------------------------------------------- /tests/examples/MultiCtxt.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module MultiCtxt where 4 | 5 | multipleCtx :: Eq a => (Show a => a) 6 | multipleCtx = undefined 7 | -------------------------------------------------------------------------------- /tests/examples/MultiCtxt.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiCtxt.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiCtxt.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | module MultiCtxt where 3 | 4 | multipleCtx :: Eq a => (Show a => a) 5 | multipleCtx = undefined 6 | -------------------------------------------------------------------------------- /tests/examples/MultiLinePragma.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC 2 | -a 3 | -a 4 | -a 5 | -a 6 | -a 7 | -a 8 | -a 9 | -a 10 | -a 11 | -a 12 | -a #-} 13 | main :: IO () 14 | main = dat 15 | -------------------------------------------------------------------------------- /tests/examples/MultiLinePragma.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiLinePragma.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiLinePragma.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC 2 | -a 3 | -a 4 | -a 5 | -a 6 | -a 7 | -a 8 | -a 9 | -a 10 | -a 11 | -a 12 | -a #-} 13 | 14 | main :: IO () 15 | main = dat 16 | -------------------------------------------------------------------------------- /tests/examples/MultiParam.hs: -------------------------------------------------------------------------------- 1 | module MultiParam where 2 | 3 | foo :: MonadError e m => e -> m () 4 | foo = undefined 5 | -------------------------------------------------------------------------------- /tests/examples/MultiParam.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiParam.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiParam.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module MultiParam where 2 | 3 | foo :: MonadError e m => e -> m () 4 | foo = undefined 5 | -------------------------------------------------------------------------------- /tests/examples/MultiWayIf.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/MultiWayIf.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NPlusK.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NPlusKPatterns #-} 2 | 3 | f (n+3) = n 4 | -------------------------------------------------------------------------------- /tests/examples/NPlusK.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NPlusK.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NPlusK.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NPlusKPatterns #-} 2 | f (n + 3) = n 3 | -------------------------------------------------------------------------------- /tests/examples/NegPrimWordLiteral.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | dummyWord = W# (-0x8000000000000000##) 3 | -------------------------------------------------------------------------------- /tests/examples/NegPrimWordLiteral.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NegPrimWordLiteral.hs" 3 1) "Parse error: negative primitive word literal: - 9223372036854775808##" 2 | -------------------------------------------------------------------------------- /tests/examples/NegPrimWordLiteral.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/NegPrimWordLiteral.hs" 3 1) 3 | "Parse error: negative primitive word literal: - 9223372036854775808##" 4 | -------------------------------------------------------------------------------- /tests/examples/NegPrimWordLiteral.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NegPrimWordLiteral.hs" 3 1) "Parse error: negative primitive word literal: - 9223372036854775808##" 2 | -------------------------------------------------------------------------------- /tests/examples/NegPrimWordLiteral.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NegPrimWordLiteral.hs" 3 1) "Parse error: negative primitive word literal: - 9223372036854775808##" 2 | -------------------------------------------------------------------------------- /tests/examples/NegativePatterns.hs: -------------------------------------------------------------------------------- 1 | f 1 = -1 2 | f (-1) = 1 3 | f ( - 2) = 2 4 | f ( - 3) = 3 5 | 6 | data Z a = Higher a a | Same a a | Lower a a 7 | 8 | infixr 7 `Higher` 9 | infixr 6 `Same` 10 | infixr 5 `Lower` 11 | 12 | g :: Z Int -> () 13 | g ( -1 `Higher` x) = () 14 | g ( - 2 `Same` x) = () 15 | g ( - 3 `Lower` x) = () 16 | -------------------------------------------------------------------------------- /tests/examples/NegativePatterns.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NegativePatterns.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NegativePatterns.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | f 1 = -1 2 | f (-1) = 1 3 | f (-2) = 2 4 | f (-3) = 3 5 | 6 | data Z a = Higher a a 7 | | Same a a 8 | | Lower a a 9 | 10 | infixr 7 `Higher` 11 | 12 | infixr 6 `Same` 13 | 14 | infixr 5 `Lower` 15 | 16 | g :: Z Int -> () 17 | g (-1 `Higher` x) = () 18 | g (-2 `Same` x) = () 19 | g (-3 `Lower` x) = () 20 | -------------------------------------------------------------------------------- /tests/examples/NestedAsPat.hs: -------------------------------------------------------------------------------- 1 | module NestedAsPat where 2 | 3 | nestedAsPat [x@(Just _)] = undefined 4 | -------------------------------------------------------------------------------- /tests/examples/NestedAsPat.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NestedAsPat.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/NestedAsPat.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module NestedAsPat where 2 | nestedAsPat [x@(Just _)] = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/NoStartNumIdents.hs: -------------------------------------------------------------------------------- 1 | 1a = () 2 | -------------------------------------------------------------------------------- /tests/examples/NoStartNumIdents.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NoStartNumIdents.hs" 2 1) "Parse error in pattern: 1" 2 | -------------------------------------------------------------------------------- /tests/examples/NoStartNumIdents.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/NoStartNumIdents.hs" 2 1) 3 | "Parse error in pattern: 1" 4 | -------------------------------------------------------------------------------- /tests/examples/NoStartNumIdents.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NoStartNumIdents.hs" 2 1) "Parse error in pattern: 1" 2 | -------------------------------------------------------------------------------- /tests/examples/NoStartNumIdents.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NoStartNumIdents.hs" 2 1) "Parse error in pattern: 1" 2 | -------------------------------------------------------------------------------- /tests/examples/NonDecreasing.hs: -------------------------------------------------------------------------------- 1 | module NonDecreasing where 2 | 3 | -- This should not work unless NondecreasingIndentation is 4 | -- on (which is is by default in GHC) 5 | main = do 6 | print 16 7 | do 8 | print 17 9 | print 18 10 | -------------------------------------------------------------------------------- /tests/examples/NonDecreasing.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NonDecreasing.hs" 8 3) "Parse error: Last statement in a do-block must be an expression" 2 | -------------------------------------------------------------------------------- /tests/examples/NonDecreasing.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/NonDecreasing.hs" 8 3) 3 | "Parse error: Last statement in a do-block must be an expression" 4 | -------------------------------------------------------------------------------- /tests/examples/NonDecreasing.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NonDecreasing.hs" 8 3) "Parse error: Last statement in a do-block must be an expression" 2 | -------------------------------------------------------------------------------- /tests/examples/NonDecreasing.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/NonDecreasing.hs" 8 3) "Parse error: Last statement in a do-block must be an expression" 2 | -------------------------------------------------------------------------------- /tests/examples/Nounpack2.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | data Foo = Foo {-# NOUNPACK #-} Int 4 | -------------------------------------------------------------------------------- /tests/examples/Nounpack2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Nounpack2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Nounpack2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | data Foo = Foo {-# NOUNPACK #-} Int 2 | -------------------------------------------------------------------------------- /tests/examples/OptionsPragma.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS -fno-warn-orphans #-} 2 | 3 | -------------------------------------------------------------------------------- /tests/examples/OptionsPragma.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/OptionsPragma.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/OptionsPragma.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# OPTIONS -fno-warn-orphans #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Overlapable.hs: -------------------------------------------------------------------------------- 1 | instance {-# OVERLAP #-} C a 2 | 3 | instance {-# NO_OVERLAP #-} C a 4 | 5 | instance {-# INCOHERENT #-} C a 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/Overlapable.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Overlapable.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Overlapable.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | instance {-# OVERLAP #-} C a 2 | 3 | instance {-# NO_OVERLAP #-} C a 4 | 5 | instance {-# INCOHERENT #-} C a 6 | -------------------------------------------------------------------------------- /tests/examples/Overlapping.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Overlapping.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/OverloadedLabels.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/OverloadedLabels.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PackageImports.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | module PackageImports where 3 | 4 | import "wibble" PackageImports.Default 5 | import "wibble" PackageImports.Builtin.All 6 | -------------------------------------------------------------------------------- /tests/examples/PackageImports.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PackageImports.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PackageImports.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | module PackageImports where 3 | import "wibble" PackageImports.Default 4 | import "wibble" PackageImports.Builtin.All 5 | -------------------------------------------------------------------------------- /tests/examples/PackageImportsMissing.hs: -------------------------------------------------------------------------------- 1 | module PackageImportsMissing where 2 | 3 | import "wibble" PackageImports.Default 4 | import "wibble" PackageImports.Builtin.All 5 | -------------------------------------------------------------------------------- /tests/examples/PackageImportsMissing.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/PackageImportsMissing.hs" 3 17) "PackageImports language extension is not enabled. Please add {-# LANGUAGE PackageImports #-} pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/PackageImportsMissing.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/PackageImportsMissing.hs" 3 17) 3 | "PackageImports language extension is not enabled. Please add {-# LANGUAGE PackageImports #-} pragma at the top of your module." 4 | -------------------------------------------------------------------------------- /tests/examples/PackageImportsMissing.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/PackageImportsMissing.hs" 3 17) "PackageImports language extension is not enabled. Please add {-# LANGUAGE PackageImports #-} pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/PackageImportsMissing.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/PackageImportsMissing.hs" 3 17) "PackageImports language extension is not enabled. Please add {-# LANGUAGE PackageImports #-} pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ParallelArrays #-} 2 | 3 | dotp_double :: [:Double:] -> [:Double:] -> Double 4 | dotp_double xs ys = sumP [:x * y | x <- xs | y <- ys:] 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ParallelArrays #-} 2 | 3 | dotp_double :: [:Double:] -> [:Double:] -> Double 4 | dotp_double xs ys = sumP [:x * y| x <- xs| y <- ys:] 5 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays2.hs: -------------------------------------------------------------------------------- 1 | -- Should fail without extensions. 2 | dotp_double :: [:Double:] -> [:Double:] -> Double 3 | dotp_double xs ys = sumP [:x * y | x <- xs | y <- ys:] 4 | 5 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ParallelArrays2.hs" 2 17) "Parse error: :" 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays2.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/ParallelArrays2.hs" 2 17) "Parse error: :" 3 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ParallelArrays2.hs" 2 17) "Parse error: :" 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelArrays2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/ParallelArrays2.hs" 2 17) "Parse error: :" 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelListComp.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ParallelListComp #-} 2 | 3 | f xs ys zs = [ (x,y,z) | x <- xs | y <- ys, y > 2 | z <- zs ] 4 | -------------------------------------------------------------------------------- /tests/examples/ParallelListComp.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelListComp.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ParallelListComp.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ParallelListComp #-} 2 | f xs ys zs = [(x, y, z)| x <- xs| y <- ys, y > 2| z <- zs] 3 | -------------------------------------------------------------------------------- /tests/examples/ParenFunBind.hs: -------------------------------------------------------------------------------- 1 | module ParenFunBind where 2 | 3 | (foo x) y = x + y 4 | -------------------------------------------------------------------------------- /tests/examples/ParenFunBind.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ParenFunBind.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ParenFunBind.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module ParenFunBind where 2 | foo x y = x + y 3 | -------------------------------------------------------------------------------- /tests/examples/PartialSignatures.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PartialSignatures.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatSynFix.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | pattern A <- (True, True) where A = (not $ False && True, True) 3 | exp = not $ False && True 4 | -------------------------------------------------------------------------------- /tests/examples/PatSynFix.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatSynFix.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatSynFix.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | pattern A <- (True, True) 4 | where A = (not $ False && True, True) 5 | exp = not $ False && True 6 | -------------------------------------------------------------------------------- /tests/examples/PatternSplice.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module PatternSpliceTest where 3 | 4 | foo :: Int -> Bool 5 | foo $( [p| 42 |] ) = True 6 | foo _ = False 7 | -------------------------------------------------------------------------------- /tests/examples/PatternSplice.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSplice.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSplice.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module PatternSpliceTest where 3 | 4 | foo :: Int -> Bool 5 | foo $( [p| 42 |] ) = True 6 | foo _ = False 7 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymImport.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | module Main (pattern Foo, pattern (:>)) where 4 | 5 | import Foo (pattern Foo, pattern (:>)) 6 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymImport.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymImport.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymImport.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | module Main (pattern Foo, pattern (:>)) where 3 | import Foo (pattern Foo, pattern (:>)) 4 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymSignatures.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | 4 | pattern Syn :: Typ 5 | 6 | pattern Syn :: () => () => Typ 7 | 8 | pattern Syn :: Show a => Show b => Typ 9 | 10 | pattern Syn :: Show b => Typ 11 | 12 | pattern Syn :: Show b => () => Typ 13 | 14 | pattern Syn :: () => Show b => Typ 15 | 16 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymSignatures.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymSignatures.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonymSignatures.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | pattern Syn :: Typ 4 | 5 | pattern Syn :: () => () => Typ 6 | 7 | pattern Syn :: Show a => Show b => Typ 8 | 9 | pattern Syn :: Show b => Typ 10 | 11 | pattern Syn :: Show b => () => Typ 12 | 13 | pattern Syn :: () => Show b => Typ 14 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | pattern A = Nothing 4 | 5 | pattern B a = Just a 6 | 7 | pattern a :+: b = (a,b) 8 | 9 | pattern Tuple a b = (a,b) 10 | 11 | pattern A = Nothing 12 | 13 | pattern B a = Just a 14 | 15 | pattern a :+: b = (a,b) 16 | 17 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | pattern A = Nothing 4 | 5 | pattern B a = Just a 6 | 7 | pattern a :+: b = (a, b) 8 | 9 | pattern Tuple a b = (a, b) 10 | 11 | pattern A = Nothing 12 | 13 | pattern B a = Just a 14 | 15 | pattern a :+: b = (a, b) 16 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms, ScopedTypeVariables, KindSignatures #-} 2 | module Foo (pattern Single) where 3 | 4 | 5 | 6 | pattern Single x <- [x] 7 | where Single 4 = [x] 8 | Single 5 = [x] 9 | 10 | pattern Double x = [x] 11 | 12 | 13 | 14 | 15 | 16 | single :: [a] -> Maybe a 17 | single (Single x) = Just x 18 | single _ = Nothing 19 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms, ScopedTypeVariables, KindSignatures 2 | #-} 3 | module Foo (pattern Single) where 4 | 5 | pattern Single x <- [x] 6 | where Single 4 = [x] 7 | Single 5 = [x] 8 | 9 | pattern Double x = [x] 10 | 11 | single :: [a] -> Maybe a 12 | single (Single x) = Just x 13 | single _ = Nothing 14 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PatternSynonyms3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PolyKindSigs.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | --{-# LANGUAGE KindSignatures #-} 3 | {-# LANGUAGE PolyKinds #-} 4 | 5 | module Test where 6 | 7 | data Foo :: * -> * where 8 | Foo :: Foo a 9 | -------------------------------------------------------------------------------- /tests/examples/PolyKindSigs.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PolyKindSigs.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PolyKindSigs.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | {-# LANGUAGE PolyKinds #-} 3 | module Test where 4 | 5 | data Foo :: * -> * where 6 | Foo :: Foo a 7 | -------------------------------------------------------------------------------- /tests/examples/PolyKinds.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PolyKinds #-} 2 | data Proxy t = Proxy 3 | 4 | class Typeable t where 5 | typeOf :: Proxy t -> TypeRep 6 | 7 | instance Typeable Int where typeOf _ = TypeRep 8 | instance Typeable [] where typeOf _ = TypeRep 9 | -------------------------------------------------------------------------------- /tests/examples/PolyKinds.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PolyKinds.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PolyKinds.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PolyKinds #-} 2 | 3 | data Proxy t = Proxy 4 | 5 | class Typeable t where 6 | typeOf :: Proxy t -> TypeRep 7 | 8 | instance Typeable Int where 9 | typeOf _ = TypeRep 10 | 11 | instance Typeable [] where 12 | typeOf _ = TypeRep 13 | -------------------------------------------------------------------------------- /tests/examples/Ppr048.hs: -------------------------------------------------------------------------------- 1 | module Ppr048 where 2 | 3 | {-# SCc foo #-} 4 | foo :: Int -> Int 5 | foo x = x 6 | 7 | {-# SCc foo2 "label" #-} 8 | foo2 :: () 9 | foo2 = () 10 | 11 | -------------------------------------------------------------------------------- /tests/examples/Ppr048.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/Ppr048.hs" 3 9) "Parse error: foo" 2 | -------------------------------------------------------------------------------- /tests/examples/Ppr048.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/Ppr048.hs" 3 9) "Parse error: foo" 3 | -------------------------------------------------------------------------------- /tests/examples/Ppr048.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/Ppr048.hs" 3 9) "Parse error: foo" 2 | -------------------------------------------------------------------------------- /tests/examples/Ppr048.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/Ppr048.hs" 3 9) "Parse error: foo" 2 | -------------------------------------------------------------------------------- /tests/examples/PrimitiveIntHexLiteral.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | minInt = I# (0x8000000000000000#) 3 | -------------------------------------------------------------------------------- /tests/examples/PrimitiveIntHexLiteral.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/PrimitiveIntHexLiteral.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | minInt = I# (9223372036854775808#) 3 | -------------------------------------------------------------------------------- /tests/examples/QQType.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleInstances, TemplateHaskell, QuasiQuotes #-} 2 | module QQType where 3 | 4 | import Language.Haskell.TH 5 | 6 | x :: DecsQ 7 | x = [d| instance Show $(conT (mkName "Int")) |] 8 | -------------------------------------------------------------------------------- /tests/examples/QQType.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QQType.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QQType.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleInstances, TemplateHaskell, QuasiQuotes #-} 2 | module QQType where 3 | import Language.Haskell.TH 4 | 5 | x :: DecsQ 6 | x = [d| 7 | 8 | instance Show $( conT (mkName "Int") ) 9 | |] 10 | -------------------------------------------------------------------------------- /tests/examples/QualifiedDot.hs: -------------------------------------------------------------------------------- 1 | module QualifiedDot where 2 | 3 | twoDots = (Prelude..) 4 | -------------------------------------------------------------------------------- /tests/examples/QualifiedDot.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QualifiedDot.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QualifiedDot.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module QualifiedDot where 2 | twoDots = (Prelude..) 3 | -------------------------------------------------------------------------------- /tests/examples/QualifiedQQuote.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | import qualified Language.Haskell.TH as T 3 | 4 | x :: T.DecsQ 5 | x = [T.d|id|] 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/QualifiedQQuote.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QualifiedQQuote.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QualifiedQQuote.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | import qualified Language.Haskell.TH as T 3 | 4 | x :: T.DecsQ 5 | x = [T.d|id|] 6 | -------------------------------------------------------------------------------- /tests/examples/QualifiedRecordfieldPuns.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | f (C {M.a}) = a 3 | 4 | -------------------------------------------------------------------------------- /tests/examples/QualifiedRecordfieldPuns.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QualifiedRecordfieldPuns.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QualifiedRecordfieldPuns.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | f (C{M.a}) = a 3 | -------------------------------------------------------------------------------- /tests/examples/QuantifiedConstraints.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitForAll #-} 2 | {-# LANGUAGE QuantifiedConstraints #-} 3 | 4 | class (forall a. Eq (f a)) => C f 5 | -------------------------------------------------------------------------------- /tests/examples/QuantifiedConstraints.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuantifiedConstraints.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuantifiedConstraints.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitForAll #-} 2 | {-# LANGUAGE QuantifiedConstraints #-} 3 | 4 | class (forall a . Eq (f a)) => C f 5 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteLines.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | import Here 4 | 5 | str :: String 6 | str = [here|test 7 | test 8 | test test |] 9 | 10 | 11 | main :: IO() 12 | main = do putStrLn str 13 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteLines.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteLines.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteLines.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | import Here 3 | 4 | str :: String 5 | str = [here|test 6 | test 7 | test test |] 8 | 9 | main :: IO () 10 | main = do putStrLn str 11 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteOld.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | import Here 4 | 5 | str :: String 6 | str = [$here|test 7 | test 8 | test test |] 9 | 10 | 11 | main :: IO() 12 | main = do putStrLn str 13 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteOld.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | import Here 4 | 5 | str :: String 6 | str = [here|test 7 | test 8 | test test |] 9 | 10 | 11 | main :: IO() 12 | main = do putStrLn str 13 | 14 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteOld.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteOld.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | import Here 3 | 4 | str :: String 5 | str = [here|test 6 | test 7 | test test |] 8 | 9 | main :: IO () 10 | main = do putStrLn str 11 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteQual2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | f [True] = 1 3 | f _ = 0 4 | 5 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteQual2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteQual2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteQual2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | f [True] = 1 3 | f _ = 0 4 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteSplice.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell, RankNTypes #-} 2 | {-# OPTIONS_GHC -F -pgmFtrhsx #-} 3 | import Language.Haskell.TH 4 | 5 | data PageFunction m a = PF 6 | 7 | main = let a = mkName "a" in 8 | runQ [t| forall m. PageFunction m $(conT (mkName "a")) |] >>= print 9 | 10 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteSplice.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteSplice.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteSplice.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell, RankNTypes #-} 2 | {-# OPTIONS_GHC -F -pgmFtrhsx #-} 3 | import Language.Haskell.TH 4 | 5 | data PageFunction m a = PF 6 | main 7 | = let a = mkName "a" in 8 | runQ [t| forall m . PageFunction m $( conT (mkName "a") ) |] >>= 9 | print 10 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteToplevel.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | [undefined| 4 | this quasiquote is acceptable to ghc's 5 | parser. Previously hse would reject this 6 | because -XTemplateHaskell is not enabled 7 | to allow "expressions" at top-level 8 | |] 9 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteToplevel.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | [undefined| 4 | this quasiquote is acceptable to ghc's 5 | parser. Previously hse would reject this 6 | because -XTemplateHaskell is not enabled 7 | to allow "expressions" at top-level|] 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteToplevel.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteToplevel.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | [undefined| 4 | this quasiquote is acceptable to ghc's 5 | parser. Previously hse would reject this 6 | because -XTemplateHaskell is not enabled 7 | to allow "expressions" at top-level 8 | |] 9 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteUnit.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | 4 | unNest n = conP '() 5 | 6 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteUnit.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteUnit.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/QuasiQuoteUnit.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | unNest n = conP '() 4 | -------------------------------------------------------------------------------- /tests/examples/RCategory.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RCategory.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RCategory2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, ConstraintKinds #-} 2 | 3 | import GHC.Prim 4 | 5 | class RCategory cat where 6 | type RCategoryCtxt cat a b :: Constraint 7 | -------------------------------------------------------------------------------- /tests/examples/RCategory2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RCategory2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RCategory2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, ConstraintKinds #-} 2 | import GHC.Prim 3 | 4 | class RCategory cat where 5 | type RCategoryCtxt cat a b :: Constraint 6 | -------------------------------------------------------------------------------- /tests/examples/RCategory3.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, ConstraintKinds #-} 2 | 3 | instance RCategory (->) where 4 | type RCategoryCtxt (->) a a = () 5 | 6 | -------------------------------------------------------------------------------- /tests/examples/RCategory3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RCategory3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RCategory3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, ConstraintKinds #-} 2 | 3 | instance RCategory (->) where 4 | type RCategoryCtxt (->) a a = () 5 | -------------------------------------------------------------------------------- /tests/examples/ReadP.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | newtype ReadP a = R (forall b . (a -> P b) -> P b) 3 | -------------------------------------------------------------------------------- /tests/examples/ReadP.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ReadP.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ReadP.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | 3 | newtype ReadP a = R (forall b . (a -> P b) -> P b) 4 | -------------------------------------------------------------------------------- /tests/examples/RealGHC.lhs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordInfixSelector.hs: -------------------------------------------------------------------------------- 1 | data RecordWithInfixSelector = Cons { (<>) :: Int -> Int } 2 | 3 | idRecord = Cons { (<>) = id } 4 | -------------------------------------------------------------------------------- /tests/examples/RecordInfixSelector.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordInfixSelector.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordInfixSelector.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | data RecordWithInfixSelector = Cons{(<>) :: Int -> Int} 2 | idRecord = Cons{(<>) = id} 3 | -------------------------------------------------------------------------------- /tests/examples/RecordPatternSynonyms.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | module ShouldCompile where 3 | 4 | pattern Single{x} = [x] 5 | 6 | pattern Double{y,z} = (y,z) 7 | 8 | pattern More{x} <- (x,_) where 9 | More x = (x, Nothing) 10 | 11 | -- Selector 12 | selector :: Int 13 | selector = x [5] 14 | 15 | update :: [String] 16 | update = ["String"] { x = "updated" } 17 | -------------------------------------------------------------------------------- /tests/examples/RecordPatternSynonyms.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordPatternSynonyms.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordPatternSynonyms.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | module ShouldCompile where 3 | 4 | pattern Single{x} = [x] 5 | 6 | pattern Double{y, z} = (y, z) 7 | 8 | pattern More{x} <- (x, _) 9 | where More x = (x, Nothing) 10 | 11 | selector :: Int 12 | selector = x [5] 13 | 14 | update :: [String] 15 | update = ["String"]{x = "updated"} 16 | -------------------------------------------------------------------------------- /tests/examples/RecordPuns.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | module RecordPuns where 3 | 4 | cotile = tile {Kind.ospeedup} 5 | -------------------------------------------------------------------------------- /tests/examples/RecordPuns.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordPuns.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecordPuns.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NamedFieldPuns #-} 2 | module RecordPuns where 3 | cotile = tile{Kind.ospeedup} 4 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcard.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecordWildCards #-} 2 | -- Should fail. 3 | f A { .., b = v, .. } = v 4 | 5 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcard.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/RecordWildcard.hs" 3 9) "Parse error: ," 2 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcard.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/RecordWildcard.hs" 3 9) "Parse error: ," 3 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcard.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/RecordWildcard.hs" 3 9) "Parse error: ," 2 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcard.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/RecordWildcard.hs" 3 9) "Parse error: ," 2 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcardError.hs: -------------------------------------------------------------------------------- 1 | foo Record{..} = xs 2 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcardError.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/RecordWildcardError.hs" 1 12) "RecordWildCards language extension is not enabled. Please add {-# LANGUAGE RecordWildCards #-} pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcardError.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/RecordWildcardError.hs" 1 12) 3 | "RecordWildCards language extension is not enabled. Please add {-# LANGUAGE RecordWildCards #-} pragma at the top of your module." 4 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcardError.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/RecordWildcardError.hs" 1 12) "RecordWildCards language extension is not enabled. Please add {-# LANGUAGE RecordWildCards #-} pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/RecordWildcardError.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/RecordWildcardError.hs" 1 12) "RecordWildCards language extension is not enabled. Please add {-# LANGUAGE RecordWildCards #-} pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/RecursiveDo.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | justOnes = do 3 | rec xs <- Just (1:xs) 4 | return (map negate xs) 5 | 6 | -------------------------------------------------------------------------------- /tests/examples/RecursiveDo.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecursiveDo.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RecursiveDo.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | justOnes 3 | = do rec xs <- Just (1 : xs) 4 | return (map negate xs) 5 | -------------------------------------------------------------------------------- /tests/examples/RegularPatterns.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmFhsx2hs #-} 2 | {-# LANGUAGE RegularPatterns #-} 3 | module RegularPatterns where 4 | 5 | f :: [Int] -> [[Int]] 6 | f [ 0+!, b+, 1?, (| 2,3 |) ] = [b] 7 | f [ 1+, (| x | x `mod` 2 == 0 |) ] = [[x]] 8 | f [ 2, a@(| b@:_, _ |)* ] = b:a 9 | f _ = [] 10 | -------------------------------------------------------------------------------- /tests/examples/RegularPatterns.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RegularPatterns.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RegularPatterns.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -F -pgmFhsx2hs #-} 2 | {-# LANGUAGE RegularPatterns #-} 3 | module RegularPatterns where 4 | 5 | f :: [Int] -> [[Int]] 6 | f [0+!, b+, 1?, (| 2, 3 |)] = [b] 7 | f [1+, (| x | x `mod` 2 == 0 |)] = [[x]] 8 | f [2, a@(| b@:_, _ |)*] = b : a 9 | f _ = [] 10 | -------------------------------------------------------------------------------- /tests/examples/RelaxedDo.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NondecreasingIndentation #-} 2 | module Main where 3 | 4 | import Control.Monad 5 | 6 | main :: IO () 7 | main = do 8 | when ( 2 > 1) $ do 9 | putStrLn "a" 10 | putStrLn "b" 11 | 12 | nestedDoBlocks = getChar >>= (\c1 -> do 13 | getChar >>= (\c2 -> do 14 | getChar >>= (\c3 -> return [c1,c2,c3]))) 15 | -------------------------------------------------------------------------------- /tests/examples/RelaxedDo.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RelaxedDo.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RoleAnnotations, PolyKinds, KindSignatures #-} 2 | 3 | module Roles where 4 | 5 | data T1 a = K1 a 6 | data T2 a = K2 a 7 | 8 | data T5 a = K5 a 9 | data T6 a = K6 10 | data T7 a b = K7 b 11 | 12 | type role T1 nominal 13 | type role T2 representational 14 | type role T3 phantom 15 | type role T4 nominal _ 16 | type role T5 _ 17 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RoleAnnotations #-} 2 | 3 | data Foo a = Foo a 4 | type role Foo representational 5 | 6 | main = print $ foo 1 7 | 8 | foo :: Int -> Int 9 | foo role = 42 10 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/RoleAnnotations2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RoleAnnotations #-} 2 | 3 | data Foo a = Foo a 4 | 5 | type role Foo representational 6 | main = print $ foo 1 7 | 8 | foo :: Int -> Int 9 | foo role = 42 10 | -------------------------------------------------------------------------------- /tests/examples/Rules.hs: -------------------------------------------------------------------------------- 1 | {-# RULES "head/build" forall (g::forall b.(a->b->b)->b->b) . head (build g) = g (\x _ -> x) badHead #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Rules.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Rules.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Rules.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# RULES 2 | "head/build" forall (g :: forall b . (a -> b -> b) -> b -> b) . 3 | head (build g) = g (\ x _ -> x) badHead 4 | #-} 5 | -------------------------------------------------------------------------------- /tests/examples/SCCPragmas.hs: -------------------------------------------------------------------------------- 1 | module SCCPragmas where 2 | 3 | x = {-# SCC "wibble" #-} 3 4 | -------------------------------------------------------------------------------- /tests/examples/SCCPragmas.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SCCPragmas.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SCCPragmas.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module SCCPragmas where 2 | x = {-# SCC "wibble" #-} 3 3 | -------------------------------------------------------------------------------- /tests/examples/SafeImports1.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE SafeImports #-} 2 | import safe Prelude as P 3 | -------------------------------------------------------------------------------- /tests/examples/SafeImports1.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SafeImports1.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SafeImports1.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE SafeImports #-} 2 | import safe Prelude as P 3 | -------------------------------------------------------------------------------- /tests/examples/SafeImports2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | import safe Prelude as P 3 | -------------------------------------------------------------------------------- /tests/examples/SafeImports2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SafeImports2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SafeImports2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | import safe Prelude as P 3 | -------------------------------------------------------------------------------- /tests/examples/SafeImports3.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | import safe Prelude as P 3 | -------------------------------------------------------------------------------- /tests/examples/SafeImports3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SafeImports3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SafeImports3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | import safe Prelude as P 3 | -------------------------------------------------------------------------------- /tests/examples/ScopedTypeVariables.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | 3 | test :: IO Char 4 | test = do 5 | x :: Char <- getChar 6 | return x 7 | 8 | 9 | value :: String = "Hello" 10 | 11 | forallTest :: forall x . Eq x => x -> x 12 | forallTest x = if x == x then (undefined :: x) else x 13 | -------------------------------------------------------------------------------- /tests/examples/ScopedTypeVariables.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ScopedTypeVariables.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ScopedTypeVariables.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | 3 | test :: IO Char 4 | test 5 | = do x :: Char <- getChar 6 | return x 7 | value :: String = "Hello" 8 | 9 | forallTest :: forall x . Eq x => x -> x 10 | forallTest x = if x == x then (undefined :: x) else x 11 | -------------------------------------------------------------------------------- /tests/examples/SimpleDeriving.hs: -------------------------------------------------------------------------------- 1 | data T = T deriving Eq 2 | -------------------------------------------------------------------------------- /tests/examples/SimpleDeriving.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SimpleDeriving.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SimpleDeriving.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | data T = T deriving Eq 2 | -------------------------------------------------------------------------------- /tests/examples/SingleClassAsst.hs: -------------------------------------------------------------------------------- 1 | module Test where 2 | 3 | foo :: (Eq a) => a -> a 4 | foo x = x 5 | -------------------------------------------------------------------------------- /tests/examples/SingleClassAsst.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SingleClassAsst.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SingleClassAsst.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module Test where 2 | 3 | foo :: (Eq a) => a -> a 4 | foo x = x 5 | -------------------------------------------------------------------------------- /tests/examples/SpecializeInstance.hs: -------------------------------------------------------------------------------- 1 | instance Sized a => Sized (Digit a) where 2 | {-# SPECIALIZE instance Sized (Digit (Elem a)) #-} 3 | {-# SPECIALIZE instance Sized (Digit (Node a)) #-} 4 | size xs = foldl (\ i x -> i + size x) 0 xs 5 | -------------------------------------------------------------------------------- /tests/examples/SpecializeInstance.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | instance Sized a => Sized (Digit a) where 2 | {-# SPECIALISE instance Sized (Digit (Elem a)) #-} 3 | {-# SPECIALISE instance Sized (Digit (Node a)) #-} 4 | size xs = foldl (\ i x -> i + size x) 0 xs 5 | 6 | -------------------------------------------------------------------------------- /tests/examples/SpecializeInstance.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SpecializeInstance.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | instance Sized a => Sized (Digit a) where 2 | {-# SPECIALISE instance Sized (Digit (Elem a)) #-} 3 | 4 | {-# SPECIALISE instance Sized (Digit (Node a)) #-} 5 | size xs = foldl (\ i x -> i + size x) 0 xs 6 | -------------------------------------------------------------------------------- /tests/examples/SpecializePhaseControl.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/SpecializePhaseControl.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/StarInType.hs: -------------------------------------------------------------------------------- 1 | {-# language TypeOperators, KindSignatures #-} 2 | data B = B 3 | data a * b = Foo 4 | type A = B * B 5 | main = print 1 6 | -------------------------------------------------------------------------------- /tests/examples/StarInType.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, KindSignatures #-} 2 | data B = B 3 | data a * b = Foo 4 | type A = B * B 5 | main = print 1 6 | 7 | -------------------------------------------------------------------------------- /tests/examples/StarInType.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/StarInType.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, KindSignatures #-} 2 | 3 | data B = B 4 | 5 | data a * b = Foo 6 | 7 | type A = B * B 8 | main = print 1 9 | -------------------------------------------------------------------------------- /tests/examples/T11727.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | 3 | module T11727 where 4 | 5 | pattern A,B :: Int 6 | pattern A = 5 7 | pattern B = 5 8 | 9 | -------------------------------------------------------------------------------- /tests/examples/T11727.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/T11727.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/T11727.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | module T11727 where 3 | 4 | pattern A, B :: Int 5 | 6 | pattern A = 5 7 | 8 | pattern B = 5 9 | -------------------------------------------------------------------------------- /tests/examples/T13050.hs: -------------------------------------------------------------------------------- 1 | module HolesInfix where 2 | 3 | f, g, q :: Int -> Int -> Int 4 | f x y = _ x y 5 | g x y = x `_` y 6 | q x y = x `_a` y 7 | 8 | -------------------------------------------------------------------------------- /tests/examples/T13050.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/T13050.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/T13050.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | module HolesInfix where 2 | 3 | f, g, q :: Int -> Int -> Int 4 | f x y = _ x y 5 | g x y = x `_` y 6 | q x y = x `_a` y 7 | -------------------------------------------------------------------------------- /tests/examples/THTSplices.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | import Language.Haskell.TH 3 | main = undefined :: $(undefined) 4 | -------------------------------------------------------------------------------- /tests/examples/THTSplices.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTSplices.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTSplices.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | import Language.Haskell.TH 3 | main = undefined :: $( undefined ) 4 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | import Language.Haskell.TH 3 | 4 | import THTypedSplices.Defs 5 | 6 | main = $$justTH ($$([e|| 2 ||])) 7 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | import Language.Haskell.TH 3 | 4 | import THTypedSplices.Defs 5 | 6 | main = $$justTH ($$([|| 2 ||])) 7 | 8 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | import Language.Haskell.TH 3 | import THTypedSplices.Defs 4 | main = $$justTH ($$( [|| 2 ||] )) 5 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices/Defs.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | 3 | module Language.Haskell.TH.Defs where 4 | 5 | import Language.Haskell.TH 6 | 7 | justTH :: Q (TExp (Int -> Maybe Int)) 8 | justTH = [|| Just ||] 9 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices/Defs.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices/Defs.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTypedSplices/Defs.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module Language.Haskell.TH.Defs where 3 | import Language.Haskell.TH 4 | 5 | justTH :: Q (TExp (Int -> Maybe Int)) 6 | justTH = [|| Just ||] 7 | -------------------------------------------------------------------------------- /tests/examples/THTypes.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleInstances #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | {-# LANGUAGE QuasiQuotes #-} 4 | module THTypes where 5 | 6 | import Language.Haskell.TH 7 | 8 | x :: DecsQ 9 | x = [d| instance Show $(conT (mkName "Int")) |] 10 | 11 | unit x = [t| $x |] 12 | -------------------------------------------------------------------------------- /tests/examples/THTypes.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTypes.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/THTypes.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleInstances #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | {-# LANGUAGE QuasiQuotes #-} 4 | module THTypes where 5 | import Language.Haskell.TH 6 | 7 | x :: DecsQ 8 | x = [d| 9 | 10 | instance Show $( conT (mkName "Int") ) 11 | |] 12 | unit x = [t| $x |] 13 | -------------------------------------------------------------------------------- /tests/examples/TabWhitespace.hs: -------------------------------------------------------------------------------- 1 | -- hi 2 | -------------------------------------------------------------------------------- /tests/examples/TabWhitespace.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | -- hi 2 | 3 | -------------------------------------------------------------------------------- /tests/examples/TabWhitespace.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TabWhitespace.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/examples/TemplateHaskellQuotedNames.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | f = g 'Constructor 'function 3 | h = g '() '[] 4 | -------------------------------------------------------------------------------- /tests/examples/TemplateHaskellQuotedNames.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TemplateHaskellQuotedNames.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TemplateHaskellQuotedNames.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | f = g 'Constructor 'function 3 | h = g '() '[] 4 | -------------------------------------------------------------------------------- /tests/examples/TensorTests.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TensorTests.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Testing.hs: -------------------------------------------------------------------------------- 1 | {-# LINE 5 "templates\GenericTemplate.hs" #-} 2 | main = return () 3 | -------------------------------------------------------------------------------- /tests/examples/Testing.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Testing.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Testing.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | main = return () 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere.hs: -------------------------------------------------------------------------------- 1 | fail = x 2 | where 3 | broken = 24 4 | where 5 | x = 413 6 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | fail = x 2 | where broken = 24 3 | where 4 | x = 413 5 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere2.hs: -------------------------------------------------------------------------------- 1 | data Baz = Baz 2 | 3 | instance Show Baz where 4 | show _ = "" 5 | where 6 | show _ = "" 7 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | data Baz = Baz 2 | 3 | instance Show Baz where 4 | show _ = "" 5 | where 6 | show _ = "" 7 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere3.hs: -------------------------------------------------------------------------------- 1 | main = f where 2 | f = g where 3 | g = putStrLn "hello world" 4 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TrailingWhere3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | main = f 2 | where f = g 3 | where 4 | g = putStrLn "hello world" 5 | -------------------------------------------------------------------------------- /tests/examples/TupleSections.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TupleSections #-} 2 | 3 | foo x = (1,,) x 3 4 | -------------------------------------------------------------------------------- /tests/examples/TupleSections.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TupleSections.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TupleSections.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TupleSections #-} 2 | foo x = (1, ,) x 3 3 | -------------------------------------------------------------------------------- /tests/examples/TyQuasiQuote.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes, TemplateHaskell #-} 2 | f :: [qq| something in here |] 3 | f = () 4 | -------------------------------------------------------------------------------- /tests/examples/TyQuasiQuote.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TyQuasiQuote.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TyQuasiQuote.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes, TemplateHaskell #-} 2 | 3 | f :: [qq| something in here |] 4 | f = () 5 | -------------------------------------------------------------------------------- /tests/examples/TySplice.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | 3 | [| f :: $ty |] 4 | [| f :: $(fun ty) |] 5 | -------------------------------------------------------------------------------- /tests/examples/TySplice.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | 3 | [| f :: $ty |] 4 | 5 | [| f :: $( fun ty ) |] 6 | -------------------------------------------------------------------------------- /tests/examples/TySplice2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | t1 :: $( [t|Int|] ) 3 | t1 = 1 4 | 5 | -------------------------------------------------------------------------------- /tests/examples/TySplice2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | 3 | t1 :: $( [t| Int |] ) 4 | t1 = 1 5 | -------------------------------------------------------------------------------- /tests/examples/TySplice3.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | [qq| abc |] 3 | -------------------------------------------------------------------------------- /tests/examples/TySplice3.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice3.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice3.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE QuasiQuotes #-} 2 | 3 | [qq| abc |] 4 | -------------------------------------------------------------------------------- /tests/examples/TySplice4.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | x = [d| f :: a -> Int 3 | f x = 1 |] 4 | 5 | y = [d| f2 :: a -> Int; f2 x = 1 |] 6 | -------------------------------------------------------------------------------- /tests/examples/TySplice4.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice4.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TySplice4.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | x = [d| 3 | 4 | f :: a -> Int 5 | f x = 1 |] 6 | y = [d| 7 | 8 | f2 :: a -> Int 9 | f2 x = 1 |] 10 | -------------------------------------------------------------------------------- /tests/examples/TypeEqualityParen.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | f :: ( Eq a, (a ~ Int) ) => a -> Int 3 | f _ = 3 4 | -------------------------------------------------------------------------------- /tests/examples/TypeEqualityParen.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeEqualityParen.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeEqualityParen.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | f :: (Eq a, (a ~ Int)) => a -> Int 4 | f _ = 3 5 | -------------------------------------------------------------------------------- /tests/examples/TypeErrorMessage.hs: -------------------------------------------------------------------------------- 1 | newtype PoC = PoC (forall b . b) 2 | -------------------------------------------------------------------------------- /tests/examples/TypeErrorMessage.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/TypeErrorMessage.hs" 2 1) "At least one of ExplicitForAll or TypeOperators language extensions needs to be enabled. Please add: {-# LANGUAGE ExplicitForAll #-} or {-# LANGUAGE TypeOperators #-} language pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/TypeErrorMessage.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/TypeErrorMessage.hs" 2 1) 3 | "At least one of ExplicitForAll or TypeOperators language extensions needs to be enabled. Please add: {-# LANGUAGE ExplicitForAll #-} or {-# LANGUAGE TypeOperators #-} language pragma at the top of your module." 4 | -------------------------------------------------------------------------------- /tests/examples/TypeErrorMessage.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/TypeErrorMessage.hs" 2 1) "At least one of ExplicitForAll or TypeOperators language extensions needs to be enabled. Please add: {-# LANGUAGE ExplicitForAll #-} or {-# LANGUAGE TypeOperators #-} language pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/TypeErrorMessage.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/TypeErrorMessage.hs" 2 1) "At least one of ExplicitForAll or TypeOperators language extensions needs to be enabled. Please add: {-# LANGUAGE ExplicitForAll #-} or {-# LANGUAGE TypeOperators #-} language pragma at the top of your module." 2 | -------------------------------------------------------------------------------- /tests/examples/TypeFunctions.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, KindSignatures #-} 2 | 3 | data Id = Id 4 | 5 | type family Rep (f :: * -> *) x :: * 6 | 7 | type instance Rep Id x = x 8 | -------------------------------------------------------------------------------- /tests/examples/TypeFunctions.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeFunctions.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeFunctions.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, KindSignatures #-} 2 | 3 | data Id = Id 4 | 5 | type family Rep (f :: * -> *) x :: * 6 | 7 | type instance Rep Id x = x 8 | -------------------------------------------------------------------------------- /tests/examples/TypeInstances.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | class MapType v where 4 | type Key v :: * 5 | type instance Key v = TileKey v 6 | 7 | type Source v :: * 8 | -------------------------------------------------------------------------------- /tests/examples/TypeInstances.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeInstances.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeInstances.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | class MapType v where 4 | type Key v :: * 5 | type Key v = TileKey v 6 | type Source v :: * 7 | -------------------------------------------------------------------------------- /tests/examples/TypeListCons.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds, TypeOperators #-} 2 | 3 | module TypeListCons where 4 | 5 | type List1 a = a ': '[] 6 | type List2 a b = a ': '[] 7 | type List3 a b c = a ': b ': c ': '[] 8 | -------------------------------------------------------------------------------- /tests/examples/TypeListCons.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeListCons.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeListCons.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds, TypeOperators #-} 2 | module TypeListCons where 3 | 4 | type List1 a = a ': '[] 5 | 6 | type List2 a b = a ': '[] 7 | 8 | type List3 a b c = a ': b ': c ': '[] 9 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorAsVariable.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | 3 | type T (~>) = () 4 | 5 | type Foo = () 6 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorAsVariable.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorAsVariable.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorAsVariable.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | 3 | type T (~>) = () 4 | 5 | type Foo = () 6 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorsTest.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, FlexibleContexts, FlexibleInstances #-} 2 | 3 | f :: ArrowXml (~>) => a ~> a 4 | f = undefined 5 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorsTest.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorsTest.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/TypeOperatorsTest.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators, FlexibleContexts, FlexibleInstances #-} 2 | 3 | f :: ArrowXml (~>) => a ~> a 4 | f = undefined 5 | -------------------------------------------------------------------------------- /tests/examples/UnboxedSingleton.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | -- See e.g. GHC.Prim.indexArray# 3 | foo a = (# a #) 4 | -------------------------------------------------------------------------------- /tests/examples/UnboxedSingleton.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnboxedSingleton.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnboxedSingleton.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | foo a = (# a #) 3 | -------------------------------------------------------------------------------- /tests/examples/UnboxedTuples.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | 3 | foo :: (a, b) -> (# b , a #) 4 | foo (a, b) = 5 | case (# b, a #) of 6 | (# b, a #) -> (# , #) b a 7 | -------------------------------------------------------------------------------- /tests/examples/UnboxedTuples.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnboxedTuples.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnboxedTuples.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | 3 | foo :: (a, b) -> (# b, a #) 4 | foo (a, b) 5 | = case (# b, a #) of 6 | (# b, a #) -> (# , #) b a 7 | -------------------------------------------------------------------------------- /tests/examples/Unicode.hs.exactprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/Unicode.hs.exactprinter.golden -------------------------------------------------------------------------------- /tests/examples/Unicode.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Unicode.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/Unicode.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/Unicode2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax #-} 2 | 3 | lengthOP n (⊜) = 0 ⊜ n 4 | -------------------------------------------------------------------------------- /tests/examples/Unicode2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Unicode2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Unicode2.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/Unicode2.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeArrow.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax #-} 2 | 3 | arrowTest ∷ String → String 4 | arrowTest input = 5 | case input of 6 | "hello" → "world" 7 | "world" → "hello" 8 | otherwise → "unknow" 9 | -------------------------------------------------------------------------------- /tests/examples/UnicodeArrow.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax #-} 2 | 3 | arrowTest ::String -> String 4 | arrowTest input = 5 | case input of 6 | "hello" ->"world" 7 | "world" ->"hello" 8 | otherwise ->"unknow" 9 | 10 | -------------------------------------------------------------------------------- /tests/examples/UnicodeArrow.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeArrow.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax #-} 2 | 3 | arrowTest :: String -> String 4 | arrowTest input 5 | = case input of 6 | "hello" -> "world" 7 | "world" -> "hello" 8 | otherwise -> "unknow" 9 | -------------------------------------------------------------------------------- /tests/examples/UnicodeIdents.hs: -------------------------------------------------------------------------------- 1 | 猫 = () 2 | 自乗 x = x * x 3 | -------------------------------------------------------------------------------- /tests/examples/UnicodeIdents.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeIdents.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeIdents.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeIdents.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeRelation.hs.exactprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeRelation.hs.exactprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeRelation.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeRelation.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeRelation.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeSubscript.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax #-} 2 | module Main where 3 | 4 | data Point = Point 5 | { pointX, pointY ∷ Double 6 | , name ∷ String 7 | } deriving (Show) 8 | 9 | distance ∷ Point → Point → Double 10 | distance x y = 11 | let t₁ = (pointX x - pointX y)^2 12 | t₂ = (pointY x - pointY y)^2 13 | in sqrt $ t₁ + t₂ 14 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSubscript.hs.exactprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeSubscript.hs.exactprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeSubscript.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSubscript.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeSubscript.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeSuperscript.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax #-} 2 | 3 | dumy ∷ Double → Double → Double 4 | dumy a b = 5 | let a² = a ★ a 6 | b² = b ★ b 7 | in sqrt $ a² + b² 8 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSuperscript.hs.exactprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeSuperscript.hs.exactprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeSuperscript.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSuperscript.hs.prettyprinter.golden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/UnicodeSuperscript.hs.prettyprinter.golden -------------------------------------------------------------------------------- /tests/examples/UnicodeSyntax.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax, ExplicitForAll #-} 2 | module UnicodeSyntax where 3 | 4 | import System.Environment (getArgs) 5 | 6 | main ∷ IO () 7 | main = do 8 | as ← getArgs 9 | print $ test 0 10 | 11 | test ∷ Int → Bool 12 | test x = x*5 == x+8 13 | 14 | id1 ∷ ∀ a . a → a 15 | id1 x = x 16 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSyntax.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax, ExplicitForAll #-} 2 | module UnicodeSyntax where 3 | 4 | import System.Environment (getArgs) 5 | 6 | main ::IO () 7 | main = do 8 | as <-getArgs 9 | print $ test 0 10 | 11 | test ::Int ->Bool 12 | test x = x*5 == x+8 13 | 14 | id1 ::foralla.a->a 15 | id1 x = x 16 | 17 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSyntax.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnicodeSyntax.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnicodeSyntax, ExplicitForAll #-} 2 | module UnicodeSyntax where 3 | import System.Environment (getArgs) 4 | 5 | main :: IO () 6 | main 7 | = do as <- getArgs 8 | print $ test 0 9 | 10 | test :: Int -> Bool 11 | test x = x * 5 == x + 8 12 | 13 | id1 :: forall a . a -> a 14 | id1 x = x 15 | -------------------------------------------------------------------------------- /tests/examples/UnindentedPragmaClose.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MultiParamTypeClasses 2 | #-} 3 | f :: Int 4 | f = 4 5 | -------------------------------------------------------------------------------- /tests/examples/UnindentedPragmaClose.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnindentedPragmaClose.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/UnindentedPragmaClose.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MultiParamTypeClasses #-} 2 | 3 | f :: Int 4 | f = 4 5 | -------------------------------------------------------------------------------- /tests/examples/Unpack.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data CmmNode e x where 4 | CmmEntry :: {-# UNPACK #-} !Int -> CmmNode e x 5 | 6 | data UI = UI {-# UNPACK #-} !Int 7 | -------------------------------------------------------------------------------- /tests/examples/Unpack.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Unpack.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Unpack.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | data CmmNode e x where 4 | CmmEntry :: {-# UNPACK #-} !Int -> CmmNode e x 5 | 6 | data UI = UI {-# UNPACK #-} !Int 7 | -------------------------------------------------------------------------------- /tests/examples/ViewPatterns.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ViewPatterns #-} 2 | f (id -> Just _) "" = "" 3 | 4 | g (id -> True) = False 5 | 6 | -------------------------------------------------------------------------------- /tests/examples/ViewPatterns.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ViewPatterns.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/ViewPatterns.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ViewPatterns #-} 2 | f (id -> Just _) "" = "" 3 | g (id -> True) = False 4 | -------------------------------------------------------------------------------- /tests/examples/Vta1.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Vta1.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Vta2.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/Vta2.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/WhereBlock.hs: -------------------------------------------------------------------------------- 1 | hash ptr len = f len 2 | where f h = return h 3 | f p = (p `advancePtr` 1) 4 | -------------------------------------------------------------------------------- /tests/examples/WhereBlock.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/WhereBlock.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/WhereBlock.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | hash ptr len = f len 2 | where f h = return h 3 | f p = (p `advancePtr` 1) 4 | -------------------------------------------------------------------------------- /tests/examples/WildcardTyFam.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | type family Foo a where 4 | Foo _ = Int 5 | -------------------------------------------------------------------------------- /tests/examples/WildcardTyFam.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/WildcardTyFam.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/WildcardTyFam.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | type family Foo a where 4 | Foo _ = Int 5 | -------------------------------------------------------------------------------- /tests/examples/brackets.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/brackets.hs" 17 3) "Parse error: \10631" 2 | -------------------------------------------------------------------------------- /tests/examples/brackets.hs.parser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed 2 | (SrcLoc "tests/examples/brackets.hs" 17 3) "Parse error: \10631" 3 | -------------------------------------------------------------------------------- /tests/examples/brackets.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/brackets.hs" 17 3) "Parse error: \10631" 2 | -------------------------------------------------------------------------------- /tests/examples/brackets.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | ParseFailed (SrcLoc "tests/examples/brackets.hs" 17 3) "Parse error: \10631" 2 | -------------------------------------------------------------------------------- /tests/examples/completesig01.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/completesig01.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/t403.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternSynonyms #-} 2 | {-# LANGUAGE RankNTypes #-} 3 | {-# LANGUAGE ViewPatterns #-} 4 | {-# LANGUAGE TypeOperators #-} 5 | {-# LANGUAGE DataKinds #-} 6 | module T403 where 7 | 8 | pattern (:&&:) :: () => forall k. ((k :+ 1) ~ n) => a -> HoHeList k a -> HoHeList n a 9 | pattern (:&&:) x rest <- (matchNext -> Right (x, Refl, rest)) 10 | -------------------------------------------------------------------------------- /tests/examples/t403.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/t412.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeInType #-} 2 | 3 | module Typeintype 4 | ( App ) where 5 | 6 | import Data.Kind 7 | 8 | data App (f :: k -> *) 9 | -------------------------------------------------------------------------------- /tests/examples/t412.hs.exactprinter.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/t412.hs.prettyparser.golden: -------------------------------------------------------------------------------- 1 | Match 2 | -------------------------------------------------------------------------------- /tests/examples/t412.hs.prettyprinter.golden: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeInType #-} 2 | module Typeintype (App) where 3 | import Data.Kind 4 | 5 | data App (f :: k -> *) 6 | --------------------------------------------------------------------------------