ghcide-2.10.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

Development.IDE.GHC.Compat.Error

Synopsis

Top-level error types and lens for easy access

data MsgEnvelope e #

An envelope for GHC's facts about a running program, parameterised over the domain-specific (i.e. parsing, typecheck-renaming, etc) diagnostics.

To say things differently, GHC emits diagnostics about the running program, each of which is wrapped into a MsgEnvelope that carries specific information like where the error happened, etc. Finally, multiple MsgEnvelopes are aggregated into Messages that are returned to the user.

Constructors

MsgEnvelope 

Fields

Instances

Instances details
Foldable MsgEnvelope 
Instance details

Defined in GHC.Types.Error

Methods

fold :: Monoid m => MsgEnvelope m -> m #

foldMap :: Monoid m => (a -> m) -> MsgEnvelope a -> m #

foldMap' :: Monoid m => (a -> m) -> MsgEnvelope a -> m #

foldr :: (a -> b -> b) -> b -> MsgEnvelope a -> b #

foldr' :: (a -> b -> b) -> b -> MsgEnvelope a -> b #

foldl :: (b -> a -> b) -> b -> MsgEnvelope a -> b #

foldl' :: (b -> a -> b) -> b -> MsgEnvelope a -> b #

foldr1 :: (a -> a -> a) -> MsgEnvelope a -> a #

foldl1 :: (a -> a -> a) -> MsgEnvelope a -> a #

toList :: MsgEnvelope a -> [a] #

null :: MsgEnvelope a -> Bool #

length :: MsgEnvelope a -> Int #

elem :: Eq a => a -> MsgEnvelope a -> Bool #

maximum :: Ord a => MsgEnvelope a -> a #

minimum :: Ord a => MsgEnvelope a -> a #

sum :: Num a => MsgEnvelope a -> a #

product :: Num a => MsgEnvelope a -> a #

Traversable MsgEnvelope 
Instance details

Defined in GHC.Types.Error

Methods

traverse :: Applicative f => (a -> f b) -> MsgEnvelope a -> f (MsgEnvelope b) #

sequenceA :: Applicative f => MsgEnvelope (f a) -> f (MsgEnvelope a) #

mapM :: Monad m => (a -> m b) -> MsgEnvelope a -> m (MsgEnvelope b) #

sequence :: Monad m => MsgEnvelope (m a) -> m (MsgEnvelope a) #

Functor MsgEnvelope 
Instance details

Defined in GHC.Types.Error

Methods

fmap :: (a -> b) -> MsgEnvelope a -> MsgEnvelope b #

(<$) :: a -> MsgEnvelope b -> MsgEnvelope a #

Show (MsgEnvelope DiagnosticMessage) 
Instance details

Defined in GHC.Types.Error

data GhcMessage where #

The umbrella type that encompasses all the different messages that GHC might output during the different compilation stages. See Note [GhcMessage].

Constructors

GhcPsMessage :: PsMessage -> GhcMessage

A message from the parsing phase.

GhcTcRnMessage :: TcRnMessage -> GhcMessage

A message from typecheck/renaming phase.

GhcDsMessage :: DsMessage -> GhcMessage

A message from the desugaring (HsToCore) phase.

GhcDriverMessage :: DriverMessage -> GhcMessage

A message from the driver.

GhcUnknownMessage :: UnknownDiagnostic -> GhcMessage

An "escape" hatch which can be used when we don't know the source of the message or if the message is not one of the typed ones. The Diagnostic and Typeable constraints ensure that if we know, at pattern-matching time, the originating type, we can attempt a cast and access the fully-structured error. This would be the case for a GHC plugin that offers a domain-specific error type but that doesn't want to place the burden on IDEs/application code to "know" it. The Diagnostic constraint ensures that worst case scenario we can still render this into something which can be eventually converted into a DecoratedSDoc.

Error messages for the typechecking and renamer phase

data TcRnMessage where #

An error which might arise during typechecking/renaming.

Constructors

TcRnUnknownMessage :: UnknownDiagnostic -> TcRnMessage

Simply wraps an unknown Diagnostic message a. It can be used by plugins to provide custom diagnostic messages originated during typechecking/renaming.

TcRnMessageWithInfo

TcRnMessageWithInfo is a constructor which is used when extra information is needed to be provided in order to qualify a diagnostic and where it was originated (and why). It carries an extra UnitState which can be used to pretty-print some names and it wraps a TcRnMessageDetailed, which includes any extra context associated with this diagnostic.

Fields

TcRnWithHsDocContext :: !HsDocContext -> !TcRnMessage -> TcRnMessage

TcRnWithHsDocContext annotates an error message with the context in which it originated.

TcRnSolverReport :: SolverReportWithCtxt -> DiagnosticReason -> [GhcHint] -> TcRnMessage

TcRnSolverReport is the constructor used to report unsolved constraints after constraint solving, as well as other errors such as hole fit errors.

See the documentation of the TcSolverReportMsg datatype for an overview of the different errors.

TcRnRedundantConstraints

TcRnRedundantConstraints is a warning that is emitted when a binding has a user-written type signature which contains superfluous constraints.

Example:

f :: (Eq a, Ord a) => a -> a -> a f x y = (x < y) || x == y -- `Eq a` is superfluous: the `Ord a` constraint suffices.

Test cases: T9939, T10632, T18036a, T20602, PluralS, T19296.

Fields

  • :: [Id]
     
  • -> (SkolemInfoAnon, Bool)

    The contextual skolem info. The boolean controls whether we want to show it in the user message. (Nice to keep track of the info in either case, for other users of the GHC API.)

  • -> TcRnMessage
     
TcRnInaccessibleCode

TcRnInaccessibleCode is a warning that is emitted when the RHS of a pattern match is inaccessible, because the constraint solver has detected a contradiction.

Example:

data B a where { MkTrue :: B True; MkFalse :: B False }

foo :: B False -> Bool foo MkFalse = False foo MkTrue = True -- Inaccessible: requires True ~ False

Test cases: T7293, T7294, T15558, T17646, T18572, T18610, tcfail167.

Fields

TcRnTypeDoesNotHaveFixedRuntimeRep :: !Type -> !FixedRuntimeRepProvenance -> !ErrInfo -> TcRnMessage

A type which was expected to have a fixed runtime representation does not have a fixed runtime representation.

Example:

data D (a :: TYPE r) = MkD a

Test cases: T11724, T18534, RepPolyPatSynArg, RepPolyPatSynUnliftedNewtype, RepPolyPatSynRes, T20423

TcRnImplicitLift :: Name -> !ErrInfo -> TcRnMessage

TcRnImplicitLift is a warning (controlled with -Wimplicit-lift) that occurs when a Template Haskell quote implicitly uses lift.

Example: warning1 :: Lift t => t -> Q Exp warning1 x = [| x |]

Test cases: th/T17804

TcRnUnusedPatternBinds :: HsBind GhcRn -> TcRnMessage

TcRnUnusedPatternBinds is a warning (controlled with -Wunused-pattern-binds) that occurs if a pattern binding binds no variables at all, unless it is a lone wild-card pattern, or a banged pattern.

Example: Just _ = rhs3 -- Warning: unused pattern binding (_, _) = rhs4 -- Warning: unused pattern binding _ = rhs3 -- No warning: lone wild-card pattern !() = rhs4 -- No warning: banged pattern; behaves like seq

Test cases: rename/{T13646,T17c,T17e,T7085}

TcRnDodgyImports :: RdrName -> TcRnMessage

TcRnDodgyImports is a warning (controlled with -Wdodgy-imports) that occurs when a datatype T is imported with all constructors, i.e. 'T(..)', but has been exported abstractly, i.e. T.

Test cases: renameshould_compileT7167

TcRnDodgyExports :: Name -> TcRnMessage

TcRnDodgyExports is a warning (controlled by -Wdodgy-exports) that occurs when a datatype T is exported with all constructors, i.e. 'T(..)', but is it just a type synonym or a type/data family.

Example: module Foo ( T(..) -- Warning: T is a type synonym , A(..) -- Warning: A is a type family , C(..) -- Warning: C is a data family ) where

type T = Int type family A :: * -> * data family C :: * -> *

Test cases: warningsshould_compileDodgyExports01

TcRnMissingImportList :: IE GhcPs -> TcRnMessage

TcRnMissingImportList is a warning (controlled by -Wmissing-import-lists) that occurs when an import declaration does not explicitly list all the names brought into scope.

Test cases: renameshould_compileT4489

TcRnUnsafeDueToPlugin :: TcRnMessage

When a module marked trustworthy or unsafe (using -XTrustworthy or -XUnsafe) is compiled with a plugin, the TcRnUnsafeDueToPlugin warning (controlled by -Wunsafe) is used as the reason the module was inferred to be unsafe. This warning is not raised if the -fplugin-trustworthy flag is passed.

Test cases: plugins/T19926

TcRnModMissingRealSrcSpan :: Module -> TcRnMessage

TcRnModMissingRealSrcSpan is an error that occurs when compiling a module that lacks an associated RealSrcSpan.

Test cases: None

TcRnIdNotExportedFromModuleSig :: Name -> Module -> TcRnMessage

TcRnIdNotExportedFromModuleSig is an error pertaining to backpack that occurs when an identifier required by a signature is not exported by the module or signature that is being used as a substitution for that signature.

Example(s): None

Test cases: backpackshould_failbkpfail36

TcRnIdNotExportedFromLocalSig :: Name -> TcRnMessage

TcRnIdNotExportedFromLocalSig is an error pertaining to backpack that occurs when an identifier which is necessary for implementing a module signature is not exported from that signature.

Example(s): None

Test cases: backpackshould_failbkpfail30 backpackshould_failbkpfail31 backpackshould_failbkpfail34

TcRnShadowedName :: OccName -> ShadowedNameProvenance -> TcRnMessage

TcRnShadowedName is a warning (controlled by -Wname-shadowing) that occurs whenever an inner-scope value has the same name as an outer-scope value, i.e. the inner value shadows the outer one. This can catch typographical errors that turn into hard-to-find bugs. The warning is suppressed for names beginning with an underscore.

Examples(s): f = ... let f = id in ... f ... -- NOT OK, f is shadowed f x = do { _ignore <- this; _ignore <- that; return (the other) } -- suppressed via underscore

Test cases: typecheckshould_compileT10971a renameshould_compilern039 renameshould_compilern064 renameshould_compileT1972 renameshould_failT2723 renameshould_compileT3262 driver/werror

TcRnDuplicateWarningDecls :: !(LocatedN RdrName) -> !RdrName -> TcRnMessage

TcRnDuplicateWarningDecls is an error that occurs whenever a warning is declared twice.

Examples(s): None.

Test cases: None.

TcRnSimplifierTooManyIterations

TcRnDuplicateWarningDecls is an error that occurs whenever the constraint solver in the simplifier hits the iterations' limit.

Examples(s): None.

Test cases: None.

Fields

TcRnIllegalPatSynDecl :: !(LIdP GhcPs) -> TcRnMessage

TcRnIllegalPatSynDecl is an error that occurs whenever there is an illegal pattern synonym declaration.

Examples(s):

varWithLocalPatSyn x = case x of P -> () where pattern P = () -- not valid, it can't be local, it must be defined at top-level.

Test cases: patsynshould_faillocal

TcRnLinearPatSyn :: !Type -> TcRnMessage

TcRnLinearPatSyn is an error that occurs whenever a pattern synonym signature uses a field that is not unrestricted.

Example(s): None

Test cases: linearshould_failLinearPatSyn2

TcRnEmptyRecordUpdate :: TcRnMessage

TcRnEmptyRecordUpdate is an error that occurs whenever a record is updated without specifying any field.

Examples(s):

$(deriveJSON defaultOptions{} ''Bad) -- not ok, no fields selected for update of defaultOptions

Test cases: th/T12788

TcRnIllegalFieldPunning :: !(Located RdrName) -> TcRnMessage

TcRnIllegalFieldPunning is an error that occurs whenever field punning is used without the NamedFieldPuns extension enabled.

Examples(s):

data Foo = Foo { a :: Int }

foo :: Foo -> Int foo Foo{a} = a -- Not ok, punning used without extension.

Test cases: parsershould_failRecordDotSyntaxFail12

TcRnIllegalWildcardsInRecord :: !RecordFieldPart -> TcRnMessage

TcRnIllegalWildcardsInRecord is an error that occurs whenever wildcards (..) are used in a record without the relevant extension being enabled.

Examples(s):

data Foo = Foo { a :: Int }

foo :: Foo -> Int foo Foo{..} = a -- Not ok, wildcards used without extension.

Test cases: parsershould_failRecordWildCardsFail

TcRnIllegalWildcardInType

TcRnIllegalWildcardInType is an error that occurs when a wildcard appears in a type in a location in which wildcards aren't allowed.

Examples:

Type synonyms:

type T = _

Class declarations and instances:

class C _ instance C _

Standalone kind signatures:

type D :: _ data D

Test cases: ExtraConstraintsWildcardInTypeSplice2 ExtraConstraintsWildcardInTypeSpliceUsed ExtraConstraintsWildcardNotLast ExtraConstraintsWildcardTwice NestedExtraConstraintsWildcard NestedNamedExtraConstraintsWildcard PartialClassMethodSignature PartialClassMethodSignature2 T12039 T13324_fail1 UnnamedConstraintWildcard1 UnnamedConstraintWildcard2 WildcardInADT1 WildcardInADT2 WildcardInADT3 WildcardInADTContext1 WildcardInDefault WildcardInDefaultSignature WildcardInDeriving WildcardInForeignExport WildcardInForeignImport WildcardInGADT1 WildcardInGADT2 WildcardInInstanceHead WildcardInInstanceSig WildcardInNewtype WildcardInPatSynSig WildcardInStandaloneDeriving WildcardInTypeFamilyInstanceRHS WildcardInTypeSynonymRHS saks_fail003 T15433a

Fields

TcRnDuplicateFieldName :: !RecordFieldPart -> NonEmpty RdrName -> TcRnMessage

TcRnDuplicateFieldName is an error that occurs whenever there are duplicate field names in a record.

Examples(s): None.

Test cases: None.

TcRnIllegalViewPattern :: !(Pat GhcPs) -> TcRnMessage

TcRnIllegalViewPattern is an error that occurs whenever the ViewPatterns syntax is used but the ViewPatterns language extension is not enabled.

Examples(s): data Foo = Foo { a :: Int }

foo :: Foo -> Int foo (a -> l) = l -- not OK, the ViewPattern extension is not enabled.

Test cases: parsershould_failViewPatternsFail

TcRnCharLiteralOutOfRange :: !Char -> TcRnMessage

TcRnCharLiteralOutOfRange is an error that occurs whenever a character is out of range.

Examples(s): None

Test cases: None

TcRnIllegalWildcardsInConstructor :: !Name -> TcRnMessage

TcRnIllegalWildcardsInConstructor is an error that occurs whenever the record wildcards '..' are used inside a constructor without labeled fields.

Examples(s): None

Test cases: None

TcRnIgnoringAnnotations :: [LAnnDecl GhcRn] -> TcRnMessage

TcRnIgnoringAnnotations is a warning that occurs when the source code contains annotation pragmas but the platform in use does not support an external interpreter such as GHCi and therefore the annotations are ignored.

Example(s): None

Test cases: None

TcRnAnnotationInSafeHaskell :: TcRnMessage

TcRnAnnotationInSafeHaskell is an error that occurs if annotation pragmas are used in conjunction with Safe Haskell.

Example(s): None

Test cases: annotationsshould_failT10826

TcRnInvalidTypeApplication :: Type -> LHsWcType GhcRn -> TcRnMessage

TcRnInvalidTypeApplication is an error that occurs when a visible type application is used with an expression that does not accept "specified" type arguments.

Example(s): foo :: forall {a}. a -> a foo x = x bar :: () bar = let x = foo @Int 42 in ()

Test cases: overloadedrecfldsshould_failoverloadedlabelsfail03 typecheckshould_failExplicitSpecificity1 typecheckshould_failExplicitSpecificity10 typecheckshould_failExplicitSpecificity2 typecheckshould_failT17173 typecheckshould_failVtaFail

TcRnTagToEnumMissingValArg :: TcRnMessage

TcRnTagToEnumMissingValArg is an error that occurs when the 'tagToEnum#' function is not applied to a single value argument.

Example(s): tagToEnum# 1 2

Test cases: None

TcRnTagToEnumUnspecifiedResTy :: Type -> TcRnMessage

TcRnTagToEnumUnspecifiedResTy is an error that occurs when the 'tagToEnum#' function is not given a concrete result type.

Example(s): foo :: forall a. a foo = tagToEnum# 0#

Test cases: typecheckshould_failtcfail164

TcRnTagToEnumResTyNotAnEnum :: Type -> TcRnMessage

TcRnTagToEnumResTyNotAnEnum is an error that occurs when the 'tagToEnum#' function is given a result type that is not an enumeration type.

Example(s): foo :: Int -- not an enumeration TyCon foo = tagToEnum# 0#

Test cases: typecheckshould_failtcfail164

TcRnTagToEnumResTyTypeData :: Type -> TcRnMessage

TcRnTagToEnumResTyTypeData is an error that occurs when the 'tagToEnum#' function is given a result type that is headed by a type data type, as the data constructors of a type data do not exist at the term level.

Example(s): type data Letter = A | B | C

foo :: Letter foo = tagToEnum# 0#

Test cases: type-datashould_failTDTagToEnum.hs

TcRnArrowIfThenElsePredDependsOnResultTy :: TcRnMessage

TcRnArrowIfThenElsePredDependsOnResultTy is an error that occurs when the predicate type of an ifThenElse expression in arrow notation depends on the type of the result.

Example(s): None

Test cases: None

TcRnIllegalHsBootFileDecl :: TcRnMessage

TcRnIllegalHsBootFileDecl is an error that occurs when an hs-boot file contains declarations that are not allowed, such as bindings.

Example(s): None

Test cases: None

TcRnRecursivePatternSynonym :: LHsBinds GhcRn -> TcRnMessage

TcRnRecursivePatternSynonym is an error that occurs when a pattern synonym is defined in terms of itself, either directly or indirectly.

Example(s): pattern A = B pattern B = A

Test cases: patsynshould_failT16900

TcRnPartialTypeSigTyVarMismatch

TcRnPartialTypeSigTyVarMismatch is an error that occurs when a partial type signature attempts to unify two different types.

Example(s): f :: a -> b -> _ f x y = [x, y]

Test cases: partial-sigsshould_failT14449

Fields

TcRnPartialTypeSigBadQuantifier

TcRnPartialTypeSigBadQuantifier is an error that occurs when a type variable being quantified over in the partial type signature of a function gets unified with a type that is free in that function's context.

Example(s): foo :: Num a => a -> a foo xxx = g xxx where g :: forall b. Num b => _ -> b g y = xxx + y

Test cases: partial-sigshould_failT14479

Fields

TcRnMissingSignature

TcRnMissingSignature is a warning that occurs when a top-level binding or a pattern synonym does not have a type signature.

Controlled by the flags: -Wmissing-signatures -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures -Wmissing-exported-pattern-synonym-signatures -Wmissing-kind-signatures

Test cases: T11077 (top-level bindings) T12484 (pattern synonyms) T19564 (kind signatures)

Fields

  • :: MissingSignature
     
  • -> Exported
     
  • -> Bool

    True: -Wmissing-signatures overrides -Wmissing-exported-signatures, or -Wmissing-pattern-synonym-signatures overrides -Wmissing-exported-pattern-synonym-signatures

  • -> TcRnMessage
     
TcRnPolymorphicBinderMissingSig :: Name -> Type -> TcRnMessage

TcRnPolymorphicBinderMissingSig is a warning controlled by -Wmissing-local-signatures that occurs when a local polymorphic binding lacks a type signature.

Example(s): id a = a

Test cases: warningsshould_compileT12574

TcRnOverloadedSig :: TcIdSigInfo -> TcRnMessage

TcRnOverloadedSig is an error that occurs when a binding group conflicts with the monomorphism restriction.

Example(s): data T a = T a mono = ... where x :: Applicative f => f a T x = ...

Test cases: typecheckshould_compileT11339

TcRnTupleConstraintInst :: !Class -> TcRnMessage

TcRnTupleConstraintInst is an error that occurs whenever an instance for a tuple constraint is specified.

Examples(s): class C m a class D m a f :: (forall a. Eq a => (C m a, D m a)) => m a f = undefined

Test cases: quantified-constraints/T15334

TcRnAbstractClassInst :: !Class -> TcRnMessage

TcRnAbstractClassInst is an error that occurs whenever an instance of an abstract class is specified.

Examples(s): -- A.hs-boot module A where class C a

  • - B.hs module B where import {-# SOURCE #-} A instance C Int where
  • - A.hs module A where import B class C a where f :: a
  • - Main.hs import A main = print (f :: Int)

Test cases: typecheckshould_failT13068

TcRnNoClassInstHead :: !Type -> TcRnMessage

TcRnNoClassInstHead is an error that occurs whenever an instance head is not headed by a class.

Examples(s): instance c

Test cases: typecheckrenameT5513 typecheckrenameT16385

TcRnUserTypeError :: !Type -> TcRnMessage

TcRnUserTypeError is an error that occurs due to a user's custom type error, which can be triggered by adding a TypeError constraint in a type signature or typeclass instance.

Examples(s): f :: TypeError (Text "This is a type error") f = undefined

Test cases: typecheckshould_failCustomTypeErrors02 typecheckshould_failCustomTypeErrors03

TcRnConstraintInKind :: !Type -> TcRnMessage

TcRnConstraintInKind is an error that occurs whenever a constraint is specified in a kind.

Examples(s): data Q :: Eq a => Type where {}

Test cases: dependentshould_failT13895 polykinds/T16263 saksshould_failsaks_fail004 typecheckshould_failT16059a typecheckshould_failT18714

TcRnUnboxedTupleOrSumTypeFuncArg

TcRnUnboxedTupleTypeFuncArg is an error that occurs whenever an unboxed tuple or unboxed sum type is specified as a function argument, when the appropriate extension (`-XUnboxedTuples` or `-XUnboxedSums`) isn't enabled.

Examples(s): -- T15073.hs import T15073a newtype Foo a = MkFoo a deriving P

  • - T15073a.hs class P a where p :: a -> (# a #)

Test cases: derivingshould_failT15073.hs derivingshould_failT15073a.hs typecheckshould_failT16059d

Fields

TcRnLinearFuncInKind :: !Type -> TcRnMessage

TcRnLinearFuncInKind is an error that occurs whenever a linear function is specified in a kind.

Examples(s): data A :: * %1 -> *

Test cases: linearshould_failLinearKind linearshould_failLinearKind2 linearshould_failLinearKind3

TcRnForAllEscapeError :: !Type -> !Kind -> TcRnMessage

TcRnForAllEscapeError is an error that occurs whenever a quantified type's kind mentions quantified type variable.

Examples(s): type T :: TYPE (BoxedRep l) data T = MkT

Test cases: unlifted-datatypesshould_failUnlDataNullaryPoly

TcRnVDQInTermType :: !(Maybe Type) -> TcRnMessage

TcRnVDQInTermType is an error that occurs whenever a visible dependent quantification is specified in the type of a term.

Examples(s): a = (undefined :: forall k -> k -> Type) @Int

Test cases: dependentshould_failT15859 dependentshould_failT16326_Fail1 dependentshould_failT16326_Fail2 dependentshould_failT16326_Fail3 dependentshould_failT16326_Fail4 dependentshould_failT16326_Fail5 dependentshould_failT16326_Fail6 dependentshould_failT16326_Fail7 dependentshould_failT16326_Fail8 dependentshould_failT16326_Fail9 dependentshould_failT16326_Fail10 dependentshould_failT16326_Fail11 dependentshould_failT16326_Fail12 dependentshould_failT17687 dependentshould_failT18271

TcRnBadQuantPredHead :: !Type -> TcRnMessage

TcRnBadQuantPredHead is an error that occurs whenever a quantified predicate lacks a class or type variable head.

Examples(s): class (forall a. A t a => A t [a]) => B t where type A t a :: Constraint

Test cases: quantified-constraints/T16474

TcRnIllegalTupleConstraint :: !Type -> TcRnMessage

TcRnIllegalTupleConstraint is an error that occurs whenever an illegal tuple constraint is specified.

Examples(s): g :: ((Show a, Num a), Eq a) => a -> a g = undefined

Test cases: typecheckshould_failtcfail209a

TcRnNonTypeVarArgInConstraint :: !Type -> TcRnMessage

TcRnNonTypeVarArgInConstraint is an error that occurs whenever a non type-variable argument is specified in a constraint.

Examples(s): data T instance Eq Int => Eq T

Test cases: ghciscriptsT13202 ghciscriptsT13202a polykinds/T12055a typecheckshould_failT10351 typecheckshould_failT19187 typecheckshould_failT6022 typecheckshould_failT8883

TcRnIllegalImplicitParam :: !Type -> TcRnMessage

TcRnIllegalImplicitParam is an error that occurs whenever an illegal implicit parameter is specified.

Examples(s): type Bla = ?x::Int data T = T instance Bla => Eq T

Test cases: polykinds/T11466 typecheckshould_failT8912 typecheckshould_failtcfail041 typecheckshould_failtcfail211 typecheckshould_failtcrun045

TcRnIllegalConstraintSynonymOfKind :: !Type -> TcRnMessage

TcRnIllegalConstraintSynonymOfKind is an error that occurs whenever an illegal constraint synonym of kind is specified.

Examples(s): type Showish = Show f :: (Showish a) => a -> a f = undefined

Test cases: typecheckshould_failtcfail209

TcRnIllegalClassInst :: !TyConFlavour -> TcRnMessage

TcRnIllegalClassInst is an error that occurs whenever a class instance is specified for a non-class.

Examples(s): type C1 a = (Show (a -> Bool)) instance C1 Int where

Test cases: polykinds/T13267

TcRnOversaturatedVisibleKindArg :: !Type -> TcRnMessage

TcRnOversaturatedVisibleKindArg is an error that occurs whenever an illegal oversaturated visible kind argument is specified.

Examples(s): type family F2 :: forall (a :: Type). Type where F2 @a = Maybe a

Test cases: typecheckshould_failT15793 typecheckshould_failT16255

TcRnBadAssociatedType :: !Name -> !Name -> TcRnMessage

TcRnBadAssociatedType is an error that occurs whenever a class doesn't have an associated type.

Examples(s): $(do d <- instanceD (cxt []) (conT ''Eq appT conT ''Foo) [tySynInstD $ tySynEqn Nothing (conT ''Rep appT conT ''Foo) (conT ''Maybe)] return [d]) ======> instance Eq Foo where type Rep Foo = Maybe

Test cases: th/T12387a

TcRnForAllRankErr :: !Rank -> !Type -> TcRnMessage

TcRnForAllRankErr is an error that occurs whenever an illegal ranked type is specified.

Examples(s): foo :: (a,b) -> (a~b => t) -> (a,b) foo p x = p

Test cases: - ghcishould_runT15806 - indexed-typesshould_failSimpleFail15 - typecheckshould_failT11355 - typecheckshould_failT12083a - typecheckshould_failT12083b - typecheckshould_failT16059c - typecheckshould_failT16059e - typecheckshould_failT17213 - typecheckshould_failT18939_Fail - typecheckshould_failT2538 - typecheckshould_failT5957 - typecheckshould_failT7019 - typecheckshould_failT7019a - typecheckshould_failT7809 - typecheckshould_failT9196 - typecheckshould_failtcfail127 - typecheckshould_failtcfail184 - typecheckshould_failtcfail196 - typecheckshould_failtcfail197

TcRnMonomorphicBindings :: [Name] -> TcRnMessage

TcRnMonomorphicBindings is a warning (controlled by -Wmonomorphism-restriction) that arise when the monomorphism restriction applies to the given bindings.

Examples(s): {-# OPTIONS_GHC -Wmonomorphism-restriction #-}

bar = 10

foo :: Int foo = bar

main :: IO () main = print foo

The example above emits the warning (for bar), because without monomorphism restriction the inferred type for bar is 'bar :: Num p => p'. This warning tells us that if we were to enable '-XMonomorphismRestriction' we would make bar less polymorphic, as its type would become 'bar :: Int', so GHC warns us about that.

Test cases: typecheckshould_compileT13785

TcRnOrphanInstance :: ClsInst -> TcRnMessage

TcRnOrphanInstance is a warning (controlled by -Wwarn-orphans) that arises when a typeclass instance is an "orphan", i.e. if it appears in a module in which neither the class nor the type being instanced are declared in the same module.

Examples(s): None

Test cases: warningsshould_compileT9178 typecheckshould_compileT4912

TcRnFunDepConflict :: !UnitState -> NonEmpty ClsInst -> TcRnMessage

TcRnFunDepConflict is an error that occurs when there are functional dependencies conflicts between instance declarations.

Examples(s): None

Test cases: typecheckshould_failT2307 typecheckshould_failtcfail096 typecheckshould_failtcfail202

TcRnDupInstanceDecls :: !UnitState -> NonEmpty ClsInst -> TcRnMessage

TcRnDupInstanceDecls is an error that occurs when there are duplicate instance declarations.

Examples(s): class Foo a where foo :: a -> Int

instance Foo Int where foo = id

instance Foo Int where foo = const 42

Test cases: cabalT12733T12733 typecheckshould_failtcfail035 typecheckshould_failtcfail023 backpackshould_failbkpfail18 typecheckshould_failTcNullaryTCFail typecheckshould_failtcfail036 typecheckshould_failtcfail073 module/mod51 module/mod52 module/mod44

TcRnConflictingFamInstDecls :: NonEmpty FamInst -> TcRnMessage

TcRnConflictingFamInstDecls is an error that occurs when there are conflicting family instance declarations.

Examples(s): None.

Test cases: indexed-typesshould_failExplicitForAllFams4b indexed-typesshould_failNoGood indexed-typesshould_failOver indexed-typesshould_failOverDirectThisMod indexed-typesshould_failOverIndirectThisMod indexed-typesshould_failSimpleFail11a indexed-typesshould_failSimpleFail11b indexed-typesshould_failSimpleFail11c indexed-typesshould_failSimpleFail11d indexed-typesshould_failSimpleFail2a indexed-typesshould_failSimpleFail2b indexed-typesshould_failT13092/T13092 indexed-typesshould_failT13092c/T13092c indexed-typesshould_failT14179 indexed-typesshould_failT2334A indexed-typesshould_failT2677 indexed-typesshould_failT3330b indexed-typesshould_failT4246 indexed-typesshould_failT7102a indexed-typesshould_failT9371 polykinds/T7524 typecheckshould_failUnliftedNewtypesOverlap

TcRnFamInstNotInjective :: InjectivityErrReason -> TyCon -> NonEmpty CoAxBranch -> TcRnMessage 
TcRnBangOnUnliftedType :: !Type -> TcRnMessage

TcRnBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that occurs when a strictness annotation is applied to an unlifted type.

Example(s): data T = MkT !Int# -- Strictness flag has no effect on unlifted types

Test cases: typecheckshould_compileT20187a typecheckshould_compileT20187b

TcRnLazyBangOnUnliftedType :: !Type -> TcRnMessage

TcRnLazyBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that occurs when a lazy annotation is applied to an unlifted type.

Example(s): data T = MkT ~Int# -- Lazy flag has no effect on unlifted types

Test cases: typecheckshould_compileT21951a typecheckshould_compileT21951b

TcRnMultipleDefaultDeclarations :: [LDefaultDecl GhcRn] -> TcRnMessage

TcRnMultipleDefaultDeclarations is an error that occurs when a module has more than one default declaration.

Example: default (Integer, Int) default (Double, Float) -- 2nd default declaration not allowed

Text cases: module/mod58

TcRnBadDefaultType :: Type -> [Class] -> TcRnMessage

TcRnBadDefaultType is an error that occurs when a type used in a default declaration does not have an instance for any of the applicable classes.

Example(s): data Foo default (Foo)

Test cases: typecheckshould_failT11974b

TcRnPatSynBundledWithNonDataCon :: TcRnMessage

TcRnPatSynBundledWithNonDataCon is an error that occurs when a module's export list bundles a pattern synonym with a type that is not a proper `data` or `newtype` construction.

Example(s): module Foo (MyClass(.., P)) where pattern P = Nothing class MyClass a where foo :: a -> Int

Test cases: patsynshould_failexport-class

TcRnPatSynBundledWithWrongType :: Type -> Type -> TcRnMessage

TcRnPatSynBundledWithWrongType is an error that occurs when the export list of a module has a pattern synonym bundled with a type that does not match the type of the pattern synonym.

Example(s): module Foo (R(P,x)) where data Q = Q Int data R = R pattern P{x} = Q x

Text cases: patsynshould_failexport-ps-rec-sel patsynshould_failexport-type-synonym patsynshould_failexport-type

TcRnDupeModuleExport :: ModuleName -> TcRnMessage

TcRnDupeModuleExport is a warning controlled by -Wduplicate-exports that occurs when a module appears more than once in an export list.

Example(s): module Foo (module Bar, module Bar) import Bar

Text cases: None

TcRnExportedModNotImported :: ModuleName -> TcRnMessage

TcRnExportedModNotImported is an error that occurs when an export list contains a module that is not imported.

Example(s): None

Text cases: module/mod135 module/mod8 renameshould_failrnfail028 backpackshould_failbkpfail48

TcRnNullExportedModule :: ModuleName -> TcRnMessage

TcRnNullExportedModule is a warning controlled by -Wdodgy-exports that occurs when an export list contains a module that has no exports.

Example(s): module Foo (module Bar) where import Bar ()

Test cases: None

TcRnMissingExportList :: ModuleName -> TcRnMessage

TcRnMissingExportList is a warning controlled by -Wmissing-export-lists that occurs when a module does not have an explicit export list.

Example(s): None

Test cases: typecheckshould_failMissingExportList03

TcRnExportHiddenComponents :: IE GhcPs -> TcRnMessage

TcRnExportHiddenComponents is an error that occurs when an export contains constructor or class methods that are not visible.

Example(s): None

Test cases: None

TcRnDuplicateExport :: GreName -> IE GhcPs -> IE GhcPs -> TcRnMessage

TcRnDuplicateExport is a warning (controlled by -Wduplicate-exports) that occurs when an identifier appears in an export list more than once.

Example(s): None

Test cases: module/MultiExport module/mod128 module/mod14 module/mod5 overloadedrecfldsshould_failDuplicateExports patsynshould_compileT11959

TcRnExportedParentChildMismatch :: Name -> TyThing -> GreName -> [Name] -> TcRnMessage

TcRnExportedParentChildMismatch is an error that occurs when an export is bundled with a parent that it does not belong to

Example(s): module Foo (T(a)) where data T a = True

Test cases: module/T11970 module/T11970B module/mod17 module/mod3 overloadedrecfldsshould_failNoParent

TcRnConflictingExports

TcRnConflictingExports is an error that occurs when different identifiers that have the same name are being exported by a module.

Example(s): module Foo (Bar.f, module Baz) where import qualified Bar (f) import Baz (f)

Test cases: module/mod131 module/mod142 module/mod143 module/mod144 module/mod145 module/mod146 module/mod150 module/mod155 overloadedrecfldsshould_failT14953 overloadedrecfldsshould_failoverloadedrecfldsfail10 renameshould_failrnfail029 renameshould_failrnfail040 typecheckshould_failT16453E2 typecheckshould_failtcfail025 typecheckshould_failtcfail026

Fields

TcRnAmbiguousField

TcRnAmbiguousField is a warning controlled by -Wambiguous-fields occurring when a record update's type cannot be precisely determined. This will not be supported by -XDuplicateRecordFields in future releases.

Example(s): data Person = MkPerson { personId :: Int, name :: String } data Address = MkAddress { personId :: Int, address :: String } bad1 x = x { personId = 4 } :: Person -- ambiguous bad2 (x :: Person) = x { personId = 4 } -- ambiguous good x = (x :: Person) { personId = 4 } -- not ambiguous

Test cases: overloadedrecfldsshould_failoverloadedrecfldsfail06

Fields

TcRnMissingFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage

TcRnMissingFields is a warning controlled by -Wmissing-fields occurring when the intialisation of a record is missing one or more (lazy) fields.

Example(s): data Rec = Rec { a :: Int, b :: String, c :: Bool } x = Rec { a = 1, b = "two" } -- missing field c

Test cases: deSugarshould_compileT13870 deSugarshould_compileds041 patsynshould_compileT11283 renameshould_compileT5334 renameshould_compileT12229 renameshould_compileT5892a warningsshould_failWerrorFail2

TcRnFieldUpdateInvalidType :: [(FieldLabelString, TcType)] -> TcRnMessage

TcRnFieldUpdateInvalidType is an error occurring when an updated field's type mentions something that is outside the universally quantified variables of the data constructor, such as an existentially quantified type.

Example(s): data X = forall a. MkX { f :: a } x = (MkX ()) { f = False }

Test cases: patsynshould_failrecords-exquant typecheckshould_failT3323

TcRnNoConstructorHasAllFields :: [FieldLabelString] -> TcRnMessage

TcRnNoConstructorHasAllFields is an error that occurs when a record update has fields that no single constructor encompasses.

Example(s): data Foo = A { x :: Bool } | B { y :: Int } foo = (A False) { x = True, y = 5 }

Test cases: overloadedrecfldsshould_failoverloadedrecfldsfail08 patsynshould_failmixed-pat-syn-record-sels typecheckshould_failT7989

TcRnMixedSelectors 

Fields

TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage 
TcRnNoPossibleParentForFields :: [LHsRecUpdField GhcRn] -> TcRnMessage 
TcRnBadOverloadedRecordUpdate :: [LHsRecUpdField GhcRn] -> TcRnMessage 
TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage 
TcRnSpecialClassInst

TcRnSpecialClassInst is an error that occurs when a user attempts to define an instance for a built-in typeclass such as Coercible, Typeable, or KnownNat, outside of a signature file.

Test cases: derivingshould_failT9687 derivingshould_failT14916 polykinds/T8132 typecheckshould_failTcCoercibleFail2 typecheckshould_failT12837 typecheckshould_failT14390

Fields

TcRnUselessTypeable :: TcRnMessage

TcRnUselessTypeable is a warning (controlled by -Wderiving-typeable) that occurs when trying to derive an instance of the Typeable class. Deriving Typeable is no longer necessary (hence the "useless") as all types automatically derive Typeable in modern GHC versions.

Example(s): None.

Test cases: warningsshould_compileDerivingTypeable

TcRnDerivingDefaults :: !Class -> TcRnMessage

TcRnDerivingDefaults is a warning (controlled by -Wderiving-defaults) that occurs when both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled, and therefore GHC defaults to DeriveAnyClass, which might not be what the user wants.

Example(s): None.

Test cases: typecheckshould_compileT15839a derivingshould_compileT16179

TcRnNonUnaryTypeclassConstraint :: !(LHsSigType GhcRn) -> TcRnMessage

TcRnNonUnaryTypeclassConstraint is an error that occurs when GHC encounters a non-unary constraint when trying to derive a typeclass.

Example(s): class A deriving instance A data B deriving A -- We cannot derive A, is not unary (i.e. 'class A a').

Test cases: derivingshould_failT7959 derivingshould_faildrvfail005 derivingshould_faildrvfail009 derivingshould_faildrvfail006

TcRnPartialTypeSignatures :: !SuggestPartialTypeSignatures -> !ThetaType -> TcRnMessage

TcRnPartialTypeSignatures is a warning (controlled by -Wpartial-type-signatures) that occurs when a wildcard '_' is found in place of a type in a signature or a type class derivation

Example(s): foo :: _ -> Int foo = ...

deriving instance _ => Eq (Foo a)

Test cases: dependentshould_compileT11241 dependentshould_compileT15076 dependentshould_compileT14880-2 typecheckshould_compileT17024 typecheckshould_compileT10072 partial-sigsshould_failTidyClash2 partial-sigsshould_failDefaulting1MROff partial-sigsshould_failWildcardsInPatternAndExprSig partial-sigsshould_failT10615 partial-sigsshould_failT14584a partial-sigsshould_failTidyClash partial-sigsshould_failT11122 partial-sigsshould_failT14584 partial-sigsshould_failT10045 partial-sigsshould_failPartialTypeSignaturesDisabled partial-sigsshould_failT10999 partial-sigsshould_failExtraConstraintsWildcardInExpressionSignature partial-sigsshould_failExtraConstraintsWildcardInPatternSplice partial-sigsshould_failWildcardInstantiations partial-sigsshould_runT15415 partial-sigsshould_compileT10463 partial-sigsshould_compileT15039a partial-sigsshould_compileT16728b partial-sigsshould_compileT15039c partial-sigsshould_compileT10438 partial-sigsshould_compileSplicesUsed partial-sigsshould_compileT18008 partial-sigsshould_compileExprSigLocal partial-sigsshould_compileT11339a partial-sigsshould_compileT11670 partial-sigsshould_compileWarningWildcardInstantiations partial-sigsshould_compileT16728 partial-sigsshould_compileT12033 partial-sigsshould_compileT15039b partial-sigsshould_compileT10403 partial-sigsshould_compileT11192 partial-sigsshould_compileT16728a partial-sigsshould_compileTypedSplice partial-sigsshould_compileT15039d partial-sigsshould_compileT11016 partial-sigsshould_compileT13324_compile2 linearshould_failLinearPartialSig polykinds/T14265 polykinds/T14172

TcRnCannotDeriveInstance

TcRnCannotDeriveInstance is an error that occurs every time a typeclass instance can't be derived. The DeriveInstanceErrReason will contain the specific reason this error arose.

Example(s): None.

Test cases: genericsT10604T10604_no_PolyKinds derivingshould_faildrvfail009 derivingshould_faildrvfail-functor2 derivingshould_failT10598_fail3 derivingshould_failderiving-via-fail2 derivingshould_failderiving-via-fail derivingshould_failT16181

Fields

TcRnLazyGADTPattern :: TcRnMessage

TcRnLazyGADTPattern is an error that occurs when a user writes a nested GADT pattern match inside a lazy (~) pattern.

Test case: gadt/lazypat

TcRnArrowProcGADTPattern :: TcRnMessage

TcRnArrowProcGADTPattern is an error that occurs when a user writes a GADT pattern inside arrow proc notation.

Test case: arrowsshould_failarrowfail004.

TcRnForallIdentifier :: RdrName -> TcRnMessage

TcRnForallIdentifier is a warning (controlled with -Wforall-identifier) that occurs when a definition uses forall as an identifier.

Example: forall x = () g forall = ()

Test cases: T20609 T20609a T20609b T20609c T20609d

TcRnTypeEqualityOutOfScope :: TcRnMessage

TcRnTypeEqualityOutOfScope is a warning (controlled by -Wtype-equality-out-of-scope) that occurs when the type equality (a ~ b) is not in scope.

Test case: T18862b

TcRnTypeEqualityRequiresOperators :: TcRnMessage

TcRnTypeEqualityRequiresOperators is a warning (controlled by -Wtype-equality-requires-operators) that occurs when the type equality (a ~ b) is used without the TypeOperators extension.

Example: {-# LANGUAGE NoTypeOperators #-} f :: (a ~ b) => a -> b

Test case: T18862a

TcRnIllegalTypeOperator :: !SDoc -> !RdrName -> TcRnMessage

TcRnIllegalTypeOperator is an error that occurs when a type operator is used without the TypeOperators extension.

Example: {-# LANGUAGE NoTypeOperators #-} f :: Vec a n -> Vec a m -> Vec a (n + m)

Test case: T12811

TcRnIllegalTypeOperatorDecl :: !RdrName -> TcRnMessage

TcRnIllegalTypeOperatorDecl is an error that occurs when a type or class operator is declared without the TypeOperators extension.

See Note [Type and class operator definitions]

Example: {-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-}

module T3265 where

data a :+: b = Left a | Right b

class a :*: b where {}

Test cases: T3265, tcfail173

TcRnGADTMonoLocalBinds :: TcRnMessage

TcRnGADTMonoLocalBinds is a warning controlled by -Wgadt-mono-local-binds that occurs when pattern matching on a GADT when -XMonoLocalBinds is off.

Example(s): None

Test cases: T20485, T20485a

TcRnNotInScope

The TcRnNotInScope constructor is used for various not-in-scope errors. See NotInScopeError for more details.

Fields

TcRnUntickedPromotedThing :: UntickedPromotedThing -> TcRnMessage

TcRnUntickedPromotedThing is a warning (controlled with -Wunticked-promoted-constructors) that is triggered by an unticked occurrence of a promoted data constructor.

Examples:

data A = MkA type family F (a :: A) where { F MkA = Bool }

type B = [ Int, Bool ]

Test cases: T9778, T19984.

TcRnIllegalBuiltinSyntax

TcRnIllegalBuiltinSyntax is an error that occurs when built-in syntax appears in an unexpected location, e.g. as a data constructor or in a fixity declaration.

Examples:

infixl 5 :

data P = (,)

Test cases: rnfail042, T14907b, T15124, T15233.

Fields

TcRnWarnDefaulting

TcRnWarnDefaulting is a warning (controlled by -Wtype-defaults) that is triggered whenever a Wanted typeclass constraint is solving through the defaulting of a type variable.

Example:

one = show 1 -- We get Wanteds Show a0, Num a0, and default a0 to Integer.

Test cases: none (which are really specific to defaulting), but see e.g. tcfail204.

Fields

  • :: [Ct]

    Wanted constraints in which defaulting occurred

  • -> Maybe TyVar

    The type variable being defaulted

  • -> Type

    The default type

  • -> TcRnMessage
     
TcRnIncorrectNameSpace

TcRnIncorrectNameSpace is an error that occurs when a Name is used in the incorrect NameSpace, e.g. a type constructor or class used in a term, or a term variable used in a type.

Example:

f x = Int

Test cases: T18740a, T20884.

Fields

  • :: Name
     
  • -> Bool

    whether the error is happening in a Template Haskell tick (so we should give a Template Haskell hint)

  • -> TcRnMessage
     
TcRnForeignImportPrimExtNotSet :: ForeignImport GhcRn -> TcRnMessage 
TcRnForeignImportPrimSafeAnn :: ForeignImport GhcRn -> TcRnMessage 
TcRnForeignFunctionImportAsValue :: ForeignImport GhcRn -> TcRnMessage 
TcRnFunPtrImportWithoutAmpersand :: ForeignImport GhcRn -> TcRnMessage 
TcRnIllegalForeignDeclBackend :: Either (ForeignExport GhcRn) (ForeignImport GhcRn) -> Backend -> ExpectedBackends -> TcRnMessage 
TcRnUnsupportedCallConv :: Either (ForeignExport GhcRn) (ForeignImport GhcRn) -> UnsupportedCallConvention -> TcRnMessage 
TcRnIllegalForeignType :: !(Maybe ArgOrResult) -> !IllegalForeignTypeReason -> TcRnMessage 
TcRnInvalidCIdentifier :: !CLabelString -> TcRnMessage 
TcRnExpectedValueId :: !TcTyThing -> TcRnMessage 
TcRnNotARecordSelector :: !Name -> TcRnMessage 
TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage 
TcRnPatSynNotBidirectional :: !Name -> TcRnMessage 
TcRnSplicePolymorphicLocalVar :: !Id -> TcRnMessage 
TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage 
TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage 
TcRnIllegalRecordSyntax :: !(HsType GhcRn) -> TcRnMessage 
TcRnUnexpectedTypeSplice :: !(HsType GhcRn) -> TcRnMessage 
TcRnInvalidVisibleKindArgument 

Fields

TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr () GhcRn] -> TcRnMessage 
TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage 
TcRnInvalidReturnKind 

Fields

TcRnClassKindNotConstraint :: !Kind -> TcRnMessage 
TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage 
TcRnMatchesHaveDiffNumArgs 

Fields

TcRnCannotBindScopedTyVarInPatSig :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage 
TcRnCannotBindTyVarsInPatBind :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage 
TcRnTooManyTyArgsInConPattern 

Fields

TcRnMultipleInlinePragmas 

Fields

TcRnUnexpectedPragmas :: !Id -> !(NonEmpty (LSig GhcRn)) -> TcRnMessage 
TcRnNonOverloadedSpecialisePragma :: !(LIdP GhcRn) -> TcRnMessage 
TcRnSpecialiseNotVisible :: !Name -> TcRnMessage 
TcRnNameByTemplateHaskellQuote :: !RdrName -> TcRnMessage 
TcRnIllegalBindingOfBuiltIn :: !OccName -> TcRnMessage 
TcRnPragmaWarning 
TcRnIllegalHsigDefaultMethods

TcRnIllegalHsigDefaultMethods is an error that occurs when a binding for a class default method is provided in a Backpack signature file.

Test case: bkpfail40

Fields

TcRnBadGenericMethod

TcRnBadGenericMethod This test ensures that if you provide a "more specific" type signatures for the default method, you must also provide a binding.

Example: {-# LANGUAGE DefaultSignatures #-}

class C a where meth :: a default meth :: Num a => a meth = 0

Test case: testsuiteteststypecheckshould_failMissingDefaultMethodBinding.hs

Fields

TcRnWarningMinimalDefIncomplete :: ClassMinimalDef -> TcRnMessage

TcRnWarningMinimalDefIncomplete is a warning that one must specify which methods must be implemented by all instances.

Example: class Cheater a where -- WARNING LINE cheater :: a {-# MINIMAL #-} -- warning!

Test case: testsuitetestswarningsminimalWarnMinimal.hs:

TcRnDefaultMethodForPragmaLacksBinding

TcRnDefaultMethodForPragmaLacksBinding is an error that occurs when a default method pragma is missing an accompanying binding.

Test cases: testsuiteteststypecheckshould_failT5084.hs testsuiteteststypecheckshould_failT2354.hs

Fields

TcRnIgnoreSpecialisePragmaOnDefMethod :: !Name -> TcRnMessage

TcRnIgnoreSpecialisePragmaOnDefMethod is a warning that occurs when a specialise pragma is put on a default method.

Test cases: none

TcRnBadMethodErr

TcRnBadMethodErr is an error that happens when one attempts to provide a method in a class instance, when the class doesn't have a method by that name.

Test case: testsuiteteststh/T12387

Fields

TcRnNoExplicitAssocTypeOrDefaultDeclaration :: Name -> TcRnMessage

TcRnNoExplicitAssocTypeOrDefaultDeclaration is an error that occurs when a class instance does not provide an expected associated type or default declaration.

Test cases: testsuitetestsderivingshould_compileT14094 testsuitetestsindexed-typesshould_compileSimple2 testsuiteteststypecheckshould_compiletc254

TcRnIllegalNewtype

TcRnIllegalNewtype is an error that occurs when a newtype:

  • Does not have exactly one field, or
  • is non-linear, or
  • is a GADT, or
  • has a context in its constructor's type, or
  • has existential type variables in its constructor's type, or
  • has strictness annotations.

Test cases: testsuitetestsgadt/T14719 testsuitetestsindexed-typesshould_failT14033 testsuitetestsindexed-typesshould_failT2334A testsuitetestslinearshould_failLinearGADTNewtype testsuitetestsparsershould_failreadFail008 testsuitetestspolykinds/T11459 testsuiteteststypecheckshould_failT15523 testsuiteteststypecheckshould_failT15796 testsuiteteststypecheckshould_failT17955 testsuiteteststypecheckshould_failT18891a testsuiteteststypecheckshould_failT21447 testsuiteteststypecheckshould_failtcfail156

Fields

TcRnIllegalTypeData :: TcRnMessage

TcRnIllegalTypeData is an error that occurs when a type data declaration occurs without the TypeOperators extension.

See Note [Type data declarations]

Test case: testsuiteteststype-datashould_failTDNoPragma

TcRnTypeDataForbids :: !TypeDataForbids -> TcRnMessage

TcRnTypeDataForbids is an error that occurs when a type data declaration contains data declaration features that are forbidden in a type data declaration.

See Note [Type data declarations]

Test cases: testsuiteteststype-datashould_failTDDeriving testsuiteteststype-datashould_failTDRecordsGADT testsuiteteststype-datashould_failTDRecordsH98 testsuiteteststype-datashould_failTDStrictnessGADT testsuiteteststype-datashould_failTDStrictnessH98

TcRnTypedTHWithPolyType :: !TcType -> TcRnMessage

TcRnTypedTHWithPolyType is an error that signifies the illegal use of a polytype in a typed template haskell expression.

Example(s): bad :: (forall a. a -> a) -> () bad = $$( [|| _ -> () ||] )

Test cases: th/T11452

TcRnSpliceThrewException

TcRnSpliceThrewException is an error that occurrs when running a template haskell splice throws an exception.

Example(s):

Test cases: annotationsshould_failannfail12 perfcompilerMultiLayerModulesTH_Make perfcompilerMultiLayerModulesTH_OneShot th/T10796b th/T19470 th/T19709d th/T5358 th/T5976 th/T7276a th/T8987 th/TH_exn1 th/TH_exn2 th/TH_runIO

Fields

TcRnInvalidTopDecl :: !(HsDecl GhcPs) -> TcRnMessage

TcRnInvalidTopDecl is a template haskell error occurring when one of the Decs passed to addTopDecls is not a function, value, annotation, or foreign import declaration.

Example(s):

Test cases:

TcRnNonExactName :: !RdrName -> TcRnMessage

TcRnNonExactName is a template haskell error for when a declaration being added is bound to a name that is not fully known.

Example(s):

Test cases:

TcRnAddInvalidCorePlugin

TcRnAddInvalidCorePlugin is a template haskell error indicating that a core plugin being added has an invalid module due to being in the current package.

Example(s):

Test cases:

Fields

TcRnAddDocToNonLocalDefn :: !DocLoc -> TcRnMessage

TcRnAddDocToNonLocalDefn is a template haskell error for documentation being added to a definition which is not in the current module.

Example(s):

Test cases: showIfaceshould_failTHPutDocExternal

TcRnFailedToLookupThInstName :: !Type -> !LookupTHInstNameErrReason -> TcRnMessage

TcRnFailedToLookupThInstName is a template haskell error that occurrs when looking up an instance fails.

Example(s):

Test cases: showIfaceshould_failTHPutDocNonExistent

TcRnCannotReifyInstance :: !Type -> TcRnMessage

TcRnCannotReifyInstance is a template haskell error for when an instance being reified via reifyInstances is not a class constraint or type family application.

Example(s):

Test cases:

TcRnCannotReifyOutOfScopeThing :: !Name -> TcRnMessage

TcRnCannotReifyOutOfScopeThing is a template haskell error indicating that the given name is not in scope and therefore cannot be reified.

Example(s):

Test cases: th/T16976f

TcRnCannotReifyThingNotInTypeEnv :: !Name -> TcRnMessage

TcRnCannotReifyThingNotInTypeEnv is a template haskell error occurring when the given name is not in the type environment and therefore cannot be reified.

Example(s):

Test cases:

TcRnNoRolesAssociatedWithThing :: !TcTyThing -> TcRnMessage

TcRnNoRolesAssociatedWithName is a template haskell error for when the user tries to reify the roles of a given name but it is not something that has roles associated with it.

Example(s):

Test cases:

TcRnCannotRepresentType :: !UnrepresentableTypeDescr -> !Type -> TcRnMessage

TcRnCannotRepresentThing is a template haskell error indicating that a type cannot be reified because it does not have a representation in template haskell.

Example(s):

Test cases:

TcRnRunSpliceFailure

TcRnRunSpliceFailure is an error indicating that a template haskell splice failed to be converted into a valid expression.

Example(s):

Test cases: th/T10828a th/T10828b th/T12478_4 th/T15270A th/T15270B th/T16895a th/T16895b th/T16895c th/T16895d th/T16895e th/T17379a th/T17379b th/T18740d th/T2597b th/T2674 th/T3395 th/T7484 th/T7667a th/TH_implicitParamsErr1 th/TH_implicitParamsErr2 th/TH_implicitParamsErr3 th/TH_invalid_add_top_decl

Fields

TcRnReportCustomQuasiError :: !Bool -> !String -> TcRnMessage

TcRnUserErrReported is an error or warning thrown using qReport from the Quasi instance of TcM.

Example(s):

Test cases:

TcRnInterfaceLookupError :: !Name -> !SDoc -> TcRnMessage

TcRnInterfaceLookupError is an error resulting from looking up a name in an interface file.

Example(s):

Test cases:

TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage

TcRnUnsatisfiedMinimalDef is a warning that occurs when a class instance is missing methods that are required by the minimal definition.

Example: class C a where foo :: a -> a instance C () -- | foo needs to be defined here

Test cases: testsuiteteststypecheckprog001typecheck.prog001 testsuiteteststypecheckshould_compiletc126 testsuiteteststypecheckshould_compileT7903 testsuiteteststypecheckshould_compiletc116 testsuiteteststypecheckshould_compiletc175 testsuiteteststypecheckshould_compileHasKey testsuiteteststypecheckshould_compiletc125 testsuiteteststypecheckshould_compiletc078 testsuiteteststypecheckshould_compiletc161 testsuiteteststypecheckshould_failT5051 testsuiteteststypecheckshould_compileT21583 testsuitetestsbackpackshould_compilebkp47 testsuitetestsbackpackshould_failbkpfail25 testsuitetestsparsershould_compileT2245 testsuitetestsparsershould_compileread014 testsuitetestsindexed-typesshould_compileClass3 testsuitetestsindexed-typesshould_compileSimple2 testsuitetestsindexed-typesshould_failT7862 testsuitetestsderivingshould_compilederiving-1935 testsuitetestsderivingshould_compileT9968a testsuitetestsderivingshould_compiledrv003 testsuitetestsderivingshould_compileT4966 testsuitetestsderivingshould_compileT14094 testsuitetestsperfcompilerT15304 testsuitetestswarningsminimalWarnMinimal testsuitetestssimplCoreshould_compilesimpl020 testsuitetestsdeSugarshould_compileT14546d testsuitetestsghciscriptsT5820 testsuitetestsghciscriptsghci019

TcRnMisplacedInstSig :: Name -> LHsSigType GhcRn -> TcRnMessage

TcRnMisplacedInstSig is an error that happens when a method in a class instance is given a type signature, but the user has not enabled the InstanceSigs extension.

Test case: testsuitetestsmodule/mod45

TcRnBadBootFamInstDecl :: TcRnMessage

TcRnBadBootFamInstDecl is an error that is triggered by a type family instance being declared in an hs-boot file.

Test case: testsuitetestsindexed-typesshould_failHsBootFam

TcRnIllegalFamilyInstance :: TyCon -> TcRnMessage

TcRnIllegalFamilyInstance is an error that occurs when an associated type or data family is given a top-level instance.

Test case: testsuitetestsindexed-typesshould_failT3092

TcRnMissingClassAssoc :: TyCon -> TcRnMessage

TcRnMissingClassAssoc is an error that occurs when a class instance for a class with an associated type or data family is missing a corresponding family instance declaration.

Test case: testsuitetestsindexed-typesshould_failSimpleFail7

TcRnBadFamInstDecl :: TyCon -> TcRnMessage

TcRnBadFamInstDecl is an error that is triggered by a type or data family instance without the TypeFamilies extension.

Test case: testsuitetestsindexed-typesshould_failBadFamInstDecl

TcRnNotOpenFamily :: TyCon -> TcRnMessage

TcRnNotOpenFamily is an error that is triggered by attempting to give a top-level (open) type family instance for a closed type family.

Test cases: testsuitetestsindexed-typesshould_failOverlap7 testsuitetestsindexed-typesshould_failOverlap3

TcRnNoRebindableSyntaxRecordDot :: TcRnMessage

TcRnNoRebindableSyntaxRecordDot is an error triggered by an overloaded record update without RebindableSyntax enabled.

Example(s):

Test cases: parsershould_failRecordDotSyntaxFail5

TcRnNoFieldPunsRecordDot :: TcRnMessage

TcRnNoFieldPunsRecordDot is an error triggered by the use of record field puns in an overloaded record update without enabling NamedFieldPuns.

Example(s): print $ a{ foo.bar.baz.quux }

Test cases: parsershould_failRecordDotSyntaxFail12

TcRnIllegalStaticExpression :: HsExpr GhcPs -> TcRnMessage

TcRnIllegalStaticExpression is an error thrown when user creates a static pointer via TemplateHaskell without enabling the StaticPointers extension.

Example(s):

Test cases: th/T14204

TcRnIllegalStaticFormInSplice :: HsExpr GhcPs -> TcRnMessage

TcRnIllegalStaticFormInSplice is an error when a user attempts to define a static pointer in a Template Haskell splice.

Example(s):

Test cases: th/TH_StaticPointers02

TcRnListComprehensionDuplicateBinding :: Name -> TcRnMessage

TcRnListComprehensionDuplicateBinding is an error triggered by duplicate let-bindings in a list comprehension.

Example(s): [ () | let a = 13 | let a = 17 ]

Test cases: typecheckshould_failtcfail092

TcRnEmptyStmtsGroup :: EmptyStatementGroupErrReason -> TcRnMessage

TcRnEmptyStmtsGroup is an error triggered by an empty list of statements in a statement block. For more information, see EmptyStatementGroupErrReason

Example(s):

() | then ()

do

proc () -> do

Test cases: renameshould_failRnEmptyStatementGroup1

TcRnLastStmtNotExpr :: HsStmtContext GhcRn -> UnexpectedStatement -> TcRnMessage

TcRnLastStmtNotExpr is an error caused by the last statement in a statement block not being an expression.

Example(s):

do x <- pure ()

do let x = 5

Test cases: renameshould_failT6060 parsershould_failT3811g parsershould_failreadFail028

TcRnUnexpectedStatementInContext :: HsStmtContext GhcRn -> UnexpectedStatement -> Maybe Extension -> TcRnMessage

TcRnUnexpectedStatementInContext is an error when a statement appears in an unexpected context (e.g. an arrow statement appears in a list comprehension).

Example(s):

Test cases: parsershould_failreadFail042 parsershould_failreadFail038 parsershould_failreadFail043

TcRnIllegalTupleSection :: TcRnMessage

TcRnIllegalTupleSection is an error triggered by usage of a tuple section without enabling the TupleSections extension.

Example(s): (5,)

Test cases: renameshould_failrnfail056

TcRnIllegalImplicitParameterBindings :: Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs) -> TcRnMessage

TcRnIllegalImplicitParameterBindings is an error triggered by binding an implicit parameter in an mdo block.

Example(s): mdo { let { ?x = 5 }; () }

Test cases: renameshould_failRnImplicitBindInMdoNotation

TcRnSectionWithoutParentheses :: HsExpr GhcPs -> TcRnMessage

TcRnSectionWithoutParentheses is an error triggered by attempting to use an operator section without parentheses.

Example(s): (head x, ())

Test cases: renameshould_failT2490 renameshould_failT5657

TcRnLoopySuperclassSolve

TcRnLoopySuperclassSolve is a warning, controlled by -Wloopy-superclass-solve, that is triggered when GHC solves a constraint in a possibly-loopy way, violating the class instance termination rules described in the section "Undecidable instances and loopy superclasses" of the user's guide.

Example:

class Foo f class Foo f => Bar f g instance Bar f f => Bar f (h k)

Test cases: T20666, T20666{a,b}, T22891, T22912.

Fields

TcRnCannotDefaultConcrete :: !FixedRuntimeRepOrigin -> TcRnMessage 

Instances

Instances details
Generic TcRnMessage 
Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TcRnMessage :: Type -> Type #

type Rep TcRnMessage 
Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcRnMessage = D1 ('MetaData "TcRnMessage" "GHC.Tc.Errors.Types" "ghc" 'False) (((((((C1 ('MetaCons "TcRnUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnknownDiagnostic)) :+: C1 ('MetaCons "TcRnMessageWithInfo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcRnMessageDetailed))) :+: (C1 ('MetaCons "TcRnWithHsDocContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsDocContext) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcRnMessage)) :+: (C1 ('MetaCons "TcRnSolverReport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SolverReportWithCtxt) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiagnosticReason) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint]))) :+: C1 ('MetaCons "TcRnRedundantConstraints" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Id]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SkolemInfoAnon, Bool)))))) :+: ((C1 ('MetaCons "TcRnInaccessibleCode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Implication) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SolverReportWithCtxt)) :+: (C1 ('MetaCons "TcRnTypeDoesNotHaveFixedRuntimeRep" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FixedRuntimeRepProvenance) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ErrInfo))) :+: C1 ('MetaCons "TcRnImplicitLift" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ErrInfo)))) :+: (C1 ('MetaCons "TcRnUnusedPatternBinds" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsBind GhcRn))) :+: (C1 ('MetaCons "TcRnDodgyImports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnDodgyExports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)))))) :+: (((C1 ('MetaCons "TcRnMissingImportList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs))) :+: (C1 ('MetaCons "TcRnUnsafeDueToPlugin" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnModMissingRealSrcSpan" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Module)))) :+: (C1 ('MetaCons "TcRnIdNotExportedFromModuleSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Module)) :+: (C1 ('MetaCons "TcRnIdNotExportedFromLocalSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "TcRnShadowedName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OccName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShadowedNameProvenance))))) :+: ((C1 ('MetaCons "TcRnDuplicateWarningDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LocatedN RdrName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons "TcRnSimplifierTooManyIterations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Cts) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IntWithInf) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WantedConstraints))) :+: C1 ('MetaCons "TcRnIllegalPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LIdP GhcPs))))) :+: (C1 ('MetaCons "TcRnLinearPatSyn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnEmptyRecordUpdate" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnIllegalFieldPunning" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Located RdrName)))))))) :+: ((((C1 ('MetaCons "TcRnIllegalWildcardsInRecord" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RecordFieldPart)) :+: (C1 ('MetaCons "TcRnIllegalWildcardInType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Name)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BadAnonWildcardContext)) :+: C1 ('MetaCons "TcRnDuplicateFieldName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RecordFieldPart) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty RdrName))))) :+: (C1 ('MetaCons "TcRnIllegalViewPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcPs))) :+: (C1 ('MetaCons "TcRnCharLiteralOutOfRange" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Char)) :+: C1 ('MetaCons "TcRnIllegalWildcardsInConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))))) :+: ((C1 ('MetaCons "TcRnIgnoringAnnotations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LAnnDecl GhcRn])) :+: (C1 ('MetaCons "TcRnAnnotationInSafeHaskell" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnInvalidTypeApplication" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsWcType GhcRn))))) :+: (C1 ('MetaCons "TcRnTagToEnumMissingValArg" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnTagToEnumUnspecifiedResTy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "TcRnTagToEnumResTyNotAnEnum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)))))) :+: (((C1 ('MetaCons "TcRnTagToEnumResTyTypeData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnArrowIfThenElsePredDependsOnResultTy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnIllegalHsBootFileDecl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TcRnRecursivePatternSynonym" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsBinds GhcRn))) :+: (C1 ('MetaCons "TcRnPartialTypeSigTyVarMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsSigWcType GhcRn)))) :+: C1 ('MetaCons "TcRnPartialTypeSigBadQuantifier" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Type)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsSigWcType GhcRn))))))) :+: ((C1 ('MetaCons "TcRnMissingSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MissingSignature) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Exported) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :+: (C1 ('MetaCons "TcRnPolymorphicBinderMissingSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "TcRnOverloadedSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcIdSigInfo)))) :+: (C1 ('MetaCons "TcRnTupleConstraintInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class)) :+: (C1 ('MetaCons "TcRnAbstractClassInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class)) :+: C1 ('MetaCons "TcRnNoClassInstHead" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))))))) :+: (((((C1 ('MetaCons "TcRnUserTypeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnConstraintInKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))) :+: (C1 ('MetaCons "TcRnUnboxedTupleOrSumTypeFuncArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnboxedTupleOrSum) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnLinearFuncInKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnForAllEscapeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind))))) :+: ((C1 ('MetaCons "TcRnVDQInTermType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Type))) :+: (C1 ('MetaCons "TcRnBadQuantPredHead" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnIllegalTupleConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "TcRnNonTypeVarArgInConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnIllegalImplicitParam" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnIllegalConstraintSynonymOfKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))))) :+: (((C1 ('MetaCons "TcRnIllegalClassInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyConFlavour)) :+: (C1 ('MetaCons "TcRnOversaturatedVisibleKindArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnBadAssociatedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))) :+: (C1 ('MetaCons "TcRnForAllRankErr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Rank) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnMonomorphicBindings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name])) :+: C1 ('MetaCons "TcRnOrphanInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClsInst))))) :+: ((C1 ('MetaCons "TcRnFunDepConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ClsInst))) :+: (C1 ('MetaCons "TcRnDupInstanceDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ClsInst))) :+: C1 ('MetaCons "TcRnConflictingFamInstDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty FamInst))))) :+: (C1 ('MetaCons "TcRnFamInstNotInjective" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InjectivityErrReason) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty CoAxBranch)))) :+: (C1 ('MetaCons "TcRnBangOnUnliftedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnLazyBangOnUnliftedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))))) :+: ((((C1 ('MetaCons "TcRnMultipleDefaultDeclarations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LDefaultDecl GhcRn])) :+: (C1 ('MetaCons "TcRnBadDefaultType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Class])) :+: C1 ('MetaCons "TcRnPatSynBundledWithNonDataCon" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TcRnPatSynBundledWithWrongType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnDupeModuleExport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :+: C1 ('MetaCons "TcRnExportedModNotImported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName))))) :+: ((C1 ('MetaCons "TcRnNullExportedModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :+: (C1 ('MetaCons "TcRnMissingExportList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName)) :+: C1 ('MetaCons "TcRnExportHiddenComponents" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs))))) :+: (C1 ('MetaCons "TcRnDuplicateExport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GreName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)))) :+: (C1 ('MetaCons "TcRnExportedParentChildMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyThing)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GreName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]))) :+: C1 ('MetaCons "TcRnConflictingExports" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OccName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GreName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalRdrElt))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GreName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalRdrElt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs))))))))) :+: (((C1 ('MetaCons "TcRnAmbiguousField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon)) :+: (C1 ('MetaCons "TcRnMissingFields" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ConLike) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(FieldLabelString, TcType)])) :+: C1 ('MetaCons "TcRnFieldUpdateInvalidType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(FieldLabelString, TcType)])))) :+: (C1 ('MetaCons "TcRnNoConstructorHasAllFields" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FieldLabelString])) :+: (C1 ('MetaCons "TcRnMixedSelectors" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Id])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Id]))) :+: C1 ('MetaCons "TcRnMissingStrictFields" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ConLike) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(FieldLabelString, TcType)]))))) :+: ((C1 ('MetaCons "TcRnNoPossibleParentForFields" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LHsRecUpdField GhcRn])) :+: (C1 ('MetaCons "TcRnBadOverloadedRecordUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LHsRecUpdField GhcRn])) :+: C1 ('MetaCons "TcRnStaticFormNotClosed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NotClosedReason)))) :+: (C1 ('MetaCons "TcRnSpecialClassInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: (C1 ('MetaCons "TcRnUselessTypeable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnDerivingDefaults" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class))))))))) :+: ((((((C1 ('MetaCons "TcRnNonUnaryTypeclassConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsSigType GhcRn))) :+: C1 ('MetaCons "TcRnPartialTypeSignatures" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SuggestPartialTypeSignatures) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ThetaType))) :+: (C1 ('MetaCons "TcRnCannotDeriveInstance" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (DerivStrategy GhcTc))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UsingGeneralizedNewtypeDeriving) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveInstanceErrReason)))) :+: (C1 ('MetaCons "TcRnLazyGADTPattern" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnArrowProcGADTPattern" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "TcRnForallIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :+: (C1 ('MetaCons "TcRnTypeEqualityOutOfScope" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnTypeEqualityRequiresOperators" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "TcRnIllegalTypeOperator" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons "TcRnIllegalTypeOperatorDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnGADTMonoLocalBinds" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TcRnNotInScope" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NotInScopeError) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ImportError]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint]))) :+: (C1 ('MetaCons "TcRnUntickedPromotedThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UntickedPromotedThing)) :+: C1 ('MetaCons "TcRnIllegalBuiltinSyntax" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))) :+: (C1 ('MetaCons "TcRnWarnDefaulting" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Ct]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TyVar)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :+: (C1 ('MetaCons "TcRnIncorrectNameSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: C1 ('MetaCons "TcRnForeignImportPrimExtNotSet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ForeignImport GhcRn)))))) :+: ((C1 ('MetaCons "TcRnForeignImportPrimSafeAnn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ForeignImport GhcRn))) :+: (C1 ('MetaCons "TcRnForeignFunctionImportAsValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ForeignImport GhcRn))) :+: C1 ('MetaCons "TcRnFunPtrImportWithoutAmpersand" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ForeignImport GhcRn))))) :+: (C1 ('MetaCons "TcRnIllegalForeignDeclBackend" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (ForeignExport GhcRn) (ForeignImport GhcRn))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Backend) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExpectedBackends))) :+: (C1 ('MetaCons "TcRnUnsupportedCallConv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (ForeignExport GhcRn) (ForeignImport GhcRn))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnsupportedCallConvention)) :+: C1 ('MetaCons "TcRnIllegalForeignType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ArgOrResult)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalForeignTypeReason))))))) :+: ((((C1 ('MetaCons "TcRnInvalidCIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CLabelString)) :+: (C1 ('MetaCons "TcRnExpectedValueId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyThing)) :+: C1 ('MetaCons "TcRnNotARecordSelector" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))) :+: (C1 ('MetaCons "TcRnRecSelectorEscapedTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)) :+: (C1 ('MetaCons "TcRnPatSynNotBidirectional" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TcRnSplicePolymorphicLocalVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id))))) :+: ((C1 ('MetaCons "TcRnIllegalDerivingItem" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsSigType GhcRn))) :+: (C1 ('MetaCons "TcRnUnexpectedAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsSrcBang)) :+: C1 ('MetaCons "TcRnIllegalRecordSyntax" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcRn))))) :+: (C1 ('MetaCons "TcRnUnexpectedTypeSplice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcRn))) :+: (C1 ('MetaCons "TcRnInvalidVisibleKindArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnTooManyBinders" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [LHsTyVarBndr () GhcRn])))))) :+: (((C1 ('MetaCons "TcRnDifferentNamesForTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: (C1 ('MetaCons "TcRnInvalidReturnKind" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataSort) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AllowedDataResKind)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe SuggestUnliftedTypes)))) :+: C1 ('MetaCons "TcRnClassKindNotConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind)))) :+: (C1 ('MetaCons "TcRnUnpromotableThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PromotionErr)) :+: (C1 ('MetaCons "TcRnMatchesHaveDiffNumArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsMatchContext GhcTc)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MatchArgBadMatches)) :+: C1 ('MetaCons "TcRnCannotBindScopedTyVarInPatSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (Name, TcTyVar))))))) :+: ((C1 ('MetaCons "TcRnCannotBindTyVarsInPatBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (Name, TcTyVar)))) :+: (C1 ('MetaCons "TcRnTooManyTyArgsInConPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConLike) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int))) :+: C1 ('MetaCons "TcRnMultipleInlinePragmas" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LocatedA InlinePragma)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (LocatedA InlinePragma))))))) :+: (C1 ('MetaCons "TcRnUnexpectedPragmas" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (LSig GhcRn)))) :+: (C1 ('MetaCons "TcRnNonOverloadedSpecialisePragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LIdP GhcRn))) :+: C1 ('MetaCons "TcRnSpecialiseNotVisible" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))))))) :+: (((((C1 ('MetaCons "TcRnNameByTemplateHaskellQuote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons "TcRnIllegalBindingOfBuiltIn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)) :+: C1 ('MetaCons "TcRnPragmaWarning" 'PrefixI 'True) ((S1 ('MetaSel ('Just "pragma_warning_occ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OccName) :*: S1 ('MetaSel ('Just "pragma_warning_msg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WarningTxt GhcRn))) :*: (S1 ('MetaSel ('Just "pragma_warning_import_mod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName) :*: S1 ('MetaSel ('Just "pragma_warning_defined_mod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleName))))) :+: (C1 ('MetaCons "TcRnIllegalHsigDefaultMethods" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LHsBind GhcRn)))) :+: (C1 ('MetaCons "TcRnBadGenericMethod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TcRnWarningMinimalDefIncomplete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassMinimalDef))))) :+: ((C1 ('MetaCons "TcRnDefaultMethodForPragmaLacksBinding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sig GhcRn))) :+: (C1 ('MetaCons "TcRnIgnoreSpecialisePragmaOnDefMethod" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TcRnBadMethodErr" 'PrefixI 'True) (S1 ('MetaSel ('Just "badMethodErrClassName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Just "badMethodErrMethodName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))) :+: (C1 ('MetaCons "TcRnNoExplicitAssocTypeOrDefaultDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: (C1 ('MetaCons "TcRnIllegalNewtype" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IllegalNewtypeReason))) :+: C1 ('MetaCons "TcRnIllegalTypeData" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TcRnTypeDataForbids" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeDataForbids)) :+: (C1 ('MetaCons "TcRnTypedTHWithPolyType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcType)) :+: C1 ('MetaCons "TcRnSpliceThrewException" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SplicePhase) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SomeException)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcTc)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))))) :+: (C1 ('MetaCons "TcRnInvalidTopDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))) :+: (C1 ('MetaCons "TcRnNonExactName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnAddInvalidCorePlugin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))) :+: ((C1 ('MetaCons "TcRnAddDocToNonLocalDefn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DocLoc)) :+: (C1 ('MetaCons "TcRnFailedToLookupThInstName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LookupTHInstNameErrReason)) :+: C1 ('MetaCons "TcRnCannotReifyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "TcRnCannotReifyOutOfScopeThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: (C1 ('MetaCons "TcRnCannotReifyThingNotInTypeEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TcRnNoRolesAssociatedWithThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyThing))))))) :+: ((((C1 ('MetaCons "TcRnCannotRepresentType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnrepresentableTypeDescr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "TcRnRunSpliceFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RunSpliceFailReason)) :+: C1 ('MetaCons "TcRnReportCustomQuasiError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))) :+: (C1 ('MetaCons "TcRnInterfaceLookupError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: (C1 ('MetaCons "TcRnUnsatisfiedMinimalDef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClassMinimalDef)) :+: C1 ('MetaCons "TcRnMisplacedInstSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsSigType GhcRn)))))) :+: ((C1 ('MetaCons "TcRnBadBootFamInstDecl" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnIllegalFamilyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon)) :+: C1 ('MetaCons "TcRnMissingClassAssoc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon)))) :+: (C1 ('MetaCons "TcRnBadFamInstDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon)) :+: (C1 ('MetaCons "TcRnNotOpenFamily" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon)) :+: C1 ('MetaCons "TcRnNoRebindableSyntaxRecordDot" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TcRnNoFieldPunsRecordDot" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnIllegalStaticExpression" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "TcRnIllegalStaticFormInSplice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcPs))))) :+: (C1 ('MetaCons "TcRnListComprehensionDuplicateBinding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: (C1 ('MetaCons "TcRnEmptyStmtsGroup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EmptyStatementGroupErrReason)) :+: C1 ('MetaCons "TcRnLastStmtNotExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsStmtContext GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnexpectedStatement))))) :+: ((C1 ('MetaCons "TcRnUnexpectedStatementInContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsStmtContext GhcRn)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnexpectedStatement) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Extension)))) :+: (C1 ('MetaCons "TcRnIllegalTupleSection" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnIllegalImplicitParameterBindings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs)))))) :+: (C1 ('MetaCons "TcRnSectionWithoutParentheses" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcPs))) :+: (C1 ('MetaCons "TcRnLoopySuperclassSolve" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CtLoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PredType)) :+: C1 ('MetaCons "TcRnCannotDefaultConcrete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FixedRuntimeRepOrigin))))))))))
type DiagnosticOpts TcRnMessage 
Instance details

Defined in GHC.Tc.Errors.Ppr

data TcRnMessageDetailed #

TcRnMessageDetailed is an "internal" type (used only inside Monad that wraps a TcRnMessage while also providing any extra info needed to correctly pretty-print this diagnostic later on.

Constructors

TcRnMessageDetailed 

Fields

Instances

Instances details
Generic TcRnMessageDetailed 
Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TcRnMessageDetailed :: Type -> Type #

type Rep TcRnMessageDetailed 
Instance details

Defined in GHC.Tc.Errors.Types

stripTcRnMessageContext :: TcRnMessage -> TcRnMessage Source #

Some TcRnMessages are nested in other constructors for additional context. For example, TcRnWithHsDocContext and TcRnMessageWithInfo. However, in some occasions you don't need the additional context and you just want the error message. stripTcRnMessageContext recursively unwraps these constructors, until there are no more constructors with additional context.

Parsing error message

data PsMessage #

Constructors

PsHeaderMessage !PsHeaderMessage

A group of parser messages emitted in Header. See Note [Messages from GHC.Parser.Header].

Instances

Instances details
Generic PsMessage 
Instance details

Defined in GHC.Parser.Errors.Types

Associated Types

type Rep PsMessage :: Type -> Type #

type Rep PsMessage 
Instance details

Defined in GHC.Parser.Errors.Types

type Rep PsMessage = D1 ('MetaData "PsMessage" "GHC.Parser.Errors.Types" "ghc" 'False) ((((((C1 ('MetaCons "PsUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnknownDiagnostic)) :+: (C1 ('MetaCons "PsHeaderMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsHeaderMessage)) :+: C1 ('MetaCons "PsWarnBidirectionalFormatChars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (PsLoc, Char, String)))))) :+: ((C1 ('MetaCons "PsWarnTab" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word)) :+: C1 ('MetaCons "PsWarnTransitionalLayout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransLayoutReason))) :+: (C1 ('MetaCons "PsWarnUnrecognisedPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [String])) :+: C1 ('MetaCons "PsWarnMisplacedPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FileHeaderPragmaType))))) :+: ((C1 ('MetaCons "PsWarnHaddockInvalidPos" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsWarnHaddockIgnoreMulti" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsWarnStarBinder" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsWarnStarIsType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsWarnImportPreQualified" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsWarnOperatorWhitespaceExtConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OperatorWhitespaceSymbol)) :+: C1 ('MetaCons "PsWarnOperatorWhitespace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OperatorWhitespaceOccurrence)))))) :+: (((C1 ('MetaCons "PsErrLambdaCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsErrEmptyLambda" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrNumUnderscores" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumUnderscoreReason)))) :+: ((C1 ('MetaCons "PsErrPrimStringInvalidChar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrMissingBlock" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrLexer" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LexErr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LexErrKind)) :+: C1 ('MetaCons "PsErrSuffixAT" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PsErrParse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrParseDetails)) :+: C1 ('MetaCons "PsErrCmmLexer" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrUnsupportedBoxedSumExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SumOrTuple (HsExpr GhcPs)))) :+: C1 ('MetaCons "PsErrUnsupportedBoxedSumPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SumOrTuple (PatBuilder GhcPs)))))) :+: ((C1 ('MetaCons "PsErrUnexpectedQualifiedConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "PsErrTupleSectionInPat" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrIllegalBangPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcPs))) :+: C1 ('MetaCons "PsErrOpFewArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StarIsType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))))))) :+: ((((C1 ('MetaCons "PsErrImportQualifiedTwice" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsErrImportPostQualified" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrIllegalExplicitNamespace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrVarForTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "PsErrIllegalPatSynExport" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrMalformedEntityString" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrDotsInRecordUpdate" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "PsErrPrecedenceOutOfRange" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :+: (C1 ('MetaCons "PsErrOverloadedRecordDotInvalid" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrOverloadedRecordUpdateNotEnabled" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrOverloadedRecordUpdateNoQualifiedFields" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrInvalidDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)))) :+: (C1 ('MetaCons "PsErrInvalidInfixDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)))) :+: C1 ('MetaCons "PsErrIllegalPromotionQuoteDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)))))) :+: (((C1 ('MetaCons "PsErrUnpackDataCon" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PsErrUnexpectedKindAppInDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataConBuilder) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs))) :+: C1 ('MetaCons "PsErrInvalidRecordCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs))))) :+: ((C1 ('MetaCons "PsErrIllegalUnboxedStringInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsLit GhcPs))) :+: C1 ('MetaCons "PsErrIllegalUnboxedFloatingLitInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsLit GhcPs)))) :+: (C1 ('MetaCons "PsErrDoNotationInPat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrIfThenElseInPat" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PsErrLambdaCaseInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LamCaseVariant)) :+: C1 ('MetaCons "PsErrCaseInPat" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrLetInPat" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrLambdaInPat" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrArrowExprInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "PsErrArrowCmdInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs)))) :+: (C1 ('MetaCons "PsErrArrowCmdInExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs))) :+: C1 ('MetaCons "PsErrViewPatInExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))))))) :+: (((((C1 ('MetaCons "PsErrTypeAppWithoutSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: (C1 ('MetaCons "PsErrLazyPatWithoutSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrBangPatWithoutSpace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons "PsErrUnallowedPragma" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsPragE GhcPs))) :+: C1 ('MetaCons "PsErrQualifiedDoInCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))) :+: (C1 ('MetaCons "PsErrInvalidInfixHole" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrSemiColonsInCondExpr" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)))))))) :+: ((C1 ('MetaCons "PsErrSemiColonsInCondCmd" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsCmd GhcPs))))) :+: (C1 ('MetaCons "PsErrAtInPatPos" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrLambdaCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))))) :+: ((C1 ('MetaCons "PsErrCaseCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: C1 ('MetaCons "PsErrLambdaCaseCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LamCaseVariant) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs)))) :+: (C1 ('MetaCons "PsErrIfCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: C1 ('MetaCons "PsErrLetCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))))))) :+: (((C1 ('MetaCons "PsErrDoCmdInFunAppCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsCmd GhcPs))) :+: (C1 ('MetaCons "PsErrDoInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrMDoInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons "PsErrLambdaInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrCaseInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))) :+: (C1 ('MetaCons "PsErrLambdaCaseInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LamCaseVariant) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrLetInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))))) :+: (((C1 ('MetaCons "PsErrIfInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))) :+: C1 ('MetaCons "PsErrProcInFunAppExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs)))) :+: (C1 ('MetaCons "PsErrMalformedTyOrClDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs))) :+: C1 ('MetaCons "PsErrIllegalWhereInDataDecl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrIllegalDataTypeContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsContext GhcPs))) :+: C1 ('MetaCons "PsErrParseErrorOnInput" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName))) :+: (C1 ('MetaCons "PsErrMalformedDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "PsErrUnexpectedTypeAppInDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)))))))) :+: ((((C1 ('MetaCons "PsErrNotADataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: (C1 ('MetaCons "PsErrRecordSyntaxInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LPat GhcPs))) :+: C1 ('MetaCons "PsErrEmptyWhereInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)))) :+: ((C1 ('MetaCons "PsErrInvalidWhereBindInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))) :+: C1 ('MetaCons "PsErrNoSingleWhereBindInPatSynDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs)))) :+: (C1 ('MetaCons "PsErrDeclSpliceNotAtTopLevel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SpliceDecl GhcPs))) :+: C1 ('MetaCons "PsErrInferredTypeVarNotAllowed" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "PsErrMultipleNamesInStandaloneKindSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LIdP GhcPs])) :+: C1 ('MetaCons "PsErrIllegalImportBundleForm" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrIllegalRoleName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: C1 ('MetaCons "PsErrInvalidTypeSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcPs))))) :+: ((C1 ('MetaCons "PsErrUnexpectedTypeInDecl" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsType GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LHsTypeArg GhcPs]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)))) :+: C1 ('MetaCons "PsErrExpectedHyphen" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrSpaceInSCC" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrEmptyDoubleQuotes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))))) :+: (((C1 ('MetaCons "PsErrInvalidPackageName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FastString)) :+: (C1 ('MetaCons "PsErrInvalidRuleActivationMarker" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrLinearFunction" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "PsErrMultiWayIf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PsErrExplicitForall" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))) :+: (C1 ('MetaCons "PsErrIllegalQualifiedDo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: C1 ('MetaCons "PsErrCmmParser" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CmmParserError))))) :+: (((C1 ('MetaCons "PsErrIllegalTraditionalRecordSyntax" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: C1 ('MetaCons "PsErrParseErrorInCmd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc))) :+: (C1 ('MetaCons "PsErrInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsErrInPatDetails)) :+: C1 ('MetaCons "PsErrParseRightOpSectionInPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PatBuilder GhcPs))))) :+: ((C1 ('MetaCons "PsErrIllegalGadtRecordMultiplicity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsArrow GhcPs))) :+: C1 ('MetaCons "PsErrInvalidCApiImport" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PsErrMultipleConForNewtype" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int)) :+: C1 ('MetaCons "PsErrUnicodeCharLooksLike" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Char) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))))))))
type DiagnosticOpts PsMessage 
Instance details

Defined in GHC.Parser.Errors.Ppr

Desugaring diagnostic

data DsMessage #

Diagnostics messages emitted during desugaring.

Constructors

DsUnknownMessage UnknownDiagnostic

Simply wraps a generic Diagnostic message.

DsEmptyEnumeration

DsEmptyEnumeration is a warning (controlled by the -Wempty-enumerations flag) that is emitted if an enumeration is empty.

Example(s):

main :: IO () main = do let enum = [5 .. 3] print enum

Here enum would yield an empty list, because 5 is greater than 3.

Test case(s): warningsshould_compileT10930 warningsshould_compileT18402 warningsshould_compileT10930b numericshould_compileT10929 numericshould_compileT7881 deSugarshould_runT18172

DsIdentitiesFound !Id !Type

DsIdentitiesFound is a warning (controlled by the -Widentities flag) that is emitted on uses of Prelude numeric conversions that are probably the identity (and hence could be omitted).

Example(s):

main :: IO () main = do let x = 10 print $ conv 10

where conv :: Int -> Int conv x = fromIntegral x

Here calling conv is essentially the identity function, and therefore can be omitted.

Test case(s): deSugarshould_compileT4488

DsOverflowedLiterals !Integer !Name !(Maybe (MinBound, MaxBound)) !NegLiteralExtEnabled 
DsRedundantBangPatterns !(HsMatchContext GhcRn) !SDoc 
DsOverlappingPatterns !(HsMatchContext GhcRn) !SDoc 
DsInaccessibleRhs !(HsMatchContext GhcRn) !SDoc 
DsMaxPmCheckModelsReached !MaxPmCheckModels 
DsNonExhaustivePatterns !(HsMatchContext GhcRn) !ExhaustivityCheckType !MaxUncoveredPatterns [Id] [Nabla] 
DsTopLevelBindsNotAllowed !BindsType !(HsBindLR GhcTc GhcTc) 
DsUselessSpecialiseForClassMethodSelector !Id 
DsUselessSpecialiseForNoInlineFunction !Id 
DsMultiplicityCoercionsNotSupported 
DsOrphanRule !CoreRule 
DsRuleLhsTooComplicated !CoreExpr !CoreExpr 
DsRuleIgnoredDueToConstructor !DataCon 
DsRuleBindersNotBound 

Fields

  • ![Var]

    The list of unbound binders

  • ![Var]

    The original binders

  • !CoreExpr

    The original LHS

  • !CoreExpr

    The optimised LHS

DsLazyPatCantBindVarsOfUnliftedType [Var] 
DsNotYetHandledByTH !ThRejectionReason 
DsAggregatedViewExpressions [[LHsExpr GhcTc]] 
DsUnbangedStrictPatterns !(HsBindLR GhcTc GhcTc) 
DsCannotMixPolyAndUnliftedBindings !(HsBindLR GhcTc GhcTc) 
DsWrongDoBind !(LHsExpr GhcTc) !Type 
DsUnusedDoBind !(LHsExpr GhcTc) !Type 
DsRecBindsNotAllowedForUnliftedTys ![LHsBindLR GhcTc GhcTc] 
DsRuleMightInlineFirst !RuleName !Var !Activation 
DsAnotherRuleMightFireFirst !RuleName !RuleName !Var 

Instances

Instances details
Generic DsMessage 
Instance details

Defined in GHC.HsToCore.Errors.Types

Associated Types

type Rep DsMessage :: Type -> Type #

type Rep DsMessage 
Instance details

Defined in GHC.HsToCore.Errors.Types

type Rep DsMessage = D1 ('MetaData "DsMessage" "GHC.HsToCore.Errors.Types" "ghc" 'False) ((((C1 ('MetaCons "DsUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnknownDiagnostic)) :+: (C1 ('MetaCons "DsEmptyEnumeration" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DsIdentitiesFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "DsOverflowedLiterals" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (MinBound, MaxBound))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NegLiteralExtEnabled))) :+: (C1 ('MetaCons "DsRedundantBangPatterns" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsMatchContext GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: C1 ('MetaCons "DsOverlappingPatterns" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsMatchContext GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc))))) :+: ((C1 ('MetaCons "DsInaccessibleRhs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsMatchContext GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SDoc)) :+: (C1 ('MetaCons "DsMaxPmCheckModelsReached" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 MaxPmCheckModels)) :+: C1 ('MetaCons "DsNonExhaustivePatterns" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsMatchContext GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExhaustivityCheckType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 MaxUncoveredPatterns) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Id]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Nabla])))))) :+: ((C1 ('MetaCons "DsTopLevelBindsNotAllowed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BindsType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsBindLR GhcTc GhcTc))) :+: C1 ('MetaCons "DsUselessSpecialiseForClassMethodSelector" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id))) :+: (C1 ('MetaCons "DsUselessSpecialiseForNoInlineFunction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "DsMultiplicityCoercionsNotSupported" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DsOrphanRule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreRule)) :+: (C1 ('MetaCons "DsRuleLhsTooComplicated" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreExpr)) :+: C1 ('MetaCons "DsRuleIgnoredDueToConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon)))) :+: ((C1 ('MetaCons "DsRuleBindersNotBound" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Var]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Var])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreExpr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreExpr))) :+: C1 ('MetaCons "DsLazyPatCantBindVarsOfUnliftedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Var]))) :+: (C1 ('MetaCons "DsNotYetHandledByTH" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ThRejectionReason)) :+: C1 ('MetaCons "DsAggregatedViewExpressions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[LHsExpr GhcTc]]))))) :+: ((C1 ('MetaCons "DsUnbangedStrictPatterns" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsBindLR GhcTc GhcTc))) :+: (C1 ('MetaCons "DsCannotMixPolyAndUnliftedBindings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsBindLR GhcTc GhcTc))) :+: C1 ('MetaCons "DsWrongDoBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcTc)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: ((C1 ('MetaCons "DsUnusedDoBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcTc)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "DsRecBindsNotAllowedForUnliftedTys" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [LHsBindLR GhcTc GhcTc]))) :+: (C1 ('MetaCons "DsRuleMightInlineFirst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RuleName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Var) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Activation))) :+: C1 ('MetaCons "DsAnotherRuleMightFireFirst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RuleName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RuleName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Var))))))))
type DiagnosticOpts DsMessage 
Instance details

Defined in GHC.HsToCore.Errors.Ppr

Driver error message

data DriverMessage where #

A message from the driver.

Constructors

DriverUnknownMessage :: UnknownDiagnostic -> DriverMessage

Simply wraps a generic Diagnostic message a.

DriverPsHeaderMessage :: !PsMessage -> DriverMessage

A parse error in parsing a Haskell file header during dependency analysis

DriverMissingHomeModules :: UnitId -> [ModuleName] -> !BuildingCabalPackage -> DriverMessage

DriverMissingHomeModules is a warning (controlled with -Wmissing-home-modules) that arises when running GHC in --make mode when some modules needed for compilation are not included on the command line. For example, if A imports B, `ghc --make A.hs` will cause this warning, while `ghc --make A.hs B.hs` will not.

Useful for cabal to ensure GHC won't pick up modules listed neither in 'exposed-modules' nor in 'other-modules'.

Test case: warningsshould_compileMissingMod

DriverUnknownReexportedModules :: UnitId -> [ModuleName] -> DriverMessage

DriverUnknown is a warning that arises when a user tries to reexport a module which isn't part of that unit.

DriverUnknownHiddenModules :: UnitId -> [ModuleName] -> DriverMessage

DriverUnknownHiddenModules is a warning that arises when a user tries to hide a module which isn't part of that unit.

DriverUnusedPackages :: [(UnitId, PackageName, Version, PackageArg)] -> DriverMessage

DriverUnusedPackages occurs when when package is requested on command line, but was never needed during compilation. Activated by -Wunused-packages.

Test cases: warningsshould_compileUnusedPackages

DriverUnnecessarySourceImports :: !ModuleName -> DriverMessage

DriverUnnecessarySourceImports (controlled with -Wunused-imports) occurs if there are {-# SOURCE #-} imports which are not necessary. See warnUnnecessarySourceImports in Make.

Test cases: warningsshould_compileT10637

DriverDuplicatedModuleDeclaration :: !Module -> [FilePath] -> DriverMessage

DriverDuplicatedModuleDeclaration occurs if a module A is declared in multiple files.

Test cases: None.

DriverModuleNotFound :: !ModuleName -> DriverMessage

DriverModuleNotFound occurs if a module A can't be found.

Test cases: None.

DriverFileModuleNameMismatch :: !ModuleName -> !ModuleName -> DriverMessage

DriverFileModuleNameMismatch occurs if a module A is defined in a file with a different name. The first field is the name written in the source code; the second argument is the name extracted from the filename.

Test cases: modulemod178, driver/bug1677

DriverUnexpectedSignature :: !ModuleName -> !BuildingCabalPackage -> GenInstantiations UnitId -> DriverMessage

DriverUnexpectedSignature occurs when GHC encounters a module A that imports a signature file which is neither in the signatures section of a '.cabal' file nor in any package in the home modules.

Example:

  • - MyStr.hsig is defined, but not added to signatures in the '.cabal' file. signature MyStr where data Str
  • - A.hs, which tries to import the signature. module A where import MyStr

Test cases: driver/T12955

DriverFileNotFound :: !FilePath -> DriverMessage

DriverFileNotFound occurs when the input file (e.g. given on the command line) can't be found.

Test cases: None.

DriverStaticPointersNotSupported :: DriverMessage

DriverStaticPointersNotSupported occurs when the StaticPointers extension is used in an interactive GHCi context.

Test cases: ghciscriptsStaticPtr

DriverBackpackModuleNotFound :: !ModuleName -> DriverMessage

DriverBackpackModuleNotFound occurs when Backpack can't find a particular module during its dependency analysis.

Test cases: -

DriverUserDefinedRuleIgnored :: !(RuleDecl GhcTc) -> DriverMessage

DriverUserDefinedRuleIgnored is a warning that occurs when user-defined rules are ignored. This typically happens when Safe Haskell.

Test cases:

testssafeHaskellsafeInfered/UnsafeWarn05 testssafeHaskellsafeInfered/UnsafeWarn06 testssafeHaskellsafeInfered/UnsafeWarn07 testssafeHaskellsafeInfered/UnsafeInfered11 testssafeHaskellsafeLanguage/SafeLang03

DriverMixedSafetyImport :: !ModuleName -> DriverMessage

DriverMixedSafetyImport is an error that occurs when a module is imported both as safe and unsafe.

Test cases:

testssafeHaskellsafeInfered/Mixed03 testssafeHaskellsafeInfered/Mixed02

DriverCannotLoadInterfaceFile :: !Module -> DriverMessage

DriverCannotLoadInterfaceFile is an error that occurs when we cannot load the interface file for a particular module. This can happen for example in the context of Safe Haskell, when we have to load a module to check if it can be safely imported.

Test cases: None.

DriverInferredSafeModule :: !Module -> DriverMessage

DriverInferredSafeImport is a warning (controlled by the Opt_WarnSafe flag) that occurs when a module is inferred safe.

Test cases: None.

DriverMarkedTrustworthyButInferredSafe :: !Module -> DriverMessage

DriverMarkedTrustworthyButInferredSafe is a warning (controlled by the Opt_WarnTrustworthySafe flag) that occurs when a module is marked trustworthy in SafeHaskell but it has been inferred safe.

Test cases: testssafeHaskellsafeInfered/TrustworthySafe02 testssafeHaskellsafeInfered/TrustworthySafe03

DriverInferredSafeImport :: !Module -> DriverMessage

DriverInferredSafeImport is a warning (controlled by the Opt_WarnInferredSafeImports flag) that occurs when a safe-inferred module is imported from a safe module.

Test cases: None.

DriverCannotImportUnsafeModule :: !Module -> DriverMessage

DriverCannotImportUnsafeModule is an error that occurs when an usafe module is being imported from a safe one.

Test cases: None.

DriverMissingSafeHaskellMode :: !Module -> DriverMessage

DriverMissingSafeHaskellMode is a warning (controlled by the Opt_WarnMissingSafeHaskellMode flag) that occurs when a module is using SafeHaskell features but SafeHaskell mode is not enabled.

Test cases: None.

DriverPackageNotTrusted :: !UnitState -> !UnitId -> DriverMessage

DriverPackageNotTrusted is an error that occurs when a package is required to be trusted but it isn't.

Test cases: testssafeHaskellcheck/Check01 testssafeHaskellcheck/Check08 testssafeHaskellcheck/Check06 testssafeHaskellcheckpkg01ImpSafeOnly09 testssafeHaskellcheckpkg01ImpSafe03 testssafeHaskellcheckpkg01ImpSafeOnly07 testssafeHaskellcheckpkg01ImpSafeOnly08

DriverCannotImportFromUntrustedPackage :: !UnitState -> !Module -> DriverMessage

DriverCannotImportFromUntrustedPackage is an error that occurs in the context of Safe Haskell when trying to import a module coming from an untrusted package.

Test cases: testssafeHaskellcheck/Check09 testssafeHaskellcheckpkg01ImpSafe01 testssafeHaskellcheckpkg01ImpSafe04 testssafeHaskellcheckpkg01ImpSafeOnly03 testssafeHaskellcheckpkg01ImpSafeOnly05 testssafeHaskellflags/SafeFlags17 testssafeHaskellflags/SafeFlags22 testssafeHaskellflags/SafeFlags23 testssafeHaskellghci/p11 testssafeHaskellghci/p12 testssafeHaskellghci/p17 testssafeHaskellghci/p3 testssafeHaskellsafeInfered/UnsafeInfered01 testssafeHaskellsafeInfered/UnsafeInfered02 testssafeHaskellsafeInfered/UnsafeInfered02 testssafeHaskellsafeInfered/UnsafeInfered03 testssafeHaskellsafeInfered/UnsafeInfered05 testssafeHaskellsafeInfered/UnsafeInfered06 testssafeHaskellsafeInfered/UnsafeInfered09 testssafeHaskellsafeInfered/UnsafeInfered10 testssafeHaskellsafeInfered/UnsafeInfered11 testssafeHaskellsafeInfered/UnsafeWarn01 testssafeHaskellsafeInfered/UnsafeWarn03 testssafeHaskellsafeInfered/UnsafeWarn04 testssafeHaskellsafeInfered/UnsafeWarn05 testssafeHaskellunsafeLibs/BadImport01 testssafeHaskellunsafeLibs/BadImport06 testssafeHaskellunsafeLibs/BadImport07 testssafeHaskellunsafeLibs/BadImport08 testssafeHaskellunsafeLibs/BadImport09 testssafeHaskellunsafeLibs/Dep05 testssafeHaskellunsafeLibs/Dep06 testssafeHaskellunsafeLibs/Dep07 testssafeHaskellunsafeLibs/Dep08 testssafeHaskellunsafeLibs/Dep09 testssafeHaskellunsafeLibs/Dep10

DriverRedirectedNoMain :: !ModuleName -> DriverMessage 
DriverHomePackagesNotClosed :: ![UnitId] -> DriverMessage 

Instances

Instances details
Generic DriverMessage 
Instance details

Defined in GHC.Driver.Errors.Types

Associated Types

type Rep DriverMessage :: Type -> Type #

type Rep DriverMessage 
Instance details

Defined in GHC.Driver.Errors.Types

type Rep DriverMessage = D1 ('MetaData "DriverMessage" "GHC.Driver.Errors.Types" "ghc" 'False) ((((C1 ('MetaCons "DriverUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnknownDiagnostic)) :+: (C1 ('MetaCons "DriverPsHeaderMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PsMessage)) :+: C1 ('MetaCons "DriverMissingHomeModules" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitId) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BuildingCabalPackage))))) :+: (C1 ('MetaCons "DriverUnknownReexportedModules" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName])) :+: (C1 ('MetaCons "DriverUnknownHiddenModules" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName])) :+: C1 ('MetaCons "DriverUnusedPackages" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(UnitId, PackageName, Version, PackageArg)]))))) :+: ((C1 ('MetaCons "DriverUnnecessarySourceImports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)) :+: (C1 ('MetaCons "DriverDuplicatedModuleDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath])) :+: C1 ('MetaCons "DriverModuleNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)))) :+: ((C1 ('MetaCons "DriverFileModuleNameMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)) :+: C1 ('MetaCons "DriverUnexpectedSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BuildingCabalPackage) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenInstantiations UnitId))))) :+: (C1 ('MetaCons "DriverFileNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FilePath)) :+: C1 ('MetaCons "DriverStaticPointersNotSupported" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DriverBackpackModuleNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)) :+: (C1 ('MetaCons "DriverUserDefinedRuleIgnored" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (RuleDecl GhcTc))) :+: C1 ('MetaCons "DriverMixedSafetyImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)))) :+: (C1 ('MetaCons "DriverCannotLoadInterfaceFile" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module)) :+: (C1 ('MetaCons "DriverInferredSafeModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module)) :+: C1 ('MetaCons "DriverMarkedTrustworthyButInferredSafe" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module))))) :+: ((C1 ('MetaCons "DriverInferredSafeImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module)) :+: (C1 ('MetaCons "DriverCannotImportUnsafeModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module)) :+: C1 ('MetaCons "DriverMissingSafeHaskellMode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module)))) :+: ((C1 ('MetaCons "DriverPackageNotTrusted" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitId)) :+: C1 ('MetaCons "DriverCannotImportFromUntrustedPackage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module))) :+: (C1 ('MetaCons "DriverRedirectedNoMain" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)) :+: C1 ('MetaCons "DriverHomePackagesNotClosed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [UnitId])))))))
type DiagnosticOpts DriverMessage 
Instance details

Defined in GHC.Driver.Errors.Ppr

General Diagnostics

class Diagnostic a where #

A class identifying a diagnostic. Dictionary.com defines a diagnostic as:

"a message output by a computer diagnosing an error in a computer program, computer system, or component device".

A Diagnostic carries the actual description of the message (which, in GHC's case, it can be an error or a warning) and the reason why such message was generated in the first place.

Associated Types

type DiagnosticOpts a #

Type of configuration options for the diagnostic.

Methods

defaultDiagnosticOpts :: DiagnosticOpts a #

diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc #

Extract the error message text from a Diagnostic.

diagnosticReason :: a -> DiagnosticReason #

Extract the reason for this diagnostic. For warnings, a DiagnosticReason includes the warning flag.

diagnosticHints :: a -> [GhcHint] #

Extract any hints a user might use to repair their code to avoid this diagnostic.

diagnosticCode :: a -> Maybe DiagnosticCode #

Get the DiagnosticCode associated with this Diagnostic. This can return Nothing for at least two reasons:

  1. The message might be from a plugin that does not supply codes.
  2. The message might not yet have been assigned a code. See the Diagnostic instance for DiagnosticMessage.

Ideally, case (2) would not happen, but because some errors in GHC still use the old system of just writing the error message in-place (instead of using a dedicated error type and constructor), we do not have error codes for all errors. #18516 tracks our progress toward this goal.

Prisms for error selection