Moduleghc-9.10.3GHC2021
GHC.Parser.Errors.Types
- 17 types
- 3 values
- Packageghc-9.10.3
- Exports20
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceTypes.hs
Constructors
PsErrParseLanguagePragmaPsErrUnsupportedExt !String ![String]PsErrParseOptionsPragma !StringPsErrUnknownOptionsPragma !StringPsErrUnsupportedOptionsPragma is an error that occurs when an unknown OPTIONS_GHC pragma is supplied is found.
Example(s): {-# OPTIONS_GHC foo #-}
Test case(s):
testssafeHaskellflags/SafeFlags28 testssafeHaskellflags/SafeFlags19 testssafeHaskellflags/SafeFlags29 testsparsershould_fail/T19923c testsparsershould_fail/T19923b testsparsershould_fail/readFail044 testsdriverT2499
Instances2Generic, Rep
Generic PsHeaderMessageDefined in ghc-9.10.3 · GHC.Parser.Errors.Typestype Rep PsHeaderMessage = D1 ('MetaDataDefined in ghc-9.10.3 · GHC.Parser.Errors.Types"PsHeaderMessage"
"GHC.Parser.Errors.Types"
"ghc-9.10.3-cff4"
'False) ((C1 ('MetaCons"PsErrParseLanguagePragma"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrUnsupportedExt"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String]))) :+: (C1 ('MetaCons"PsErrParseOptionsPragma"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons"PsErrUnknownOptionsPragma"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))
Constructors
PsUnknownMessage (UnknownDiagnostic (DiagnosticOpts PsMessage))An "unknown" message from the parser. This type constructor allows arbitrary messages to be embedded. The typical use case would be GHC plugins willing to emit custom diagnostics.
PsHeaderMessage !PsHeaderMessageA group of parser messages emitted in
GHC.Parser.Header. See Note [Messages from GHC.Parser.Header].PsWarnBidirectionalFormatChars (NonEmpty (PsLoc, Char, String))PsWarnBidirectionalFormatChars is a warning (controlled by the -Wwarn-bidirectional-format-characters flag) that occurs when unicode bi-directional format characters are found within in a file
The PsLoc contains the exact position in the buffer the character occurred, and the string contains a description of the character.
PsWarnTab !WordPsWarnTab is a warning (controlled by the -Wwarn-tabs flag) that occurs when tabulations (tabs) are found within a file.
Test case(s): parsershould_failT12610 parsershould_compileT9723b parsershould_compileT9723a parsershould_compileread043 parsershould_failT16270 warningsshould_compileT9230
PsWarnTransitionalLayout !TransLayoutReasonPsWarnTransitionalLayout is a warning (controlled by the -Walternative-layout-rule-transitional flag) that occurs when pipes (
|) orwhereare at the same depth of an implicit layout block.Example(s):
f :: IO () f | True = do let x = () y = () return () | True = return ()
Test case(s): layout/layout006 layout/layout003 layout/layout001
PsWarnUnrecognisedPragma !String ![String]Unrecognised pragma. First field is the actual pragma name which might be empty. Second field is the set of valid candidate pragmas.
PsWarnMisplacedPragma !FileHeaderPragmaTypePsWarnHaddockInvalidPosInvalid Haddock comment position
PsWarnHaddockIgnoreMultiMultiple Haddock comment for the same entity
PsWarnStarBinderFound binding occurrence of "*" while StarIsType is enabled
PsWarnStarIsTypeUsing "*" for
Typewithout StarIsType enabledPsWarnImportPreQualifiedPre qualified import with
WarnPrepositiveQualifiedModuleenabledPsWarnOperatorWhitespaceExtConflict !OperatorWhitespaceSymbolPsWarnOperatorWhitespace !FastString !OperatorWhitespaceOccurrencePsErrLambdaCaseLambdaCase syntax used without the extension enabled
PsErrEmptyLambdaA lambda requires at least one parameter
PsErrNumUnderscores !NumUnderscoreReasonUnderscores in literals without the extension enabled
PsErrPrimStringInvalidCharInvalid character in primitive string
PsErrMissingBlockMissing block
PsErrLexer !LexErr !LexErrKindLexer error
PsErrSuffixATSuffix occurrence of
@PsErrParse !String !PsErrParseDetailsParse errors
PsErrCmmLexerCmm lexer error
PsErrUnsupportedBoxedSumExpr !(SumOrTuple (HsExpr GhcPs))Unsupported boxed sum in expression
PsErrUnsupportedBoxedSumPat !(SumOrTuple (PatBuilder GhcPs))Unsupported boxed sum in pattern
PsErrUnexpectedQualifiedConstructor !RdrNameUnexpected qualified constructor
PsErrTupleSectionInPatTuple section in pattern context
PsErrIllegalBangPattern !(Pat GhcPs)Bang-pattern without BangPattterns enabled
PsErrOpFewArgs !StarIsType !RdrNameOperator applied to too few arguments
PsErrImportQualifiedTwiceImport: multiple occurrences of
qualifiedPsErrImportPostQualifiedPost qualified import without
ImportQualifiedPostPsErrIllegalExplicitNamespaceExplicit namespace keyword without
ExplicitNamespacesPsErrVarForTyCon !RdrNameExpecting a type constructor but found a variable
PsErrIllegalPatSynExportIllegal export form allowed by PatternSynonyms
PsErrMalformedEntityStringMalformed entity string
PsErrDotsInRecordUpdateDots used in record update
PsErrPrecedenceOutOfRange !IntPrecedence out of range
PsErrOverloadedRecordDotInvalidInvalid use of record dot syntax
.PsErrOverloadedRecordUpdateNotEnabledOverloadedRecordUpdateis not enabled.PsErrOverloadedRecordUpdateNoQualifiedFieldsCan't use qualified fields when OverloadedRecordUpdate is enabled.
PsErrInvalidDataCon !(HsType GhcPs)Cannot parse data constructor in a data/newtype declaration
PsErrInvalidInfixDataCon !(HsType GhcPs) !RdrName !(HsType GhcPs)Cannot parse data constructor in a data/newtype declaration
PsErrIllegalPromotionQuoteDataCon !RdrNameIllegal DataKinds quote mark in data/newtype constructor declaration
PsErrUnpackDataConUNPACK applied to a data constructor
PsErrUnexpectedKindAppInDataCon !DataConBuilder !(HsType GhcPs)Unexpected kind application in data/newtype declaration
PsErrInvalidRecordCon !(PatBuilder GhcPs)Not a record constructor
PsErrIllegalUnboxedStringInPat !(HsLit GhcPs)Illegal unboxed string literal in pattern
PsErrIllegalUnboxedFloatingLitInPat !(HsLit GhcPs)Illegal primitive floating point literal in pattern
PsErrDoNotationInPatDo-notation in pattern
PsErrIfThenElseInPatIf-then-else syntax in pattern
PsErrLambdaInPat HsLamVariantLambda or Lambda-case in pattern
PsErrCaseInPatcase..of in pattern
PsErrLetInPatlet-syntax in pattern
PsErrArrowExprInPat !(HsExpr GhcPs)Arrow expression-syntax in pattern
PsErrArrowCmdInPat !(HsCmd GhcPs)Arrow command-syntax in pattern
PsErrArrowCmdInExpr !(HsCmd GhcPs)Arrow command-syntax in expression
PsErrViewPatInExpr !(LHsExpr GhcPs) !(LHsExpr GhcPs)View-pattern in expression
PsErrTypeAppWithoutSpace !RdrName !(LHsExpr GhcPs)Type-application without space before
@PsErrLazyPatWithoutSpace !(LHsExpr GhcPs)Lazy-pattern (~) without space after it
PsErrBangPatWithoutSpace !(LHsExpr GhcPs)Bang-pattern (
!) without space after itPsErrUnallowedPragma !(HsPragE GhcPs)Pragma not allowed in this position
PsErrQualifiedDoInCmd !ModuleNameQualified do block in command
PsErrInvalidInfixHoleInvalid infix hole, expected an infix operator
PsErrSemiColonsInCondExpr !(HsExpr GhcPs) !Bool !(HsExpr GhcPs) !Bool !(HsExpr GhcPs)Unexpected semi-colons in conditional expression
PsErrSemiColonsInCondCmd !(HsExpr GhcPs) !Bool !(HsCmd GhcPs) !Bool !(HsCmd GhcPs)Unexpected semi-colons in conditional command
PsErrAtInPatPos@-operator in a pattern position
PsErrCaseCmdInFunAppCmd !(LHsCmd GhcPs)Unexpected case command in function application
PsErrLambdaCmdInFunAppCmd !HsLamVariant !(LHsCmd GhcPs)Unexpected lambda or case(s) command in function application
PsErrIfCmdInFunAppCmd !(LHsCmd GhcPs)Unexpected if command in function application
PsErrLetCmdInFunAppCmd !(LHsCmd GhcPs)Unexpected let command in function application
PsErrDoCmdInFunAppCmd !(LHsCmd GhcPs)Unexpected do command in function application
PsErrDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs)Unexpected do block in function application
PsErrMDoInFunAppExpr !(Maybe ModuleName) !(LHsExpr GhcPs)Unexpected mdo block in function application
PsErrCaseInFunAppExpr !(LHsExpr GhcPs)Unexpected case expression in function application
PsErrLambdaInFunAppExpr !HsLamVariant !(LHsExpr GhcPs)Unexpected lambda or case(s) expression in function application
PsErrLetInFunAppExpr !(LHsExpr GhcPs)Unexpected let expression in function application
PsErrIfInFunAppExpr !(LHsExpr GhcPs)Unexpected if expression in function application
PsErrProcInFunAppExpr !(LHsExpr GhcPs)Unexpected proc expression in function application
PsErrMalformedTyOrClDecl !(LHsType GhcPs)Malformed head of type or class declaration
PsErrIllegalWhereInDataDeclIllegal
wherekeyword in data declarationPsErrIllegalDataTypeContext !(LHsContext GhcPs)Illegal datatype context
PsErrParseErrorOnInput !OccNameParse error on input
PsErrMalformedDecl !SDoc !RdrNameMalformed ... declaration for ...
PsErrNotADataCon !RdrNameNot a data constructor
PsErrRecordSyntaxInPatSynDecl !(LPat GhcPs)Record syntax used in pattern synonym declaration
PsErrEmptyWhereInPatSynDecl !RdrNameEmpty
whereclause in pattern-synonym declarationPsErrInvalidWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs)Invalid binding name in
whereclause of pattern-synonym declarationPsErrNoSingleWhereBindInPatSynDecl !RdrName !(HsDecl GhcPs)Multiple bindings in
whereclause of pattern-synonym declarationPsErrDeclSpliceNotAtTopLevel !(SpliceDecl GhcPs)Declaration splice not a top-level
PsErrInferredTypeVarNotAllowedInferred type variables not allowed here
PsErrMultipleNamesInStandaloneKindSignature [LIdP GhcPs]Multiple names in standalone kind signatures
PsErrIllegalImportBundleFormIllegal import bundle form
PsErrIllegalRoleName !FastString [Role]Illegal role name
PsErrInvalidTypeSignature !PsInvalidTypeSignature !(LHsExpr GhcPs)Invalid type signature
PsErrUnexpectedTypeInDecl !(LHsType GhcPs) !SDoc !RdrName [LHsTypeArg GhcPs] !SDocUnexpected type in declaration
PsErrExpectedHyphenExpected a hyphen
PsErrSpaceInSCCFound a space in a SCC
PsErrEmptyDoubleQuotes !BoolFound two single quotes
PsErrInvalidPackageName !FastStringInvalid package name
PsErrInvalidRuleActivationMarkerInvalid rule activation marker
PsErrLinearFunctionLinear function found but LinearTypes not enabled
PsErrMultiWayIfMulti-way if-expression found but MultiWayIf not enabled
PsErrExplicitForall !BoolExplicit forall found but no extension allowing it is enabled
PsErrIllegalQualifiedDo !SDocFound qualified-do without QualifiedDo enabled
PsErrCmmParser !CmmParserErrorCmm parser error
PsErrIllegalTraditionalRecordSyntax !SDocIllegal traditional record syntax
TODO: distinguish errors without using SDoc
PsErrParseErrorInCmd !SDocParse error in command
TODO: distinguish errors without using SDoc
PsErrInPat !(PatBuilder GhcPs) !PsErrInPatDetailsParse error in pattern
PsErrParseRightOpSectionInPat !RdrName !(PatBuilder GhcPs)Parse error in right operator section pattern TODO: embed the proper operator, if possible
PsErrIllegalGadtRecordMultiplicity !(HsArrow GhcPs)Illegal linear arrow or multiplicity annotation in GADT record syntax
PsErrInvalidCApiImportPsErrMultipleConForNewtype !RdrName !IntPsErrUnicodeCharLooksLike Char Char StringPsErrInvalidPun !PsErrPunDetails
Instances4Generic, Diagnostic, Rep, DiagnosticOpts
Generic PsMessageDefined in ghc-9.10.3 · GHC.Parser.Errors.TypesDiagnostic PsMessageDefined in ghc-9.10.3 · GHC.Parser.Errors.Ppr · orphantype Rep PsMessage = D1 ('MetaDataDefined in ghc-9.10.3 · GHC.Parser.Errors.Types"PsMessage"
"GHC.Parser.Errors.Types"
"ghc-9.10.3-cff4"
'False) ((((((C1 ('MetaCons"PsUnknownMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UnknownDiagnostic (DiagnosticOpts PsMessage)))) :+: (C1 ('MetaCons"PsHeaderMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsHeaderMessage)) :+: C1 ('MetaCons"PsWarnBidirectionalFormatChars"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (PsLoc, Char, String)))))) :+: ((C1 ('MetaCons"PsWarnTab"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word)) :+: C1 ('MetaCons"PsWarnTransitionalLayout"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransLayoutReason))) :+: (C1 ('MetaCons"PsWarnUnrecognisedPragma"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String])) :+: C1 ('MetaCons"PsWarnMisplacedPragma"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FileHeaderPragmaType))))) :+: ((C1 ('MetaCons"PsWarnHaddockInvalidPos"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"PsWarnHaddockIgnoreMulti"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsWarnStarBinder"
'PrefixI 'False) U1)) :+: ((C1 ('MetaCons"PsWarnStarIsType"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsWarnImportPreQualified"
'PrefixI 'False) U1) :+: (C1 ('MetaCons"PsWarnOperatorWhitespaceExtConflict"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OperatorWhitespaceSymbol)) :+: C1 ('MetaCons"PsWarnOperatorWhitespace"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OperatorWhitespaceOccurrence)))))) :+: (((C1 ('MetaCons"PsErrLambdaCase"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"PsErrEmptyLambda"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrNumUnderscores"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumUnderscoreReason)))) :+: ((C1 ('MetaCons"PsErrPrimStringInvalidChar"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrMissingBlock"
'PrefixI 'False) U1) :+: (C1 ('MetaCons"PsErrLexer"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LexErr) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LexErrKind)) :+: C1 ('MetaCons"PsErrSuffixAT"
'PrefixI 'False) U1))) :+: ((C1 ('MetaCons"PsErrParse"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrParseDetails)) :+: (C1 ('MetaCons"PsErrCmmLexer"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrUnsupportedBoxedSumExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SumOrTuple (HsExpr GhcPs)))))) :+: ((C1 ('MetaCons"PsErrUnsupportedBoxedSumPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SumOrTuple (PatBuilder GhcPs)))) :+: C1 ('MetaCons"PsErrUnexpectedQualifiedConstructor"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))) :+: (C1 ('MetaCons"PsErrTupleSectionInPat"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrIllegalBangPattern"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcPs)))))))) :+: ((((C1 ('MetaCons"PsErrOpFewArgs"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StarIsType) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons"PsErrImportQualifiedTwice"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrImportPostQualified"
'PrefixI 'False) U1)) :+: ((C1 ('MetaCons"PsErrIllegalExplicitNamespace"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrVarForTyCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))) :+: (C1 ('MetaCons"PsErrIllegalPatSynExport"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrMalformedEntityString"
'PrefixI 'False) U1))) :+: ((C1 ('MetaCons"PsErrDotsInRecordUpdate"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"PsErrPrecedenceOutOfRange"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :+: C1 ('MetaCons"PsErrOverloadedRecordDotInvalid"
'PrefixI 'False) U1)) :+: ((C1 ('MetaCons"PsErrOverloadedRecordUpdateNotEnabled"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrOverloadedRecordUpdateNoQualifiedFields"
'PrefixI 'False) U1) :+: (C1 ('MetaCons"PsErrInvalidDataCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs))) :+: C1 ('MetaCons"PsErrInvalidInfixDataCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)))))))) :+: (((C1 ('MetaCons"PsErrIllegalPromotionQuoteDataCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons"PsErrUnpackDataCon"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrUnexpectedKindAppInDataCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataConBuilder) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs))))) :+: ((C1 ('MetaCons"PsErrInvalidRecordCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs))) :+: C1 ('MetaCons"PsErrIllegalUnboxedStringInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsLit GhcPs)))) :+: (C1 ('MetaCons"PsErrIllegalUnboxedFloatingLitInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsLit GhcPs))) :+: C1 ('MetaCons"PsErrDoNotationInPat"
'PrefixI 'False) U1))) :+: (((C1 ('MetaCons"PsErrIfThenElseInPat"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrLambdaInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsLamVariant))) :+: (C1 ('MetaCons"PsErrCaseInPat"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrLetInPat"
'PrefixI 'False) U1)) :+: ((C1 ('MetaCons"PsErrArrowExprInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons"PsErrArrowCmdInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs)))) :+: (C1 ('MetaCons"PsErrArrowCmdInExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs))) :+: C1 ('MetaCons"PsErrViewPatInExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))))))) :+: (((((C1 ('MetaCons"PsErrTypeAppWithoutSpace"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: (C1 ('MetaCons"PsErrLazyPatWithoutSpace"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons"PsErrBangPatWithoutSpace"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons"PsErrUnallowedPragma"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsPragE GhcPs))) :+: C1 ('MetaCons"PsErrQualifiedDoInCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))) :+: (C1 ('MetaCons"PsErrInvalidInfixHole"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrSemiColonsInCondExpr"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)))))))) :+: ((C1 ('MetaCons"PsErrSemiColonsInCondCmd"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs))))) :+: (C1 ('MetaCons"PsErrAtInPatPos"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrCaseCmdInFunAppCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))))) :+: ((C1 ('MetaCons"PsErrLambdaCmdInFunAppCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsLamVariant) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: C1 ('MetaCons"PsErrIfCmdInFunAppCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs)))) :+: (C1 ('MetaCons"PsErrLetCmdInFunAppCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: C1 ('MetaCons"PsErrDoCmdInFunAppCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))))))) :+: (((C1 ('MetaCons"PsErrDoInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: (C1 ('MetaCons"PsErrMDoInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons"PsErrCaseInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons"PsErrLambdaInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsLamVariant) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons"PsErrLetInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))) :+: (C1 ('MetaCons"PsErrIfInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons"PsErrProcInFunAppExpr"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))))) :+: ((C1 ('MetaCons"PsErrMalformedTyOrClDecl"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs))) :+: (C1 ('MetaCons"PsErrIllegalWhereInDataDecl"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrIllegalDataTypeContext"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsContext GhcPs))))) :+: ((C1 ('MetaCons"PsErrParseErrorOnInput"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)) :+: C1 ('MetaCons"PsErrMalformedDecl"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))) :+: (C1 ('MetaCons"PsErrNotADataCon"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons"PsErrRecordSyntaxInPatSynDecl"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LPat GhcPs)))))))) :+: ((((C1 ('MetaCons"PsErrEmptyWhereInPatSynDecl"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons"PsErrInvalidWhereBindInPatSynDecl"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))) :+: C1 ('MetaCons"PsErrNoSingleWhereBindInPatSynDecl"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))))) :+: ((C1 ('MetaCons"PsErrDeclSpliceNotAtTopLevel"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SpliceDecl GhcPs))) :+: C1 ('MetaCons"PsErrInferredTypeVarNotAllowed"
'PrefixI 'False) U1) :+: (C1 ('MetaCons"PsErrMultipleNamesInStandaloneKindSignature"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LIdP GhcPs])) :+: C1 ('MetaCons"PsErrIllegalImportBundleForm"
'PrefixI 'False) U1))) :+: ((C1 ('MetaCons"PsErrIllegalRoleName"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: (C1 ('MetaCons"PsErrInvalidTypeSignature"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsInvalidTypeSignature) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons"PsErrUnexpectedTypeInDecl"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LHsTypeArg GhcPs]) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)))))) :+: ((C1 ('MetaCons"PsErrExpectedHyphen"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrSpaceInSCC"
'PrefixI 'False) U1) :+: (C1 ('MetaCons"PsErrEmptyDoubleQuotes"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons"PsErrInvalidPackageName"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString)))))) :+: (((C1 ('MetaCons"PsErrInvalidRuleActivationMarker"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"PsErrLinearFunction"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrMultiWayIf"
'PrefixI 'False) U1)) :+: ((C1 ('MetaCons"PsErrExplicitForall"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons"PsErrIllegalQualifiedDo"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc))) :+: (C1 ('MetaCons"PsErrCmmParser"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CmmParserError)) :+: C1 ('MetaCons"PsErrIllegalTraditionalRecordSyntax"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc))))) :+: (((C1 ('MetaCons"PsErrParseErrorInCmd"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: C1 ('MetaCons"PsErrInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs)) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrInPatDetails))) :+: (C1 ('MetaCons"PsErrParseRightOpSectionInPat"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs))) :+: C1 ('MetaCons"PsErrIllegalGadtRecordMultiplicity"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsArrow GhcPs))))) :+: ((C1 ('MetaCons"PsErrInvalidCApiImport"
'PrefixI 'False) U1 :+: C1 ('MetaCons"PsErrMultipleConForNewtype"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int))) :+: (C1 ('MetaCons"PsErrUnicodeCharLooksLike"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))) :+: C1 ('MetaCons"PsErrInvalidPun"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrPunDetails)))))))))type DiagnosticOpts PsMessage = NoDiagnosticOptsDefined in ghc-9.10.3 · GHC.Parser.Errors.Ppr · orphan
Extra details about a parse error, which helps us in determining which should be the hints to suggest.
Constructors
PsErrParseDetailsped_th_enabled :: !Boolped_do_in_last_100 :: !BoolIs there a
doin the last 100 characters?ped_mdo_in_last_100 :: !BoolIs there an
mdoin the last 100 characters?ped_pat_syn_enabled :: !BoolIs
PatternSynonymsenabled?ped_pattern_parsed :: !BoolDid we parse a "pattern" keyword?
Is the parsed pattern recursive?
Instances1Eq
Eq PatIncompleteDoBlockDefined in ghc-9.10.3 · GHC.Parser.Errors.Types
Extra information for the expression GHC is currently inspecting/parsing. It can be used to generate more informative parser diagnostics and hints.
Constructors
ParseContextis_infix :: !Maybe RdrNameIf Just, this is an infix pattern with the bound operator name
incomplete_do_block :: !PatIncompleteDoBlockDid the parser likely fail due to an incomplete do block?
Instances1Eq
Eq ParseContextDefined in ghc-9.10.3 · GHC.Parser.Errors.Types
Constructors
PEIP_NegAppNegative application pattern?
PEIP_TypeArgs [HsConPatTyArg GhcPs]The list of type arguments for the pattern
PEIP_RecPattern [LPat GhcPs] !PatIsRecursive !ParseContextPEIP_OtherPatDetails !ParseContext
Builds a PsErrInPatDetails with the information provided by the ParseContext.
Instances3Eq, Ord, Show
Eq NumUnderscoreReasonDefined in ghc-9.10.3 · GHC.Parser.Errors.TypesOrd NumUnderscoreReasonDefined in ghc-9.10.3 · GHC.Parser.Errors.TypesShow NumUnderscoreReasonDefined in ghc-9.10.3 · GHC.Parser.Errors.Types
Constructors
LexErrKind_EOFEnd of input
LexErrKind_UTF8UTF-8 decoding error
LexErrKind_Char !CharError at given character
Instances3Eq, Ord, Show
Eq LexErrKindDefined in ghc-9.10.3 · GHC.Parser.Errors.TypesOrd LexErrKindDefined in ghc-9.10.3 · GHC.Parser.Errors.TypesShow LexErrKindDefined in ghc-9.10.3 · GHC.Parser.Errors.Types
Constructors
LexErrorLexical error
LexUnknownPragmaUnknown pragma
LexErrorInPragmaLexical error in pragma
LexNumEscapeRangeNumeric escape sequence out of range
LexStringCharLitLexical error in string/character literal
LexStringCharLitEOFUnexpected end-of-file in string/character literal
LexUnterminatedCommentUnterminated `{-'
LexUnterminatedOptionsUnterminated OPTIONS pragma
LexUnterminatedQQUnterminated quasiquotation
Errors from the Cmm parser
Constructors
CmmUnknownPrimitive !FastStringUnknown Cmm primitive
CmmUnknownMacro !FastStringUnknown macro
CmmUnknownCConv !StringUnknown calling convention
CmmUnrecognisedSafety !StringUnrecognised safety
CmmUnrecognisedHint !StringUnrecognised hint
Constructors
TransLayout_Where"
whereclause at the same depth as implicit layout block"TransLayout_Pipe"
|at the same depth as implicit layout block")