ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Tc.Errors.Types

Contents

- Main types
- Errors for hs-boot and signature files
- Class and family instance errors
- Template Haskell errors
- Zonker errors

Synopsis

- data TcRnMessage where
  - TcRnUnknownMessage :: UnknownDiagnostic (DiagnosticOpts TcRnMessage) -> TcRnMessage
  - TcRnInterfaceError :: !IfaceMessage -> TcRnMessage
  - TcRnMessageWithInfo :: !UnitState -> !TcRnMessageDetailed -> TcRnMessage
  - TcRnWithHsDocContext :: !HsDocContext -> !TcRnMessage -> TcRnMessage
  - TcRnSolverReport :: SolverReportWithCtxt -> DiagnosticReason -> TcRnMessage
  - TcRnSolverDepthError :: !Type -> !SubGoalDepth -> TcRnMessage
  - TcRnRedundantConstraints :: [Id] -> (SkolemInfoAnon, Bool) -> TcRnMessage
  - TcRnInaccessibleCode :: Implication -> SolverReportWithCtxt -> TcRnMessage
  - TcRnInaccessibleCoAxBranch :: TyCon -> CoAxBranch -> TcRnMessage
  - TcRnTypeDoesNotHaveFixedRuntimeRep :: !Type -> !FixedRuntimeRepProvenance -> !ErrInfo -> TcRnMessage
  - TcRnImplicitLift :: Name -> !ErrInfo -> TcRnMessage
  - TcRnUnusedPatternBinds :: HsBind GhcRn -> TcRnMessage
  - TcRnUnusedQuantifiedTypeVar :: HsDocContext -> HsTyVarBndrExistentialFlag -> TcRnMessage
  - TcRnDodgyImports :: !DodgyImportsReason -> TcRnMessage
  - TcRnDodgyExports :: GlobalRdrElt -> TcRnMessage
  - TcRnMissingImportList :: IE GhcPs -> TcRnMessage
  - TcRnUnsafeDueToPlugin :: TcRnMessage
  - TcRnModMissingRealSrcSpan :: Module -> TcRnMessage
  - TcRnIdNotExportedFromModuleSig :: Name -> Module -> TcRnMessage
  - TcRnIdNotExportedFromLocalSig :: Name -> TcRnMessage
  - TcRnShadowedName :: OccName -> ShadowedNameProvenance -> TcRnMessage
  - TcRnInvalidWarningCategory :: !WarningCategory -> TcRnMessage
  - TcRnDuplicateWarningDecls :: !(LocatedN RdrName) -> !RdrName -> TcRnMessage
  - TcRnSimplifierTooManyIterations :: Cts -> !IntWithInf -> WantedConstraints -> TcRnMessage
  - TcRnIllegalPatSynDecl :: !(LIdP GhcPs) -> TcRnMessage
  - TcRnLinearPatSyn :: !Type -> TcRnMessage
  - TcRnEmptyRecordUpdate :: TcRnMessage
  - TcRnIllegalFieldPunning :: !(Located RdrName) -> TcRnMessage
  - TcRnIllegalWildcardsInRecord :: !RecordFieldPart -> TcRnMessage
  - TcRnIllegalWildcardInType :: Maybe Name -> !BadAnonWildcardContext -> TcRnMessage
  - TcRnIllegalNamedWildcardInTypeArgument :: RdrName -> TcRnMessage
  - TcRnIllegalImplicitTyVarInTypeArgument :: RdrName -> TcRnMessage
  - TcRnDuplicateFieldName :: !RecordFieldPart -> NonEmpty RdrName -> TcRnMessage
  - TcRnIllegalViewPattern :: !(Pat GhcPs) -> TcRnMessage
  - TcRnCharLiteralOutOfRange :: !Char -> TcRnMessage
  - TcRnNegativeNumTypeLiteral :: HsTyLit GhcPs -> TcRnMessage
  - TcRnIllegalWildcardsInConstructor :: !Name -> TcRnMessage
  - TcRnIgnoringAnnotations :: [LAnnDecl GhcRn] -> TcRnMessage
  - TcRnAnnotationInSafeHaskell :: TcRnMessage
  - TcRnInvalidTypeApplication :: Type -> LHsWcType GhcRn -> TcRnMessage
  - TcRnTagToEnumMissingValArg :: TcRnMessage
  - TcRnTagToEnumUnspecifiedResTy :: Type -> TcRnMessage
  - TcRnTagToEnumResTyNotAnEnum :: Type -> TcRnMessage
  - TcRnTagToEnumResTyTypeData :: Type -> TcRnMessage
  - TcRnArrowIfThenElsePredDependsOnResultTy :: TcRnMessage
  - TcRnIllegalHsBootOrSigDecl :: !HsBootOrSig -> !BadBootDecls -> TcRnMessage
  - TcRnBootMismatch :: !HsBootOrSig -> !BootMismatch -> TcRnMessage
  - TcRnRecursivePatternSynonym :: LHsBinds GhcRn -> TcRnMessage
  - TcRnPartialTypeSigTyVarMismatch :: Name -> Name -> Name -> LHsSigWcType GhcRn -> TcRnMessage
  - TcRnPartialTypeSigBadQuantifier :: Name -> Name -> Maybe Type -> LHsSigWcType GhcRn -> TcRnMessage
  - TcRnMissingSignature :: MissingSignature -> Exported -> TcRnMessage
  - TcRnPolymorphicBinderMissingSig :: Name -> Type -> TcRnMessage
  - TcRnOverloadedSig :: TcIdSig -> TcRnMessage
  - TcRnTupleConstraintInst :: !Class -> TcRnMessage
  - TcRnUserTypeError :: !Type -> TcRnMessage
  - TcRnConstraintInKind :: !Type -> TcRnMessage
  - TcRnUnboxedTupleOrSumTypeFuncArg :: UnboxedTupleOrSum -> !Type -> TcRnMessage
  - TcRnLinearFuncInKind :: !Type -> TcRnMessage
  - TcRnForAllEscapeError :: !Type -> !Kind -> TcRnMessage
  - TcRnVDQInTermType :: !(Maybe Type) -> TcRnMessage
  - TcRnBadQuantPredHead :: !Type -> TcRnMessage
  - TcRnIllegalTupleConstraint :: !Type -> TcRnMessage
  - TcRnNonTypeVarArgInConstraint :: !Type -> TcRnMessage
  - TcRnIllegalImplicitParam :: !Type -> TcRnMessage
  - TcRnIllegalConstraintSynonymOfKind :: !Type -> TcRnMessage
  - TcRnOversaturatedVisibleKindArg :: !Type -> TcRnMessage
  - TcRnForAllRankErr :: !Rank -> !Type -> TcRnMessage
  - TcRnSimplifiableConstraint :: !PredType -> !InstanceWhat -> TcRnMessage
  - TcRnArityMismatch :: !TyThing -> !Arity -> !Arity -> TcRnMessage
  - TcRnIllegalInstance :: IllegalInstanceReason -> TcRnMessage
  - TcRnMonomorphicBindings :: [Name] -> TcRnMessage
  - TcRnOrphanInstance :: Either ClsInst FamInst -> TcRnMessage
  - TcRnFunDepConflict :: !UnitState -> NonEmpty ClsInst -> TcRnMessage
  - TcRnDupInstanceDecls :: !UnitState -> NonEmpty ClsInst -> TcRnMessage
  - TcRnConflictingFamInstDecls :: NonEmpty FamInst -> TcRnMessage
  - TcRnFamInstNotInjective :: InjectivityErrReason -> TyCon -> NonEmpty CoAxBranch -> TcRnMessage
  - TcRnBangOnUnliftedType :: !Type -> TcRnMessage
  - TcRnLazyBangOnUnliftedType :: !Type -> TcRnMessage
  - TcRnMultipleDefaultDeclarations :: [LDefaultDecl GhcRn] -> TcRnMessage
  - TcRnBadDefaultType :: Type -> [Class] -> TcRnMessage
  - TcRnPatSynBundledWithNonDataCon :: TcRnMessage
  - TcRnPatSynBundledWithWrongType :: Type -> Type -> TcRnMessage
  - TcRnDupeModuleExport :: ModuleName -> TcRnMessage
  - TcRnExportedModNotImported :: ModuleName -> TcRnMessage
  - TcRnNullExportedModule :: ModuleName -> TcRnMessage
  - TcRnMissingExportList :: ModuleName -> TcRnMessage
  - TcRnExportHiddenComponents :: IE GhcPs -> TcRnMessage
  - TcRnDuplicateExport :: GlobalRdrElt -> IE GhcPs -> IE GhcPs -> TcRnMessage
  - TcRnExportedParentChildMismatch :: Name -> TyThing -> Name -> [Name] -> TcRnMessage
  - TcRnConflictingExports :: OccName -> GlobalRdrElt -> IE GhcPs -> GlobalRdrElt -> IE GhcPs -> TcRnMessage
  - TcRnDuplicateFieldExport :: (GlobalRdrElt, IE GhcPs) -> NonEmpty (GlobalRdrElt, IE GhcPs) -> TcRnMessage
  - TcRnAmbiguousRecordUpdate :: HsExpr GhcRn -> TyCon -> TcRnMessage
  - TcRnMissingFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage
  - TcRnFieldUpdateInvalidType :: [(FieldLabelString, TcType)] -> TcRnMessage
  - TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage
  - TcRnAmbiguousFieldInUpdate :: (GlobalRdrElt, GlobalRdrElt, [GlobalRdrElt]) -> TcRnMessage
  - TcRnBadRecordUpdate :: [RdrName] -> BadRecordUpdateReason -> TcRnMessage
  - TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage
  - TcRnUselessTypeable :: TcRnMessage
  - TcRnDerivingDefaults :: !Class -> TcRnMessage
  - TcRnNonUnaryTypeclassConstraint :: !(LHsSigType GhcRn) -> TcRnMessage
  - TcRnPartialTypeSignatures :: !SuggestPartialTypeSignatures -> !ThetaType -> TcRnMessage
  - TcRnCannotDeriveInstance :: !Class -> [Type] -> !(Maybe (DerivStrategy GhcTc)) -> !UsingGeneralizedNewtypeDeriving -> !DeriveInstanceErrReason -> TcRnMessage
  - TcRnLazyGADTPattern :: TcRnMessage
  - TcRnArrowProcGADTPattern :: TcRnMessage
  - TcRnCapturedTermName :: RdrName -> Either [GlobalRdrElt] Name -> TcRnMessage
  - TcRnTypeEqualityOutOfScope :: TcRnMessage
  - TcRnTypeEqualityRequiresOperators :: TcRnMessage
  - TcRnIllegalTypeOperator :: !SDoc -> !RdrName -> TcRnMessage
  - TcRnIllegalTypeOperatorDecl :: !RdrName -> TcRnMessage
  - TcRnGADTMonoLocalBinds :: TcRnMessage
  - TcRnNotInScope :: NotInScopeError -> RdrName -> [ImportError] -> [GhcHint] -> TcRnMessage
  - TcRnTermNameInType :: RdrName -> [GhcHint] -> TcRnMessage
  - TcRnUntickedPromotedThing :: UntickedPromotedThing -> TcRnMessage
  - TcRnIllegalBuiltinSyntax :: SDoc -> RdrName -> TcRnMessage
  - TcRnWarnDefaulting :: [Ct] -> Maybe TyVar -> Type -> TcRnMessage
  - TcRnIncorrectNameSpace :: Name -> Bool -> 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
  - TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage
  - TcRnPatSynNotBidirectional :: !Name -> TcRnMessage
  - TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage
  - TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage
  - TcRnIllegalRecordSyntax :: Either (HsType GhcPs) (HsType GhcRn) -> TcRnMessage
  - TcRnInvalidVisibleKindArgument :: !(LHsType GhcRn) -> !Type -> TcRnMessage
  - TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] -> TcRnMessage
  - TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage
  - TcRnDisconnectedTyVar :: !Name -> TcRnMessage
  - TcRnInvalidReturnKind :: !DataSort -> !AllowedDataResKind -> !Kind -> !(Maybe SuggestUnliftedTypes) -> TcRnMessage
  - TcRnUnexpectedKindVar :: RdrName -> TcRnMessage
  - TcRnIllegalKind :: HsTypeOrSigType GhcPs -> Bool -> TcRnMessage
  - TcRnClassKindNotConstraint :: !Kind -> TcRnMessage
  - TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage
  - TcRnIllegalTermLevelUse :: !Name -> !TermLevelUseErr -> TcRnMessage
  - TcRnMatchesHaveDiffNumArgs :: !HsMatchContextRn -> !MatchArgBadMatches -> TcRnMessage
  - TcRnUnexpectedPatSigType :: HsPatSigType GhcPs -> TcRnMessage
  - TcRnIllegalKindSignature :: HsType GhcPs -> TcRnMessage
  - TcRnDataKindsError :: TypeOrKind -> Either (HsType GhcPs) Type -> TcRnMessage
  - TcRnCannotBindScopedTyVarInPatSig :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage
  - TcRnCannotBindTyVarsInPatBind :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage
  - TcRnTooManyTyArgsInConPattern :: !ConLike -> !Int -> !Int -> TcRnMessage
  - TcRnMultipleInlinePragmas :: !Id -> !(LocatedA InlinePragma) -> !(NonEmpty (LocatedA InlinePragma)) -> TcRnMessage
  - TcRnUnexpectedPragmas :: !Id -> !(NonEmpty (LSig GhcRn)) -> TcRnMessage
  - TcRnNonOverloadedSpecialisePragma :: !(LIdP GhcRn) -> TcRnMessage
  - TcRnSpecialiseNotVisible :: !Name -> TcRnMessage
  - TcRnPragmaWarning :: {..} -> TcRnMessage
  - TcRnDifferentExportWarnings :: !Name -> NonEmpty SrcSpan -> TcRnMessage
  - TcRnIncompleteExportWarnings :: !Name -> NonEmpty SrcSpan -> TcRnMessage
  - TcRnIllegalHsigDefaultMethods :: !Name -> NonEmpty (LHsBind GhcRn) -> TcRnMessage
  - TcRnHsigFixityMismatch :: !TyThing -> !Fixity -> !Fixity -> TcRnMessage
  - TcRnHsigShapeMismatch :: !HsigShapeMismatchReason -> TcRnMessage
  - TcRnHsigMissingModuleExport :: !OccName -> !UnitState -> !Module -> TcRnMessage
  - TcRnBadGenericMethod :: !Name -> !Name -> TcRnMessage
  - TcRnWarningMinimalDefIncomplete :: ClassMinimalDef -> TcRnMessage
  - TcRnIllegalQuasiQuotes :: TcRnMessage
  - TcRnTHError :: THError -> TcRnMessage
  - TcRnDefaultMethodForPragmaLacksBinding :: Id -> Sig GhcRn -> TcRnMessage
  - TcRnIgnoreSpecialisePragmaOnDefMethod :: !Name -> TcRnMessage
  - TcRnBadMethodErr :: {..} -> TcRnMessage
  - TcRnIllegalNewtype :: DataCon -> Bool -> IllegalNewtypeReason -> TcRnMessage
  - TcRnIllegalTypeData :: TcRnMessage
  - TcRnTypeDataForbids :: !TypeDataForbids -> TcRnMessage
  - TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage
  - TcRnMisplacedInstSig :: Name -> LHsSigType GhcRn -> TcRnMessage
  - TcRnNoRebindableSyntaxRecordDot :: TcRnMessage
  - TcRnNoFieldPunsRecordDot :: TcRnMessage
  - TcRnIllegalStaticExpression :: HsExpr GhcPs -> TcRnMessage
  - TcRnListComprehensionDuplicateBinding :: Name -> TcRnMessage
  - TcRnEmptyStmtsGroup :: EmptyStatementGroupErrReason -> TcRnMessage
  - TcRnLastStmtNotExpr :: HsStmtContextRn -> UnexpectedStatement -> TcRnMessage
  - TcRnUnexpectedStatementInContext :: HsStmtContextRn -> UnexpectedStatement -> Maybe Extension -> TcRnMessage
  - TcRnIllegalTupleSection :: TcRnMessage
  - TcRnIllegalImplicitParameterBindings :: Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs) -> TcRnMessage
  - TcRnSectionWithoutParentheses :: HsExpr GhcPs -> TcRnMessage
  - TcRnBindingOfExistingName :: RdrName -> TcRnMessage
  - TcRnMultipleFixityDecls :: SrcSpan -> RdrName -> TcRnMessage
  - TcRnIllegalPatternSynonymDecl :: TcRnMessage
  - TcRnIllegalClassBinding :: DeclSort -> HsBindLR GhcPs GhcPs -> TcRnMessage
  - TcRnOrphanCompletePragma :: TcRnMessage
  - TcRnEmptyCase :: HsMatchContextRn -> TcRnMessage
  - TcRnNonStdGuards :: NonStandardGuards -> TcRnMessage
  - TcRnDuplicateSigDecl :: NonEmpty (LocatedN RdrName, Sig GhcPs) -> TcRnMessage
  - TcRnMisplacedSigDecl :: Sig GhcRn -> TcRnMessage
  - TcRnUnexpectedDefaultSig :: Sig GhcPs -> TcRnMessage
  - TcRnDuplicateMinimalSig :: LSig GhcPs -> LSig GhcPs -> [LSig GhcPs] -> TcRnMessage
  - TcRnIllegalInvisTyVarBndr :: !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn) -> TcRnMessage
  - TcRnInvalidInvisTyVarBndr :: !Name -> !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn) -> TcRnMessage
  - TcRnInvisBndrWithoutSig :: !Name -> !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn) -> TcRnMessage
  - TcRnDeprecatedInvisTyArgInConPat :: TcRnMessage
  - TcRnUnexpectedStandaloneDerivingDecl :: TcRnMessage
  - TcRnUnusedVariableInRuleDecl :: FastString -> Name -> TcRnMessage
  - TcRnUnexpectedStandaloneKindSig :: TcRnMessage
  - TcRnIllegalRuleLhs :: RuleLhsErrReason -> FastString -> LHsExpr GhcRn -> HsExpr GhcRn -> TcRnMessage
  - TcRnDuplicateRoleAnnot :: NonEmpty (LRoleAnnotDecl GhcPs) -> TcRnMessage
  - TcRnDuplicateKindSig :: NonEmpty (LStandaloneKindSig GhcPs) -> TcRnMessage
  - TcRnIllegalDerivStrategy :: DerivStrategy GhcPs -> TcRnMessage
  - TcRnIllegalMultipleDerivClauses :: TcRnMessage
  - TcRnNoDerivStratSpecified :: Bool -> TcRnMessage
  - TcRnStupidThetaInGadt :: HsDocContext -> TcRnMessage
  - TcRnShadowedTyVarNameInFamResult :: IdP GhcPs -> TcRnMessage
  - TcRnIncorrectTyVarOnLhsOfInjCond :: IdP GhcRn -> LIdP GhcPs -> TcRnMessage
  - TcRnUnknownTyVarsOnRhsOfInjCond :: [Name] -> TcRnMessage
  - TcRnLookupInstance :: !Class -> ![Type] -> !LookupInstanceErrReason -> TcRnMessage
  - TcRnBadlyStaged :: !StageCheckReason -> !Int -> !Int -> TcRnMessage
  - TcRnStageRestriction :: !StageCheckReason -> TcRnMessage
  - TcRnBadlyStagedType :: !Name -> !Int -> !Int -> TcRnMessage
  - TcRnTyThingUsedWrong :: !WrongThingSort -> !TcTyThing -> !Name -> TcRnMessage
  - TcRnCannotDefaultKindVar :: !TyVar -> !Kind -> TcRnMessage
  - TcRnUninferrableTyVar :: ![TyCoVar] -> !UninferrableTyVarCtx -> TcRnMessage
  - TcRnSkolemEscape :: ![TcTyVar] -> !TcTyVar -> !Type -> TcRnMessage
  - TcRnPatSynEscapedCoercion :: !Id -> !(NonEmpty CoVar) -> TcRnMessage
  - TcRnPatSynExistentialInResult :: !Name -> !TcSigmaType -> ![TyVar] -> TcRnMessage
  - TcRnPatSynArityMismatch :: !Name -> !Arity -> !Arity -> TcRnMessage
  - TcRnPatSynInvalidRhs :: !Name -> !(LPat GhcRn) -> ![LIdP GhcRn] -> !PatSynInvalidRhsReason -> TcRnMessage
  - TcRnZonkerMessage :: ZonkerMessage -> TcRnMessage
  - TcRnTyFamDepsDisabled :: TcRnMessage
  - TcRnAbstractClosedTyFamDecl :: TcRnMessage
  - TcRnPartialFieldSelector :: !FieldLabel -> TcRnMessage
  - TcRnHasFieldResolvedIncomplete :: !Name -> TcRnMessage
  - TcRnBadFieldAnnotation :: !Int -> !DataCon -> !BadFieldAnnotationReason -> TcRnMessage
  - TcRnSuperclassCycle :: !SuperclassCycle -> TcRnMessage
  - TcRnDefaultSigMismatch :: !Id -> !Type -> TcRnMessage
  - TcRnTyFamsDisabled :: !TyFamsDisabledReason -> TcRnMessage
  - TcRnBadTyConTelescope :: !TyCon -> TcRnMessage
  - TcRnTyFamResultDisabled :: !Name -> !(LHsTyVarBndr () GhcRn) -> TcRnMessage
  - TcRnRoleValidationFailed :: !Role -> !RoleValidationFailedReason -> TcRnMessage
  - TcRnCommonFieldResultTypeMismatch :: !DataCon -> !DataCon -> !FieldLabelString -> TcRnMessage
  - TcRnCommonFieldTypeMismatch :: !DataCon -> !DataCon -> !FieldLabelString -> TcRnMessage
  - TcRnClassExtensionDisabled :: !Class -> !DisabledClassExtension -> TcRnMessage
  - TcRnDataConParentTypeMismatch :: !DataCon -> !Type -> TcRnMessage
  - TcRnGADTsDisabled :: !Name -> TcRnMessage
  - TcRnExistentialQuantificationDisabled :: !DataCon -> TcRnMessage
  - TcRnGADTDataContext :: !Name -> TcRnMessage
  - TcRnMultipleConForNewtype :: !Name -> !Int -> TcRnMessage
  - TcRnKindSignaturesDisabled :: !(Either (HsType GhcPs) (Name, HsType GhcRn)) -> TcRnMessage
  - TcRnEmptyDataDeclsDisabled :: !Name -> TcRnMessage
  - TcRnRoleMismatch :: !Name -> !Role -> !Role -> TcRnMessage
  - TcRnRoleCountMismatch :: !Int -> !(LRoleAnnotDecl GhcRn) -> TcRnMessage
  - TcRnIllegalRoleAnnotation :: !(RoleAnnotDecl GhcRn) -> TcRnMessage
  - TcRnRoleAnnotationsDisabled :: !TyCon -> TcRnMessage
  - TcRnIncoherentRoles :: !TyCon -> TcRnMessage
  - TcRnPrecedenceParsingError :: (OpName, Fixity) -> (OpName, Fixity) -> TcRnMessage
  - TcRnSectionPrecedenceError :: (OpName, Fixity) -> (OpName, Fixity) -> HsExpr GhcPs -> TcRnMessage
  - TcRnTypeSynonymCycle :: !TySynCycleTyCons -> TcRnMessage
  - TcRnSelfImport :: !ModuleName -> TcRnMessage
  - TcRnNoExplicitImportList :: !ModuleName -> TcRnMessage
  - TcRnSafeImportsDisabled :: !ModuleName -> TcRnMessage
  - TcRnDeprecatedModule :: !ModuleName -> !(WarningTxt GhcRn) -> TcRnMessage
  - TcRnCompatUnqualifiedImport :: !(ImportDecl GhcPs) -> TcRnMessage
  - TcRnRedundantSourceImport :: !ModuleName -> TcRnMessage
  - TcRnImportLookup :: !ImportLookupReason -> TcRnMessage
  - TcRnUnusedImport :: !(ImportDecl GhcRn) -> !UnusedImportReason -> TcRnMessage
  - TcRnDuplicateDecls :: !OccName -> !(NonEmpty Name) -> TcRnMessage
  - TcRnPackageImportsDisabled :: TcRnMessage
  - TcRnIllegalDataCon :: !RdrName -> TcRnMessage
  - TcRnNestedForallsContexts :: !NestedForallsContextsIn -> TcRnMessage
  - TcRnRedundantRecordWildcard :: TcRnMessage
  - TcRnUnusedRecordWildcard :: ![Name] -> TcRnMessage
  - TcRnUnusedName :: !OccName -> !UnusedNameProv -> TcRnMessage
  - TcRnQualifiedBinder :: !RdrName -> TcRnMessage
  - TcRnTypeApplicationsDisabled :: !TypeApplication -> TcRnMessage
  - TcRnInvalidRecordField :: !Name -> !FieldLabelString -> TcRnMessage
  - TcRnTupleTooLarge :: !Int -> TcRnMessage
  - TcRnCTupleTooLarge :: !Int -> TcRnMessage
  - TcRnIllegalInferredTyVars :: !(NonEmpty (HsTyVarBndr Specificity GhcPs)) -> TcRnMessage
  - TcRnAmbiguousName :: !GlobalRdrEnv -> !RdrName -> !(NonEmpty GlobalRdrElt) -> TcRnMessage
  - TcRnBindingNameConflict :: !RdrName -> !(NonEmpty SrcSpan) -> TcRnMessage
  - TcRnNonCanonicalDefinition :: !NonCanonicalDefinition -> !(LHsSigType GhcRn) -> TcRnMessage
  - TcRnImplicitImportOfPrelude :: TcRnMessage
  - TcRnMissingMain :: !Bool -> !Module -> !OccName -> TcRnMessage
  - TcRnGhciUnliftedBind :: !Id -> TcRnMessage
  - TcRnGhciMonadLookupFail :: String -> Maybe [GlobalRdrElt] -> TcRnMessage
  - TcRnMissingRoleAnnotation :: Name -> [Role] -> TcRnMessage
  - TcRnPatersonCondFailure :: PatersonCondFailure -> PatersonCondFailureContext -> Type -> Type -> TcRnMessage
  - TcRnImplicitRhsQuantification :: LocatedN RdrName -> TcRnMessage
  - TcRnIllformedTypePattern :: !(Pat GhcRn) -> TcRnMessage
  - TcRnIllegalTypePattern :: TcRnMessage
  - TcRnIllformedTypeArgument :: !(LHsExpr GhcRn) -> TcRnMessage
  - TcRnIllegalTypeExpr :: TcRnMessage
  - TcRnInvalidDefaultedTyVar :: ![Ct] -> [(TcTyVar, Type)] -> NonEmpty TcTyVar -> TcRnMessage
  - TcRnNamespacedWarningPragmaWithoutFlag :: WarnDecl GhcPs -> TcRnMessage
  - TcRnInvisPatWithNoForAll :: HsTyPat GhcRn -> TcRnMessage
  - TcRnIllegalInvisibleTypePattern :: HsTyPat GhcPs -> TcRnMessage
  - TcRnNamespacedFixitySigWithoutFlag :: FixitySig GhcPs -> TcRnMessage
  - TcRnDefaultedExceptionContext :: CtLoc -> TcRnMessage
  - TcRnOutOfArityTyVar :: Name -> Name -> TcRnMessage
  - TcRnMisplacedInvisPat :: HsTyPat GhcPs -> TcRnMessage
- data TcRnMessageOpts = TcRnMessageOpts {
  - tcOptsShowContext :: !Bool
  - tcOptsIfaceOpts :: !IfaceMessageOpts
  }
- mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage
- data TcRnMessageDetailed = TcRnMessageDetailed !ErrInfo !TcRnMessage
- data TypeDataForbids
  - = TypeDataForbidsDatatypeContexts
  - | TypeDataForbidsLabelledFields
  - | TypeDataForbidsStrictnessAnnotations
  - | TypeDataForbidsDerivingClauses
- data ErrInfo = ErrInfo {
  - errInfoContext :: !SDoc
  - errInfoSupplementary :: !SDoc
  }
- data FixedRuntimeRepProvenance
  - = FixedRuntimeRepDataConField
  - | FixedRuntimeRepPatSynSigArg
  - | FixedRuntimeRepPatSynSigRes
- pprFixedRuntimeRepProvenance :: FixedRuntimeRepProvenance -> SDoc
- data ShadowedNameProvenance
  - = ShadowedNameProvenanceLocal !SrcLoc
  - | ShadowedNameProvenanceGlobal [GlobalRdrElt]
- data RecordFieldPart
  - = RecordFieldDecl !Name
  - | RecordFieldConstructor !Name
  - | RecordFieldPattern !Name
  - | RecordFieldUpdate
- data IllegalNewtypeReason
  - = DoesNotHaveSingleField !Int
  - | IsNonLinear
  - | IsGADT
  - | HasConstructorContext
  - | HasExistentialTyVar
  - | HasStrictnessAnnotation
- data BadRecordUpdateReason
  - = NoConstructorHasAllFields {
    - conflictingFields :: [FieldLabelString]
    }
  - | MultiplePossibleParents (RecSelParent, RecSelParent, [RecSelParent])
  - | InvalidTyConParent TyCon (NonEmpty RecSelParent)
- data InjectivityErrReason
  - = InjErrRhsBareTyVar [Type]
  - | InjErrRhsCannotBeATypeFam
  - | InjErrRhsOverlap
  - | InjErrCannotInferFromRhs !TyVarSet !HasKinds !SuggestUndecidableInstances
- data HasKinds
  - = YesHasKinds
  - | NoHasKinds
- hasKinds :: Bool -> HasKinds
- data SuggestUndecidableInstances
  - = YesSuggestUndecidableInstaces
  - | NoSuggestUndecidableInstaces
- suggestUndecidableInstances :: Bool -> SuggestUndecidableInstances
- data SuggestUnliftedTypes
  - = SuggestUnliftedNewtypes
  - | SuggestUnliftedDatatypes
- data DataSort
  - = DataDeclSort NewOrData
  - | DataInstanceSort NewOrData
  - | DataFamilySort
- ppDataSort :: DataSort -> SDoc
- data AllowedDataResKind
  - = AnyTYPEKind
  - | AnyBoxedKind
  - | LiftedKind
- data NotClosedReason
  - = NotLetBoundReason
  - | NotTypeClosed VarSet
  - | NotClosed Name NotClosedReason
- data SuggestPartialTypeSignatures
  - = YesSuggestPartialTypeSignatures
  - | NoSuggestPartialTypeSignatures
- suggestPartialTypeSignatures :: Bool -> SuggestPartialTypeSignatures
- data DeriveInstanceErrReason
  - = DerivErrNotWellKinded !TyCon !Kind !Int
  - | DerivErrSafeHaskellGenericInst
  - | DerivErrDerivingViaWrongKind !Kind !Type !Kind
  - | DerivErrNoEtaReduce !Type
  - | DerivErrBootFileFound
  - | DerivErrDataConsNotAllInScope !TyCon
  - | DerivErrGNDUsedOnData
  - | DerivErrNullaryClasses
  - | DerivErrLastArgMustBeApp
  - | DerivErrNoFamilyInstance !TyCon [Type]
  - | DerivErrNotStockDeriveable !DeriveAnyClassEnabled
  - | DerivErrHasAssociatedDatatypes !HasAssociatedDataFamInsts !AssociatedTyLastVarInKind !AssociatedTyNotParamOverLastTyVar
  - | DerivErrNewtypeNonDeriveableClass
  - | DerivErrCannotEtaReduceEnough !Bool
  - | DerivErrOnlyAnyClassDeriveable !TyCon !DeriveAnyClassEnabled
  - | DerivErrNotDeriveable !DeriveAnyClassEnabled
  - | DerivErrNotAClass !PredType
  - | DerivErrNoConstructors !TyCon
  - | DerivErrLangExtRequired !Extension
  - | DerivErrDunnoHowToDeriveForType !Type
  - | DerivErrMustBeEnumType !TyCon
  - | DerivErrMustHaveExactlyOneConstructor !TyCon
  - | DerivErrMustHaveSomeParameters !TyCon
  - | DerivErrMustNotHaveClassContext !TyCon !ThetaType
  - | DerivErrBadConstructor !(Maybe HasWildcard) [DeriveInstanceBadConstructor]
  - | DerivErrGenerics [DeriveGenericsErrReason]
  - | DerivErrEnumOrProduct !DeriveInstanceErrReason !DeriveInstanceErrReason
- data UsingGeneralizedNewtypeDeriving
  - = YesGeneralizedNewtypeDeriving
  - | NoGeneralizedNewtypeDeriving
- usingGeneralizedNewtypeDeriving :: Bool -> UsingGeneralizedNewtypeDeriving
- data DeriveAnyClassEnabled
  - = YesDeriveAnyClassEnabled
  - | NoDeriveAnyClassEnabled
- deriveAnyClassEnabled :: Bool -> DeriveAnyClassEnabled
- data DeriveInstanceBadConstructor
  - = DerivErrBadConExistential !DataCon
  - | DerivErrBadConCovariant !DataCon
  - | DerivErrBadConFunTypes !DataCon
  - | DerivErrBadConWrongArg !DataCon
  - | DerivErrBadConIsGADT !DataCon
  - | DerivErrBadConHasExistentials !DataCon
  - | DerivErrBadConHasConstraints !DataCon
  - | DerivErrBadConHasHigherRankType !DataCon
- data HasWildcard
  - = YesHasWildcard
  - | NoHasWildcard
- hasWildcard :: Bool -> HasWildcard
- data BadAnonWildcardContext
  - = WildcardNotLastInConstraint
  - | ExtraConstraintWildcardNotAllowed SoleExtraConstraintWildcardAllowed
  - | WildcardsNotAllowedAtAll
- data SoleExtraConstraintWildcardAllowed
  - = SoleExtraConstraintWildcardNotAllowed
  - | SoleExtraConstraintWildcardAllowed
- data DeriveGenericsErrReason
  - = DerivErrGenericsMustNotHaveDatatypeContext !TyCon
  - | DerivErrGenericsMustNotHaveExoticArgs !DataCon
  - | DerivErrGenericsMustBeVanillaDataCon !DataCon
  - | DerivErrGenericsMustHaveSomeTypeParams !TyCon
  - | DerivErrGenericsMustNotHaveExistentials !DataCon
  - | DerivErrGenericsWrongArgKind !DataCon
- data HasAssociatedDataFamInsts
  - = YesHasAdfs
  - | NoHasAdfs
- hasAssociatedDataFamInsts :: Bool -> HasAssociatedDataFamInsts
- data AssociatedTyLastVarInKind
  - = YesAssocTyLastVarInKind !TyCon
  - | NoAssocTyLastVarInKind
- associatedTyLastVarInKind :: Maybe TyCon -> AssociatedTyLastVarInKind
- data AssociatedTyNotParamOverLastTyVar
  - = YesAssociatedTyNotParamOverLastTyVar !TyCon
  - | NoAssociatedTyNotParamOverLastTyVar
- associatedTyNotParamOverLastTyVar :: Maybe TyCon -> AssociatedTyNotParamOverLastTyVar
- data MissingSignature
  - = MissingTopLevelBindingSig Name Type
  - | MissingPatSynSig PatSyn
  - | MissingTyConKindSig TyCon Bool
- data Exported
  - = IsNotExported
  - | IsExported
- data HsDocContext
  - = TypeSigCtx SDoc
  - | StandaloneKindSigCtx SDoc
  - | PatCtx
  - | SpecInstSigCtx
  - | DefaultDeclCtx
  - | ForeignDeclCtx (LocatedN RdrName)
  - | DerivDeclCtx
  - | RuleCtx FastString
  - | TyDataCtx (LocatedN RdrName)
  - | TySynCtx (LocatedN RdrName)
  - | TyFamilyCtx (LocatedN RdrName)
  - | FamPatCtx (LocatedN RdrName)
  - | ConDeclCtx [LocatedN Name]
  - | ClassDeclCtx (LocatedN RdrName)
  - | ExprWithTySigCtx
  - | TypBrCtx
  - | HsTypeCtx
  - | HsTypePatCtx
  - | GHCiCtx
  - | SpliceTypeCtx (LHsType GhcPs)
  - | ClassInstanceCtx
  - | GenericCtx SDoc
- data FixedRuntimeRepErrorInfo = FRR_Info {
  - frr_info_origin :: FixedRuntimeRepOrigin
  - frr_info_not_concrete :: Maybe (TcTyVar, TcType)
  }
- data ErrorItem = EI {
  - ei_pred :: PredType
  - ei_evdest :: Maybe TcEvDest
  - ei_flavour :: CtFlavour
  - ei_loc :: CtLoc
  - ei_m_reason :: Maybe CtIrredReason
  - ei_suppress :: Bool
  }
- errorItemOrigin :: ErrorItem -> CtOrigin
- errorItemEqRel :: ErrorItem -> EqRel
- errorItemPred :: ErrorItem -> PredType
- errorItemCtLoc :: ErrorItem -> CtLoc
- data SolverReport = SolverReport {
  - sr_important_msg :: SolverReportWithCtxt
  - sr_supplementary :: [SolverReportSupplementary]
  }
- data SolverReportSupplementary
  - = SupplementaryBindings RelevantBindings
  - | SupplementaryHoleFits ValidHoleFits
  - | SupplementaryCts [(PredType, RealSrcSpan)]
- data SolverReportWithCtxt = SolverReportWithCtxt {
  - reportContext :: SolverReportErrCtxt
  - reportContent :: TcSolverReportMsg
  }
- data SolverReportErrCtxt = CEC {
  - cec_encl :: [Implication]
  - cec_tidy :: TidyEnv
  - cec_binds :: EvBindsVar
  - cec_defer_type_errors :: DiagnosticReason
  - cec_expr_holes :: DiagnosticReason
  - cec_type_holes :: DiagnosticReason
  - cec_out_of_scope_holes :: DiagnosticReason
  - cec_warn_redundant :: Bool
  - cec_expand_syns :: Bool
  - cec_suppress :: Bool
  }
- getUserGivens :: SolverReportErrCtxt -> [UserGiven]
- discardProvCtxtGivens :: CtOrigin -> [UserGiven] -> [UserGiven]
- data TcSolverReportMsg
  - = BadTelescope TyVarBndrs [TyCoVar]
  - | UserTypeError ErrorMsgType
  - | UnsatisfiableError ErrorMsgType
  - | ReportHoleError Hole HoleError
  - | CannotUnifyVariable {
    - mismatchMsg :: MismatchMsg
    - cannotUnifyReason :: CannotUnifyVariableReason
    }
  - | Mismatch {
    - mismatchMsg :: MismatchMsg
    - mismatchTyVarInfo :: Maybe TyVarInfo
    - mismatchAmbiguityInfo :: [AmbiguityInfo]
    - mismatchCoercibleInfo :: Maybe CoercibleMsg
    }
  - | FixedRuntimeRepError [FixedRuntimeRepErrorInfo]
  - | BlockedEquality ErrorItem
  - | ExpectingMoreArguments Int TypedThing
  - | UnboundImplicitParams (NonEmpty ErrorItem)
  - | AmbiguityPreventsSolvingCt ErrorItem ([TyVar], [TyVar])
  - | CannotResolveInstance {
    - cannotResolve_item :: ErrorItem
    - cannotResolve_unifiers :: [ClsInst]
    - cannotResolve_candidates :: [ClsInst]
    - cannotResolve_importErrors :: [ImportError]
    - cannotResolve_suggestions :: [GhcHint]
    - cannotResolve_relevant_bindings :: RelevantBindings
    }
  - | OverlappingInstances {
    - overlappingInstances_item :: ErrorItem
    - overlappingInstances_matches :: NonEmpty ClsInst
    - overlappingInstances_unifiers :: [ClsInst]
    }
  - | UnsafeOverlap {
    - unsafeOverlap_item :: ErrorItem
    - unsafeOverlap_match :: ClsInst
    - unsafeOverlapped :: NonEmpty ClsInst
    }
- data CannotUnifyVariableReason
  - = CannotUnifyWithPolytype ErrorItem TyVar Type (Maybe TyVarInfo)
  - | OccursCheck {
    - occursCheckInterestingTyVars :: [TyVar]
    - occursCheckAmbiguityInfos :: [AmbiguityInfo]
    }
  - | SkolemEscape ErrorItem Implication [TyVar]
  - | DifferentTyVars TyVarInfo
  - | RepresentationalEq TyVarInfo (Maybe CoercibleMsg)
- data MismatchMsg
  - = BasicMismatch {
    - mismatch_ea :: MismatchEA
    - mismatch_item :: ErrorItem
    - mismatch_ty1 :: Type
    - mismatch_ty2 :: Type
    - mismatch_whenMatching :: Maybe WhenMatching
    - mismatch_mb_same_occ :: Maybe SameOccInfo
    }
  - | KindMismatch {
    - kmismatch_what :: TypedThing
    - kmismatch_expected :: Type
    - kmismatch_actual :: Type
    }
  - | TypeEqMismatch {
    - teq_mismatch_ppr_explicit_kinds :: Bool
    - teq_mismatch_item :: ErrorItem
    - teq_mismatch_ty1 :: Type
    - teq_mismatch_ty2 :: Type
    - teq_mismatch_expected :: Type
    - teq_mismatch_actual :: Type
    - teq_mismatch_what :: Maybe TypedThing
    - teq_mb_same_occ :: Maybe SameOccInfo
    }
  - | CouldNotDeduce {
    - cnd_user_givens :: [Implication]
    - cnd_wanted :: NonEmpty ErrorItem
    - cnd_extra :: Maybe CND_Extra
    }
- data MismatchEA
  - = NoEA
  - | EA {
    - mismatch_mbEA :: Maybe ExpectedActualInfo
    }
- mkPlainMismatchMsg :: MismatchMsg -> TcSolverReportMsg
- mkBasicMismatchMsg :: MismatchEA -> ErrorItem -> Type -> Type -> MismatchMsg
- data WhenMatching = WhenMatching TcType TcType CtOrigin (Maybe TypeOrKind)
- data ExpectedActualInfo
  - = ExpectedActual {
    - ea_expected :: Type
    - ea_actual :: Type
    }
  - | ExpectedActualAfterTySynExpansion {
    - ea_expanded_expected :: Type
    - ea_expanded_actual :: Type
    }
- data TyVarInfo = TyVarInfo {
  - thisTyVar :: TyVar
  - thisTyVarIsUntouchable :: Maybe Implication
  - otherTy :: Maybe TyVar
  }
- data SameOccInfo = SameOcc {
  - sameOcc_same_pkg :: Bool
  - sameOcc_lhs :: Name
  - sameOcc_rhs :: Name
  }
- data AmbiguityInfo
  - = Ambiguity {
    - lead_with_ambig_msg :: Bool
    - ambig_tyvars :: ([TyVar], [TyVar])
    }
  - | NonInjectiveTyFam TyCon
- data CND_Extra = CND_Extra TypeOrKind Type Type
- data FitsMbSuppressed = Fits {
  - fits :: [HoleFit]
  - fitsSuppressed :: Bool
  }
- data ValidHoleFits = ValidHoleFits {
  - holeFits :: FitsMbSuppressed
  - refinementFits :: FitsMbSuppressed
  }
- noValidHoleFits :: ValidHoleFits
- data HoleFitDispConfig = HFDC {
  - showWrap :: Bool
  - showWrapVars :: Bool
  - showType :: Bool
  - showProv :: Bool
  - showMatches :: Bool
  }
- data RelevantBindings = RelevantBindings {
  - relevantBindingNamesAndTys :: [(Name, Type)]
  - ranOutOfFuel :: Bool
  }
- pprRelevantBindings :: RelevantBindings -> SDoc
- data PromotionErr
  - = TyConPE
  - | ClassPE
  - | FamDataConPE
  - | ConstrainedDataConPE ThetaType
  - | PatSynPE
  - | RecDataConPE
  - | TermVariablePE
  - | TypeVariablePE
- pprPECategory :: PromotionErr -> SDoc
- peCategory :: PromotionErr -> String
- data TermLevelUseErr
  - = TyConTE
  - | ClassTE
  - | TyVarTE
- teCategory :: TermLevelUseErr -> String
- data NotInScopeError
  - = NotInScope
  - | NotARecordField
  - | NoExactName Name
  - | SameName [GlobalRdrElt]
  - | MissingBinding SDoc [GhcHint]
  - | NoTopLevelBinding
  - | UnknownSubordinate SDoc
  - | NotInScopeTc (NameEnv TcTyThing)
- mkTcRnNotInScope :: RdrName -> NotInScopeError -> TcRnMessage
- data ImportError
  - = MissingModule ModuleName
  - | ModulesDoNotExport (NonEmpty Module) OccName
- data HoleError
  - = OutOfScopeHole [ImportError] [GhcHint]
  - | HoleError HoleSort [TcTyVar] [(SkolemInfoAnon, [TcTyVar])]
- data CoercibleMsg
  - = UnknownRoles Type
  - | TyConIsAbstract TyCon
  - | OutOfScopeNewtypeConstructor TyCon DataCon
- data PotentialInstances = PotentialInstances {
  - matches :: [ClsInst]
  - unifiers :: [ClsInst]
  }
- data UnsupportedCallConvention
  - = StdCallConvUnsupported
  - | PrimCallConvUnsupported
  - | JavaScriptCallConvUnsupported
- type ExpectedBackends = [Backend]
- data ArgOrResult
  - = Arg
  - | Result
- data MatchArgsContext
  - = EquationArgs !Name
  - | PatternArgs !HsMatchContextRn
- data MatchArgBadMatches where
  - MatchArgMatches :: forall body. {..} -> MatchArgBadMatches
- data PragmaWarningInfo
  - = PragmaWarningName {
    - pwarn_occname :: OccName
    - pwarn_impmod :: ModuleName
    - pwarn_declmod :: ModuleName
    }
  - | PragmaWarningExport {
    - pwarn_occname :: OccName
    - pwarn_impmod :: ModuleName
    }
  - | PragmaWarningInstance {
    - pwarn_dfunid :: DFunId
    - pwarn_ctorig :: CtOrigin
    }
- data EmptyStatementGroupErrReason
  - = EmptyStmtsGroupInParallelComp
  - | EmptyStmtsGroupInTransformListComp
  - | EmptyStmtsGroupInDoNotation HsDoFlavour
  - | EmptyStmtsGroupInArrowNotation
- data UnexpectedStatement where
  - UnexpectedStatement :: forall body. Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement
- data DeclSort
  - = ClassDeclSort
  - | InstanceDeclSort
- data NonStandardGuards where
  - NonStandardGuards :: forall body. (Outputable body, Anno (Stmt GhcRn body) ~ SrcSpanAnnA) => [LStmtLR GhcRn GhcRn body] -> NonStandardGuards
- data RuleLhsErrReason
  - = UnboundVariable RdrName NotInScopeError
  - | IllegalExpression
- data HsigShapeMismatchReason
  - = HsigShapeSortMismatch !AvailInfo !AvailInfo
  - | HsigShapeNotUnifiable !Name !Name !Bool
- data WrongThingSort
  - = WrongThingType
  - | WrongThingDataCon
  - | WrongThingPatSyn
  - | WrongThingConLike
  - | WrongThingClass
  - | WrongThingTyCon
  - | WrongThingAxiom
- data StageCheckReason
  - = StageCheckInstance !InstanceWhat !PredType
  - | StageCheckSplice !Name
- data UninferrableTyVarCtx
  - = UninfTyCtx_ClassContext [TcType]
  - | UninfTyCtx_DataContext [TcType]
  - | UninfTyCtx_ProvidedContext [TcType]
  - | UninfTyCtx_TyFamRhs TcType
  - | UninfTyCtx_TySynRhs TcType
  - | UninfTyCtx_Sig TcType (LHsSigType GhcRn)
- data PatSynInvalidRhsReason
  - = PatSynNotInvertible !(Pat GhcRn)
  - | PatSynUnboundVar !Name
- data BadFieldAnnotationReason where
  - LazyFieldsDisabled :: BadFieldAnnotationReason
  - UnpackWithoutStrictness :: BadFieldAnnotationReason
  - BackpackUnpackAbstractType :: BadFieldAnnotationReason
- data SuperclassCycle = MkSuperclassCycle {
  - cls :: Class
  - definite :: Bool
  - reasons :: [SuperclassCycleDetail]
  }
- data SuperclassCycleDetail
  - = SCD_HeadTyVar !PredType
  - | SCD_HeadTyFam !PredType
  - | SCD_Superclass !Class
- data RoleValidationFailedReason
  - = TyVarRoleMismatch !TyVar !Role
  - | TyVarMissingInEnv !TyVar
  - | BadCoercionRole !Coercion
- data DisabledClassExtension where
  - MultiParamDisabled :: !Int -> DisabledClassExtension
  - FunDepsDisabled :: DisabledClassExtension
  - ConstrainedClassMethodsDisabled :: !Id -> !TcPredType -> DisabledClassExtension
- data TyFamsDisabledReason
  - = TyFamsDisabledFamily !Name
  - | TyFamsDisabledInstance !TyCon
- data TypeApplication
  - = TypeApplication !(HsType GhcPs) !TypeOrKind
  - | TypeApplicationInPattern !(HsConPatTyArg GhcPs)
- data HsTypeOrSigType p
  - = HsType (HsType p)
  - | HsSigType (HsSigType p)
- data HsTyVarBndrExistentialFlag = OutputableBndrFlag flag 'Renamed => HsTyVarBndrExistentialFlag (HsTyVarBndr flag GhcRn)
- type TySynCycleTyCons = [Either TyCon (LTyClDecl GhcRn)]
- data BadImportKind
  - = BadImportNotExported [GhcHint]
  - | BadImportAvailTyCon Bool
  - | BadImportAvailDataCon OccName
  - | BadImportNotExportedSubordinates [OccName]
  - | BadImportAvailVar
- data DodgyImportsReason
  - = DodgyImportsEmptyParent !GlobalRdrElt
  - | DodgyImportsHiding !ImportLookupReason
- data ImportLookupReason where
  - ImportLookupBad :: BadImportKind -> ModIface -> ImpDeclSpec -> IE GhcPs -> Bool -> ImportLookupReason
  - ImportLookupQualified :: !RdrName -> ImportLookupReason
  - ImportLookupIllegal :: ImportLookupReason
  - ImportLookupAmbiguous :: !RdrName -> ![GlobalRdrElt] -> ImportLookupReason
- data UnusedImportReason where
  - UnusedImportNone :: UnusedImportReason
  - UnusedImportSome :: ![UnusedImportName] -> UnusedImportReason
- data UnusedImportName where
  - UnusedImportNameRecField :: !Parent -> !OccName -> UnusedImportName
  - UnusedImportNameRegular :: !Name -> UnusedImportName
- data NestedForallsContextsIn
  - = NFC_Specialize
  - | NFC_ViaType
  - | NFC_GadtConSig
  - | NFC_InstanceHead
  - | NFC_StandaloneDerivedInstanceHead
  - | NFC_DerivedClassType
- data UnusedNameProv
  - = UnusedNameTopDecl
  - | UnusedNameImported !ModuleName
  - | UnusedNameTypePattern
  - | UnusedNameMatch
  - | UnusedNameLocalBind
- data NonCanonicalDefinition
  - = NonCanonicalMonoid NonCanonical_Monoid
  - | NonCanonicalMonad NonCanonical_Monad
- data NonCanonical_Monoid
  - = NonCanonical_Sappend
  - | NonCanonical_Mappend
- data NonCanonical_Monad
  - = NonCanonical_Pure
  - | NonCanonical_ThenA
  - | NonCanonical_Return
  - | NonCanonical_ThenM
- data BadBootDecls
  - = BootBindsPs !(NonEmpty (LHsBindLR GhcRn GhcPs))
  - | BootBindsRn !(NonEmpty (LHsBindLR GhcRn GhcRn))
  - | BootInstanceSigs !(NonEmpty (LSig GhcRn))
  - | BootFamInst !TyCon
  - | BootSpliceDecls !(NonEmpty (LocatedA (HsUntypedSplice GhcPs)))
  - | BootForeignDecls !(NonEmpty (LForeignDecl GhcRn))
  - | BootDefaultDecls !(NonEmpty (LDefaultDecl GhcRn))
  - | BootRuleDecls !(NonEmpty (LRuleDecls GhcRn))
- data MissingBootThing
  - = MissingBootDefinition
  - | MissingBootExport
- missingBootThing :: HsBootOrSig -> Name -> MissingBootThing -> TcRnMessage
- data BootMismatch
  - = MissingBootThing !Name !MissingBootThing
  - | MissingBootInstance !DFunId
  - | BadReexportedBootThing !Name !Name
  - | BootMismatch !TyThing !TyThing !BootMismatchWhat
- data BootMismatchWhat
  - = BootMismatchedIdTypes !Id !Id
  - | BootMismatchedTyCons !TyCon !TyCon !(NonEmpty BootTyConMismatch)
- data BootTyConMismatch
  - = TyConKindMismatch
  - | TyConRoleMismatch !Bool
  - | TyConSynonymMismatch !Kind !Kind
  - | TyConFlavourMismatch !FamTyConFlav !FamTyConFlav
  - | TyConAxiomMismatch !(BootListMismatches CoAxBranch BootAxiomBranchMismatch)
  - | TyConInjectivityMismatch
  - | TyConMismatchedData !AlgTyConRhs !AlgTyConRhs !BootDataMismatch
  - | TyConMismatchedClasses !Class !Class !BootClassMismatch
  - | TyConsVeryDifferent
  - | SynAbstractData !SynAbstractDataError
- data BootAxiomBranchMismatch
  - = MismatchedAxiomBinders
  - | MismatchedAxiomLHS
  - | MismatchedAxiomRHS
- data BootClassMismatch
  - = MismatchedMethods !(BootListMismatches ClassOpItem BootMethodMismatch)
  - | MismatchedATs !(BootListMismatches ClassATItem BootATMismatch)
  - | MismatchedFunDeps
  - | MismatchedSuperclasses
  - | MismatchedMinimalPragmas
- data BootMethodMismatch
  - = MismatchedMethodNames
  - | MismatchedMethodTypes !Type !Type
  - | MismatchedDefaultMethods !Bool
- data BootATMismatch
  - = MismatchedTyConAT !BootTyConMismatch
  - | MismatchedATDefaultType
- data BootDataMismatch
  - = MismatchedNewtypeVsData
  - | MismatchedConstructors !(BootListMismatches DataCon BootDataConMismatch)
  - | MismatchedDatatypeContexts
- data BootDataConMismatch
  - = MismatchedDataConNames
  - | MismatchedDataConFixities
  - | MismatchedDataConBangs
  - | MismatchedDataConFieldLabels
  - | MismatchedDataConTypes
- data SynAbstractDataError
  - = SynAbsDataTySynNotNullary
  - | SynAbstractDataInvalidRHS !(NonEmpty Type)
- data BootListMismatch item err
  - = MismatchedLength
  - | MismatchedThing !Int !item !item !err
- type BootListMismatches item err = NonEmpty (BootListMismatch item err)
- data IllegalInstanceReason
  - = IllegalClassInstance !TypedThing !IllegalClassInstanceReason
  - | IllegalFamilyInstance !IllegalFamilyInstanceReason
  - | IllegalFamilyApplicationInInstance !Type !Bool !TyCon ![Type]
- data IllegalClassInstanceReason
  - = IllegalInstanceHead !IllegalInstanceHeadReason
  - | IllegalHasFieldInstance !IllegalHasFieldInstance
  - | IllegalSpecialClassInstance !Class !Bool
  - | IllegalInstanceFailsCoverageCondition !Class !CoverageProblem
- data IllegalInstanceHeadReason
  - = InstHeadAbstractClass !Class
  - | InstHeadNonClass !(Maybe TyCon)
  - | InstHeadTySynArgs
  - | InstHeadNonTyVarArgs
  - | InstHeadMultiParam
- data IllegalHasFieldInstance
  - = IllegalHasFieldInstanceNotATyCon
  - | IllegalHasFieldInstanceFamilyTyCon
  - | IllegalHasFieldInstanceTyConHasField !TyCon !FieldLabelString
  - | IllegalHasFieldInstanceTyConHasFields !TyCon !Type
- data CoverageProblem = CoverageProblem {
  - not_covered_fundep :: ([TyVar], [TyVar])
  - not_covered_fundep_inst :: ([Type], [Type])
  - not_covered_invis_vis_tvs :: Pair VarSet
  - not_covered_liberal :: FailedCoverageCondition
  }
- data FailedCoverageCondition
  - = FailedICC {
    - alsoFailedLICC :: !Bool
    }
  - | FailedLICC
- data IllegalFamilyInstanceReason
  - = NotAFamilyTyCon !TypeOrData !TyCon
  - | NotAnOpenFamilyTyCon !TyCon
  - | FamilyCategoryMismatch !TyCon
  - | FamilyArityMismatch !TyCon !Arity
  - | TyFamNameMismatch !Name !Name
  - | FamInstRHSOutOfScopeTyVars !(Maybe (TyCon, [Type], TyVarSet)) !(NonEmpty Name)
  - | FamInstLHSUnusedBoundTyVars !(NonEmpty InvalidFamInstQTv)
  - | InvalidAssoc !InvalidAssoc
- data InvalidFamInstQTv = InvalidFamInstQTv {
  - ifiqtv :: TcTyVar
  - ifiqtv_user_written :: Bool
  - ifiqtv_reason :: InvalidFamInstQTvReason
  }
- data InvalidFamInstQTvReason
  - = InvalidFamInstQTvDodgy
  - | InvalidFamInstQTvNotBoundInPats
  - | InvalidFamInstQTvNotUsedInRHS
- data InvalidAssoc
  - = InvalidAssocInstance !InvalidAssocInstance
  - | InvalidAssocDefault !InvalidAssocDefault
- data InvalidAssocInstance
  - = AssocInstanceMissing !Name
  - | AssocInstanceNotInAClass !TyCon
  - | AssocNotInThisClass !Class !TyCon
  - | AssocNoClassTyVar !Class !TyCon
  - | AssocTyVarsDontMatch !ForAllTyFlag !TyCon ![Type] ![Type]
- data InvalidAssocDefault
  - = AssocDefaultNotAssoc !Name !Name
  - | AssocMultipleDefaults !Name
  - | AssocDefaultBadArgs !TyCon ![Type] AssocDefaultBadArgs
- data AssocDefaultBadArgs
  - = AssocDefaultNonTyVarArg !(Type, ForAllTyFlag)
  - | AssocDefaultDuplicateTyVars !(NonEmpty (TyCoVar, ForAllTyFlag))
- data THError
  - = THSyntaxError !THSyntaxError
  - | THNameError !THNameError
  - | THReifyError !THReifyError
  - | TypedTHError !TypedTHError
  - | THSpliceFailed !SpliceFailReason
  - | AddTopDeclsError !AddTopDeclsError
  - | IllegalStaticFormInSplice !(HsExpr GhcPs)
  - | FailedToLookupThInstName !Type !LookupTHInstNameErrReason
  - | AddInvalidCorePlugin !String
  - | AddDocToNonLocalDefn !DocLoc
  - | ReportCustomQuasiError !Bool !String
- data THSyntaxError
  - = IllegalTHQuotes !(HsExpr GhcPs)
  - | IllegalTHSplice
  - | NestedTHBrackets
  - | MismatchedSpliceType SpliceType SpliceOrBracket
  - | BadImplicitSplice
- data THNameError
  - = NonExactName !RdrName
  - | QuotedNameWrongStage !(HsQuote GhcPs)
- data THReifyError
  - = CannotReifyInstance !Type
  - | CannotReifyOutOfScopeThing !Name
  - | CannotReifyThingNotInTypeEnv !Name
  - | NoRolesAssociatedWithThing !TcTyThing
  - | CannotRepresentType !UnrepresentableTypeDescr !Type
- data TypedTHError
  - = SplicePolymorphicLocalVar !Id
  - | TypedTHWithPolyType !TcType
- data SpliceFailReason
  - = SpliceThrewException !SplicePhase !SomeException !String !(LHsExpr GhcTc) !Bool
  - | RunSpliceFailure !RunSpliceFailReason
- data RunSpliceFailReason = ConversionFail !ThingBeingConverted !ConversionFailReason
- data AddTopDeclsError
  - = InvalidTopDecl !(HsDecl GhcPs)
  - | AddTopDeclsUnexpectedDeclarationSplice
  - | AddTopDeclsRunSpliceFailure !RunSpliceFailReason
- data ConversionFailReason
  - = IllegalOccName !NameSpace !String
  - | SumAltArityExceeded !SumAlt !SumArity
  - | IllegalSumAlt !SumAlt
  - | IllegalSumArity !SumArity
  - | MalformedType !TypeOrKind !Type
  - | IllegalLastStatement !HsDoFlavour !(LStmt GhcPs (LHsExpr GhcPs))
  - | KindSigsOnlyAllowedOnGADTs
  - | IllegalDeclaration !THDeclDescriptor !IllegalDecls
  - | CannotMixGADTConsWith98Cons
  - | EmptyStmtListInDoBlock
  - | NonVarInInfixExpr
  - | MultiWayIfWithoutAlts
  - | CasesExprWithoutAlts
  - | ImplicitParamsWithOtherBinds
  - | InvalidCCallImpent !String
  - | RecGadtNoCons
  - | GadtNoCons
  - | InvalidTypeInstanceHeader !Type
  - | InvalidTyFamInstLHS !Type
  - | InvalidImplicitParamBinding
  - | DefaultDataInstDecl ![LDataFamInstDecl GhcPs]
  - | FunBindLacksEquations !Name
- data UnrepresentableTypeDescr
  - = LinearInvisibleArgument
  - | CoercionsInTypes
- data LookupTHInstNameErrReason
  - = NoMatchesFound
  - | CouldNotDetermineInstance
- data SplicePhase
  - = SplicePhase_Run
  - | SplicePhase_CompileAndLink
- data THDeclDescriptor
  - = InstanceDecl
  - | WhereClause
  - | LetBinding
  - | LetExpression
  - | ClssDecl
- data ThingBeingConverted
  - = ConvDec !Dec
  - | ConvExp !Exp
  - | ConvPat !Pat
  - | ConvType !Type
- data IllegalDecls
  - = IllegalDecls !(NonEmpty (LHsDecl GhcPs))
  - | IllegalFamDecls !(NonEmpty (LFamilyDecl GhcPs))
- data ZonkerMessage where
  - ZonkerCannotDefaultConcrete :: !FixedRuntimeRepOrigin -> ZonkerMessage
- data IllegalForeignTypeReason
  - = TypeCannotBeMarshaled !Type TypeCannotBeMarshaledReason
  - | ForeignDynNotPtr !Type !Type
  - | SafeHaskellMustBeInIO
  - | IOResultExpected
  - | UnexpectedNestedForall
  - | LinearTypesNotAllowed
  - | OneArgExpected
  - | AtLeastOneArgExpected
- data TypeCannotBeMarshaledReason
  - = NotADataType
  - | NewtypeDataConNotInScope !TyCon ![Type]
  - | UnliftedFFITypesNeeded
  - | NotABoxedMarshalableTyCon
  - | ForeignLabelNotAPtr
  - | NotSimpleUnliftedType
  - | NotBoxedKindAny

# Main types

data TcRnMessage where #

An error which might arise during typechecking/renaming.

Constructors

TcRnUnknownMessage :: UnknownDiagnostic (DiagnosticOpts TcRnMessage) -> TcRnMessage | Simply wraps an unknown `Diagnostic` message `a`. It can be used by plugins to provide custom diagnostic messages originated during typechecking/renaming.
TcRnInterfaceError :: !IfaceMessage -> TcRnMessage | Wrap an `IfaceMessage` to a `TcRnMessage` for when we attempt to load interface files during typechecking but encounter an error.
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

- :: !UnitState

  The `UnitState` will allow us to pretty-print some diagnostics with more detail.

- -> !TcRnMessageDetailed
- -> TcRnMessage

TcRnWithHsDocContext :: !HsDocContext -> !TcRnMessage -> TcRnMessage | TcRnWithHsDocContext annotates an error message with the context in which it originated.
TcRnSolverReport :: SolverReportWithCtxt -> DiagnosticReason -> 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 `TcSolverReportMsg` datatype for an overview of the different errors.
TcRnSolverDepthError :: !Type -> !SubGoalDepth -> TcRnMessage | TcRnSolverDepthError is an error that occurs when the constraint solver exceeds the maximum recursion depth. Example: class C a where { meth :: a } instance Cls [a] => Cls a where { meth = head . meth } t :: () t = meth Test cases: T7788 T8550 T9554 T15316A T17267{∅,a,b,c,e} T17458 ContextStack1 T22924b TcCoercibleFail
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

- :: Implication

  The implication containing a contradiction.

- -> SolverReportWithCtxt

  The contradiction.

- -> TcRnMessage

TcRnInaccessibleCoAxBranch | TcRnInaccessibleCoAxBranch is a warning that is emitted when a closed type family has a branch which is inaccessible due to a more general, prior branch. Example: type family F a where F a = Int F Bool = Bool Test cases: T9085, T14066a, T9085, T6018, tc265,

Fields

- :: TyCon

  The type family's constructor

- -> CoAxBranch

  The inaccessible branch

- -> TcRnMessage

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}

TcRnUnusedQuantifiedTypeVar | TcRnUnusedQuantifiedTypeVar is a warning that occurs if there are unused quantified type variables. Examples: f :: forall a. Int -> Char Test cases: renameshould_compileExplicitForAllRules1 renameshould_compileT5331

Fields

- :: HsDocContext
- -> HsTyVarBndrExistentialFlag

  tyVar binder.

- -> TcRnMessage

TcRnDodgyImports :: !DodgyImportsReason -> TcRnMessage | TcRnDodgyImports is a group of warnings (controlled with -Wdodgy-imports). See `DodgyImportsReason` for the different warnings.

TcRnDodgyExports :: GlobalRdrElt -> TcRnMessage

TcRnDodgyExports is a warning (controlled by -Wdodgy-exports) that occurs when an export of the form 'T(..)' for a type constructor `T` does not actually export anything beside `T` itself.

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 renameshould_failT22478d typecheckshould_failTyAppPat_ScopedTyVarConflict

TcRnInvalidWarningCategory :: !WarningCategory -> TcRnMessage

TcRnInvalidWarningCategory is an error that occurs when a warning is declared with a category name that is not the special category "deprecations", and either does not begin with the prefix "x-" indicating a user-defined category, or contains characters not valid in category names. See Note [Warning categories] in GHC.Unit.Module.Warnings

Examples(s): module M {-# WARNING in "invalid" Oops #-} where

{-# WARNING in "x- spaces not allowed" foo Oops #-}

Test cases: warningsshould_failWarningCategoryInvalid

TcRnDuplicateWarningDecls :: !(LocatedN RdrName) -> !RdrName -> TcRnMessage | TcRnDuplicateWarningDecls is an error that occurs whenever a warning is declared twice. Examples(s): {-# DEPRECATED foo "Don't use me" #-} {-# DEPRECATED foo "Don't use me" #-} foo :: Int foo = 2 Test cases: renameshould_failrnfail058
TcRnSimplifierTooManyIterations | TcRnSimplifierTooManyIterations is an error that occurs whenever the constraint solver in the simplifier hits the iterations' limit. Examples(s): None. Test cases: None.

Fields

- :: Cts
- -> !IntWithInf

  The limit.

- -> WantedConstraints
- -> TcRnMessage

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

- :: Maybe Name

  the wildcard name, or `Nothing` for an anonymous wildcard

- -> !BadAnonWildcardContext
- -> TcRnMessage

TcRnIllegalNamedWildcardInTypeArgument :: RdrName -> TcRnMessage | TcRnIllegalNamedWildcardInTypeArgument is an error that occurs when a named wildcard is used in a required type argument. Example: vfun :: forall (a :: k) -> () x = vfun _nwc -- ^^^^ -- named wildcards not allowed in type arguments Test cases: T23738_fail_wild
TcRnIllegalImplicitTyVarInTypeArgument :: RdrName -> TcRnMessage |
TcRnDuplicateFieldName :: !RecordFieldPart -> NonEmpty RdrName -> TcRnMessage | TcRnDuplicateFieldName is an error that occurs whenever there are duplicate field names in a single record. Examples(s): data R = MkR { x :: Int, x :: Bool } f r = r { x = 3, x = 4 } Test cases: T21959.
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
TcRnNegativeNumTypeLiteral :: HsTyLit GhcPs -> TcRnMessage | TcRnNegativeNumTypeLiteral is an error that occurs whenever a type-level number literal is negative. type Neg = -1 Test cases: th/T8412 typecheckshould_failT8306
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: renameshould_failT9815.hs renameshould_failT9815b.hs renameshould_failT9815ghci.hs renameshould_failT9815bghci.hs
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

TcRnIllegalHsBootOrSigDecl :: !HsBootOrSig -> !BadBootDecls -> TcRnMessage

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

Examples:

- - A.hs-boot f :: Int -> Int f x = 2 * x -- binding not allowed
- - B.hs-boot type family F a where { F Int = Bool }
- - type family equations not allowed
- - C.hsig bar :: Int -> Int {-# RULES forall x. bar x = x #-} -- RULES not allowed

Test cases:

- bindings: T19781
- class instance body: none
- type family instance: HsBootFam
- splice: none
- foreign declaration: none
- default declaration: none
- RULEs: none

TcRnBootMismatch :: !HsBootOrSig -> !BootMismatch -> TcRnMessage

TcRnBootMismatch is a family of errors that occur when there is a mismatch between the hs-boot and hs files.

Examples:

- - A.hs-boot foo :: Int -> Bool data D = MkD
- - A.hs foo :: Int -> Char foo = chr

data D = MkD Int

Test cases:

- missing export: bkpcabal06, bkpfail{01,05,09,16,35}, rnfail{047,055}
- missing definition: none
- missing instance: T14075
- mismatch in exports: bkpfail{03,19}
- conflicting definitions: bkpcabal02, bkpfail{04,06,07,10,12,133,14,15,17,22,23,25,26,27,41,42,45,47,50,52,53,54}, T19244{a,b}, T23344, ClosedFam3, rnfail055

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

- :: Name

  first type variable

- -> Name

  second type variable

- -> Name

  function name

- -> LHsSigWcType GhcRn
- -> TcRnMessage

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

- :: Name

  user-written name of type variable being quantified

- -> Name

  function name

- -> Maybe Type

  type the variable unified with, if known

- -> LHsSigWcType GhcRn

  partial type signature

- -> TcRnMessage

TcRnMissingSignature :: MissingSignature -> Exported -> TcRnMessage

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 -Wmissing-poly-kind-signatures

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

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 :: TcIdSig -> 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
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

- :: UnboxedTupleOrSum

  whether this is an unboxed tuple or an unboxed sum

- -> !Type
- -> TcRnMessage

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
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

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

TcRnSimplifiableConstraint :: !PredType -> !InstanceWhat -> TcRnMessage

TcRnSimplifiableConstraint is a warning triggered by the occurrence of a simplifiable constraint in a context, when MonoLocalBinds is not enabled.

Examples(s): simplifiableEq :: Eq (a, a) => a -> a -> Bool simplifiableEq = undefined

Test cases: - indexed-typesshould_compileT15322 - partial-sigsshould_compileSomethingShowable - typecheckshould_compileT13526

TcRnArityMismatch

TcRnArityMismatch is an error that occurs when a type constructor is supplied with fewer arguments than required.

Examples(s): f Left = undefined

Test cases: - backpackshould_failbkpfail25.bkp - ghcishould_failT16013 - ghcishould_failT16287 - indexed-typesshould_failBadSock - indexed-typesshould_failT9433 - module/mod60 - ndexed-typesshould_failT2157 - parsershould_failParserNoBinaryLiterals2 - parsershould_failParserNoBinaryLiterals3 - patsynshould_failT12819 - polykinds/T10516 - typecheckshould_failT12124 - typecheckshould_failT15954 - typecheckshould_failT16874 - typecheckshould_failtcfail100 - typecheckshould_failtcfail101 - typecheckshould_failtcfail107 - typecheckshould_failtcfail129 - typecheckshould_failtcfail187

Fields

- :: !TyThing
- -> !Arity

  expected arity

- -> !Arity

  actual arity

- -> TcRnMessage

TcRnIllegalInstance :: IllegalInstanceReason -> TcRnMessage | TcRnIllegalClassInstance is a collection of diagnostics that arise from an invalid class or family instance declaration. See `IllegalInstanceReason`.

TcRnMonomorphicBindings :: [Name] -> TcRnMessage

TcRnMonomorphicBindings is a warning (controlled by -Wmonomorphism-restriction) that arises 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 :: Either ClsInst FamInst -> TcRnMessage

TcRnOrphanInstance is a warning (controlled by -Worphans) that arises when a typeclass instance or family instance is an "orphan", i.e. if it appears in a module in which neither the class/family 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 | TcRnFamInstNotInjective is a collection of errors that arise from a type family equation violating the injectivity annotation. See `InjectivityErrReason`.

Fields

- :: InjectivityErrReason

  the violation

- -> TyCon

  the family `TyCon`

- -> NonEmpty CoAxBranch

  the family equations

- -> 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 :: GlobalRdrElt -> 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 | 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

Fields

- :: Name

  parent

- -> TyThing
- -> Name

  child

- -> [Name]
- -> TcRnMessage

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

- :: OccName

  Occurrence name shared by both exports

- -> GlobalRdrElt

  First export

- -> IE GhcPs

  Export decl of first export

- -> GlobalRdrElt

  Second export

- -> IE GhcPs

  Export decl of second export

- -> TcRnMessage

TcRnDuplicateFieldExport :: (GlobalRdrElt, IE GhcPs) -> NonEmpty (GlobalRdrElt, IE GhcPs) -> TcRnMessage

TcRnDuplicateFieldExport is an error that occurs when a module exports multiple record fields with the same name, without enabling DuplicateRecordFields.

Example:

module M1 where data D1 = MkD1 { foo :: Int } module M2 where data D2 = MkD2 { foo :: Int } module M ( D1(..), D2(..) ) where import module M1 import module M2

Test case: overloadedrecfldsshould_failoverloadedrecfldsfail10

TcRnAmbiguousRecordUpdate

TcRnAmbiguousRecordUpdate is a warning, controlled by -Wambiguous-fields, which occurs when a user relies on the type-directed disambiguation mechanism to disambiguate a record update. 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

- :: HsExpr GhcRn

  Field update

- -> TyCon

  Record type

- -> TcRnMessage

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

TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage | TcRnMissingStrictFields is an error occurring when a record field marked as strict is omitted when constructing said record. Example(s): data R = R { strictField :: !Bool, nonStrict :: Int } x = R { nonStrict = 1 } Test cases: typecheckshould_failT18869 typecheckshould_failtcfail085 typecheckshould_failtcfail112

TcRnAmbiguousFieldInUpdate :: (GlobalRdrElt, GlobalRdrElt, [GlobalRdrElt]) -> TcRnMessage

TcRnAmbiguousFieldInUpdate is an error that occurs when a field in a record update clashes with another field or top-level function of the same name, and the user hasn't enabled -XDisambiguateRecordFields.

Example:

{-# LANGUAGE NoFieldSelectors #-} {-# LANGUAGE NoDisambiguateRecordFields #-} module M where

data A = MkA { fld :: Int }

fld :: Bool fld = False

f r = r { fld = 3 }

TcRnBadRecordUpdate

TcRnBadRecordUpdate is an error when a regular (non-overloaded) record update cannot be pinned down to any one parent.

The problem with the record update is stored in the `BadRecordUpdateReason` field.

Example(s):

data R1 = R1 { x :: Int } data R2 = R2 { x :: Int } update r = r { x = 1 } -- ambiguous

data R1 = R1 { x :: Int, y :: Int } data R2 = R2 { y :: Int, z :: Int } update r = r { x = 1, y = 2, z = 3 } -- no parent has all the fields

Test cases: overloadedrecfldsshould_failoverloadedrecfldsfail01 overloadedrecfldsshould_failoverloadedrecfldsfail01 overloadedrecfldsshould_failoverloadedrecfldsfail14

Fields

- :: [RdrName]

  the fields of the record update

- -> BadRecordUpdateReason

  the reason this record update was rejected

- -> TcRnMessage

TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage | TcRnStaticFormNotClosed is an error pertaining to terms that are marked static using the -XStaticPointers extension but which are not closed terms. Example(s): f x = static x Test cases: renameshould_failRnStaticPointersFail01 renameshould_failRnStaticPointersFail03
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

- :: !Class

  The typeclass we are trying to derive an instance for

- -> [Type]

  The typeclass arguments, if any.

- -> !(Maybe (DerivStrategy GhcTc))

  The derivation strategy, if any.

- -> !UsingGeneralizedNewtypeDeriving

  Is '-XGeneralizedNewtypeDeriving' enabled?

- -> !DeriveInstanceErrReason

  The specific reason why we couldn't derive an instance for the class.

- -> TcRnMessage

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.
TcRnCapturedTermName :: RdrName -> Either [GlobalRdrElt] Name -> TcRnMessage | TcRnCapturedTermName is a warning (controlled by -Wterm-variable-capture) that occurs when an implicitly quantified type variable's name is already used for a term. Example: a = 10 f :: a -> a Test cases: T22513a T22513b T22513c T22513d T22513e T22513f T22513g T22513h T22513i
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: warningsshould_compileT18862b
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

- :: NotInScopeError

  what the problem is

- -> RdrName

  the name that is not in scope

- -> [ImportError]

  import errors that are relevant

- -> [GhcHint]

  hints, e.g. enable DataKinds to refer to a promoted data constructor

- -> TcRnMessage

TcRnTermNameInType :: RdrName -> [GhcHint] -> TcRnMessage | TcRnTermNameInType is an error that occurs when a term-level identifier is used in a type. Example: import qualified Prelude bad :: Prelude.fst (Bool, Float) bad = False Test cases: T21605{c,d}
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

- :: SDoc

  what kind of thing this is (a binding, fixity declaration, ...)

- -> RdrName
- -> TcRnMessage

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: list2 = $( conE ''(:) `appE` litE (IntegerL 5) `appE` conE '[] ) -- ^^^^^ -- should use a single quotation tick, i.e. '(:) Test cases: 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 | TcRnForeignImportPrimExtNotSet is an error occurring when a foreign import is declared using the `prim` calling convention without having turned on the -XGHCForeignImportPrim extension. Example(s): foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #) Test cases: ffishould_failT20116
TcRnForeignImportPrimSafeAnn :: ForeignImport GhcRn -> TcRnMessage | TcRnForeignImportPrimSafeAnn is an error declaring that the safe/unsafe annotation should not be used with `prim` foreign imports. Example(s): foreign import prim unsafe "my_primop_cmm" :: ... Test cases: None
TcRnForeignFunctionImportAsValue :: ForeignImport GhcRn -> TcRnMessage | TcRnForeignFunctionImportAsValue is an error explaining that foreign `value` imports cannot have function types. Example(s): foreign import capi "math.h value sqrt" f :: CInt -> CInt Test cases: ffishould_failcapi_value_function
TcRnFunPtrImportWithoutAmpersand :: ForeignImport GhcRn -> TcRnMessage | TcRnFunPtrImportWithoutAmpersand is a warning controlled by `-Wdodgy-foreign-imports` that informs the user of a possible missing `&` in the declaration of a foreign import with a `FunPtr` return type. Example(s): foreign import ccall "f" f :: FunPtr (Int -> IO ()) Test cases: ffishould_compileT1357
TcRnIllegalForeignDeclBackend :: Either (ForeignExport GhcRn) (ForeignImport GhcRn) -> Backend -> ExpectedBackends -> TcRnMessage | TcRnIllegalForeignDeclBackend is an error occurring when a foreign import declaration is not compatible with the code generation backend being used. Example(s): None Test cases: None

TcRnUnsupportedCallConv :: Either (ForeignExport GhcRn) (ForeignImport GhcRn) -> UnsupportedCallConvention -> TcRnMessage

TcRnUnsupportedCallConv informs the user that the calling convention specified for a foreign export declaration is not compatible with the target platform. It is a warning controlled by `-Wunsupported-calling-conventions` in the case of `stdcall` but is otherwise considered an error.

Example(s): None

Test cases: None

TcRnIllegalForeignType :: !(Maybe ArgOrResult) -> !IllegalForeignTypeReason -> TcRnMessage

TcRnIllegalForeignType is an error for when a type appears in a foreign function signature that is not compatible with the FFI.

Example(s): None

Test cases: ffishould_failT3066 ffishould_failccfail004 ffishould_failT10461 ffishould_failT7506 ffishould_failT5664 safeHaskellghcip6 safeHaskellsafeLanguageSafeLang08 ffishould_failT16702 linearshould_failLinearFFI ffishould_failT7243

TcRnInvalidCIdentifier :: !CLabelString -> TcRnMessage | TcRnInvalidCIdentifier indicates a C identifier that is not valid. Example(s): foreign import prim safe "not valid" cmm_test2 :: Int# -> Int# Test cases: th/T10638
TcRnExpectedValueId :: !TcTyThing -> TcRnMessage | TcRnExpectedValueId is an error occurring when something that is not a value identifier is used where one is expected. Example(s): none Test cases: none
TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage | TcRnRecSelectorEscapedTyVar is an error indicating that a record field selector containing an existential type variable is used as a function rather than in a pattern match. Example(s): data Rec = forall a. Rec { field :: a } field (Rec True) Test cases: patsynshould_failrecords-exquant typecheckshould_failT3176
TcRnPatSynNotBidirectional :: !Name -> TcRnMessage | TcRnPatSynNotBidirectional is an error for when a non-bidirectional pattern synonym is used as a constructor. Example(s): pattern Five :: Int pattern Five <- 5 five = Five Test cases: patsynshould_failrecords-no-uni-update patsynshould_failrecords-no-uni-update2
TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage | TcRnIllegalDerivingItem is an error for when something other than a type class appears in a deriving statement. Example(s): data X = X deriving Int Test cases: derivingshould_failT5922
TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage | TcRnUnexpectedAnnotation indicates the erroroneous use of an annotation such as strictness, laziness, or unpacking. Example(s): data T = T { t :: Maybe {-# UNPACK #-} Int } data C = C { f :: !IntMap Int } Test cases: parsershould_failunpack_inside_type typecheckshould_failT7210 renameshould_failT22478b
TcRnIllegalRecordSyntax :: Either (HsType GhcPs) (HsType GhcRn) -> TcRnMessage | TcRnIllegalRecordSyntax is an error indicating an illegal use of record syntax. Example(s): data T = T Int { field :: Int } Test cases: renameshould_failT7943 renameshould_failT9077 renameshould_failT22478b

TcRnInvalidVisibleKindArgument

TcRnInvalidVisibleKindArgument is an error for a kind application on a target type that cannot accept it.

Example(s): bad :: Int `Type bad = 1 type Foo :: forall a {b}. a -> b -> b type Foo x y = y type Bar = Foo` Bool @Int True 42

Test cases: indexed-typesshould_failT16356_Fail3 typecheckshould_failExplicitSpecificity7 typecheckshould_failT12045b typecheckshould_failT12045c typecheckshould_failT15592a typecheckshould_failT15816

Fields

- :: !(LHsType GhcRn)

  The visible kind argument

- -> !Type

  Target of the kind application

- -> TcRnMessage

TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr (HsBndrVis GhcRn) GhcRn] -> TcRnMessage | TcRnTooManyBinders is an error for a type constructor that is declared with more arguments then its kind specifies. Example(s): type T :: Type -> (Type -> Type) -> Type data T a (b :: Type -> Type) x1 (x2 :: Type -> Type) Test cases: saksshould_failsaks_fail008
TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage | TcRnDifferentNamesForTyVar is an error that indicates different names being used for the same type variable. Example(s): data SameKind :: k -> k -> * data Q (a :: k1) (b :: k2) c = MkQ (SameKind a b) Test cases: polykinds/T11203 polykinds/T11821a saksshould_failT20916 typecheckshould_failT17566b typecheckshould_failT17566c
TcRnDisconnectedTyVar :: !Name -> TcRnMessage | TcRnDisconnectedTyVar is an error for a data declaration that has a kind signature, where the implicitly-bound type type variables can't be matched up unambiguously with the ones from the signature. See Note [Disconnected type variables] in GHC.Tc.Gen.HsType. Test cases: T24083

TcRnInvalidReturnKind

TcRnInvalidReturnKind is an error for a data declaration that has a kind signature with an invalid result kind.

Example(s): data family Foo :: Constraint

Test cases: typecheckshould_failT14048b typecheckshould_failUnliftedNewtypesConstraintFamily typecheckshould_failT12729 typecheckshould_failT15883 typecheckshould_failT16829a typecheckshould_failT16829b typecheckshould_failUnliftedNewtypesNotEnabled typecheckshould_failtcfail079

Fields

- :: !DataSort

  classification of thing being returned

- -> !AllowedDataResKind

  allowed kind

- -> !Kind

  the return kind

- -> !(Maybe SuggestUnliftedTypes)

  suggested extension

- -> TcRnMessage

TcRnUnexpectedKindVar :: RdrName -> TcRnMessage | TcRnUnexpectedKindVar is an error that occurs when the user tries to use kind variables without -XPolyKinds. Example: f :: forall k a. Proxy (a :: k) Test cases: polykinds/BadKindVar polykinds/T14710 saksshould_failT16722
TcRnIllegalKind | TcRnIllegalKind is used for a various illegal kinds errors including Example: type T :: forall k. Type -- without emabled -XPolyKinds Test cases: polykinds/T16762b

Fields

- :: HsTypeOrSigType GhcPs

  The illegal kind

- -> Bool

  Whether enabling -XPolyKinds should be suggested

- -> TcRnMessage

TcRnClassKindNotConstraint :: !Kind -> TcRnMessage | TcRnClassKindNotConstraint is an error for a type class that has a kind that is not equivalent to Constraint. Example(s): type C :: Type -> Type class C a Test cases: saksshould_failT16826

TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage

TcRnUnpromotableThing is an error that occurs when the user attempts to use the promoted version of something which is not promotable.

Example(s): data T :: T -> * data X a where MkX :: Show a => a -> X a foo :: Proxy ('MkX 'True) foo = Proxy

Test cases: dependentshould_failPromotedClass dependentshould_failT14845_fail1 dependentshould_failT14845_fail2 dependentshould_failT15215 dependentshould_failT13780c dependentshould_failT15245 polykinds/T5716 polykinds/T5716a polykinds/T6129 polykinds/T7433 patsynshould_failT11265 patsynshould_failT9161-1 patsynshould_failT9161-2 dependentshould_failSelfDep polykinds/PolyKinds06 polykinds/PolyKinds07 polykinds/T13625 polykinds/T15116 polykinds/T15116a saksshould_failT16727a saksshould_failT16727b renameshould_failT12686 renameshould_failT16635a renameshould_failT16635b renameshould_failT16635c

TcRnIllegalTermLevelUse :: !Name -> !TermLevelUseErr -> TcRnMessage

TcRnIllegalTermLevelUse is an error that occurs when the user attempts to use a type-level entity at the term-level.

Examples: f x = Int -- illegal use of a type constructor g (Proxy :: Proxy a) = a -- illegal use of a type variable

Note that the namespace cannot be used to determine if a name refers to a type-level entity:

{-# LANGUAGE RequiredTypeArguments #-} bad :: forall (a :: k) -> k bad t = t

The name `t` is assigned the `varName` namespace but stands for a type variable that cannot be used at the term level.

Test cases: T18740a, T18740b, T23739_fail_ret, T23739_fail_case

TcRnMatchesHaveDiffNumArgs | TcRnMatchesHaveDiffNumArgs is an error occurring when something has matches that have different numbers of arguments Example(s): foo x = True foo x y = False Test cases: renameshould_failrnfail045 typecheckshould_failT20768_fail

Fields

- :: !HsMatchContextRn

  Pattern match specifics

- -> !MatchArgBadMatches
- -> TcRnMessage

TcRnUnexpectedPatSigType :: HsPatSigType GhcPs -> TcRnMessage | TcRnUnexpectedPatSigType is an error occurring when there is a type signature in a pattern without -XScopedTypeVariables extension Examples: f (a :: Bool) = ... Test case: renameshould_failT11663
TcRnIllegalKindSignature :: HsType GhcPs -> TcRnMessage | TcRnIllegalKindSignature is an error occurring when there is a kind signature without -XKindSignatures extension Examples: data Foo (a :: Nat) = .... Test case: parsershould_failreadFail036

TcRnDataKindsError :: TypeOrKind -> Either (HsType GhcPs) Type -> TcRnMessage

TcRnDataKindsError is an error occurring when there is an illegal type or kind, probably required -XDataKinds and is used without the enabled extension.

This error can occur in both the renamer and the typechecker. The field of type ``Either` (`HsType` `GhcPs`) `Type`` reflects this: this field will contain a `Left` value if the error occurred in the renamer, and this field will contain a `Right` value if the error occurred in the typechecker.

Examples:

type Foo = [Nat, Char]

type Bar = [Int, String]

Test cases: linearshould_failT18888 parsershould_failreadFail001 polykinds/T7151 polykinds/T7433 renameshould_failT13568 renameshould_failT22478e th/TH_Promoted1Tuple typecheckshould_compiletcfail094 typecheckshould_compileT22141a typecheckshould_compileT22141b typecheckshould_compileT22141c typecheckshould_compileT22141d typecheckshould_compileT22141e typecheckshould_compileT22141f typecheckshould_compileT22141g typecheckshould_failT20873c typecheckshould_failT20873d

TcRnCannotBindScopedTyVarInPatSig :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage | TcRnCannotBindScopedTyVarInPatSig is an error stating that scoped type variables cannot be used in pattern bindings. Example(s): let (x :: a) = 5 Test cases: typecheckshould_compiletc141
TcRnCannotBindTyVarsInPatBind :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage | TcRnCannotBindTyVarsInPatBind is an error for when type variables are introduced in a pattern binding Example(s): Just @a x = Just True Test cases: typecheckshould_failTyAppPat_PatternBinding typecheckshould_failTyAppPat_PatternBindingExistential
TcRnTooManyTyArgsInConPattern | TcRnTooManyTyArgsInConPattern is an error occurring when a constructor pattern has more than the expected number of type arguments Example(s): f (Just `Int` Bool x) = x Test cases: typecheckshould_failTyAppPat_TooMany typecheckshould_failT20443b

Fields

- :: !ConLike
- -> !Int

  Expected number of args

- -> !Int

  Actual number of args

- -> TcRnMessage

TcRnMultipleInlinePragmas | TcRnMultipleInlinePragmas is a warning signifying that multiple inline pragmas reference the same definition. Example(s): {-# INLINE foo #-} {-# INLINE foo #-} foo :: Bool -> Bool foo = id Test cases: none

Fields

- :: !Id

  Target of the pragmas

- -> !(LocatedA InlinePragma)

  The first pragma

- -> !(NonEmpty (LocatedA InlinePragma))

  Other pragmas

- -> TcRnMessage

TcRnUnexpectedPragmas :: !Id -> !(NonEmpty (LSig GhcRn)) -> TcRnMessage | TcRnUnexpectedPragmas is a warning that occurs when unexpected pragmas appear in the source. Example(s): Test cases: none
TcRnNonOverloadedSpecialisePragma :: !(LIdP GhcRn) -> TcRnMessage | TcRnNonOverloadedSpecialisePragma is a warning for a specialise pragma being placed on a definition that is not overloaded. Example(s): {-# SPECIALISE foo :: Bool -> Bool #-} foo :: Bool -> Bool foo = id Test cases: simplCoreshould_compileT8537 typecheckshould_compileT10504
TcRnSpecialiseNotVisible :: !Name -> TcRnMessage | TcRnSpecialiseNotVisible is a warning that occurs when the subject of a SPECIALISE pragma has a definition that is not visible from the current module. Example(s): none Test cases: none
TcRnPragmaWarning | TcRnPragmaWarning is a warning that can happen when usage of something is warned or deprecated by pragma. Test cases: DeprU T5281 T5867 rn050 rn066 (here is a warning, not deprecation) T3303 ExportWarnings1 ExportWarnings2 ExportWarnings3 ExportWarnings4 ExportWarnings5 ExportWarnings6 InstanceWarnings

Fields

- :: { pragma_warning_info :: PragmaWarningInfo
- , pragma_warning_msg :: WarningTxt GhcRn
- } -> TcRnMessage

TcRnDifferentExportWarnings | TcRnDifferentExportWarnings is an error that occurs when the warning messages for exports of a name differ between several export items. Test case: DifferentExportWarnings

Fields

- :: !Name

  The name with different export warnings

- -> NonEmpty SrcSpan

  The locations of export list items that differ from the one at which the error is reported

- -> TcRnMessage

TcRnIncompleteExportWarnings | TcRnIncompleteExportWarnings is a warning (controlled by -Wincomplete-export-warnings) that occurs when some of the exports of a name do not have an export warning and some do Test case: ExportWarnings6

Fields

- :: !Name

  The name that is exported

- -> NonEmpty SrcSpan

  The locations of export list items that are missing the export warning

- -> TcRnMessage

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

- :: !Name

  `Name` of the class

- -> NonEmpty (LHsBind GhcRn)

  default methods

- -> TcRnMessage

TcRnHsigFixityMismatch | TcRnHsigFixityMismatch is an error indicating that the fixity decl in a Backpack signature file differs from the one in the source file for the same operator. Test cases: bkpfail37, bkpfail38

Fields

- :: !TyThing

  The operator whose fixity is defined

- -> !Fixity

  the fixity used in the source file

- -> !Fixity

  the fixity used in the signature

- -> TcRnMessage

TcRnHsigShapeMismatch :: !HsigShapeMismatchReason -> TcRnMessage | TcRnHsigShapeMismatch is a group of errors related to mismatches between backpack signatures.
TcRnHsigMissingModuleExport | TcRnHsigMissingModuleExport is an error indicating that a module doesn't export a name exported by its signature. Test cases: bkpfail01, bkpfail05, bkpfail09, bkpfail16, bkpfail35, bkpcabal06

Fields

- :: !OccName

  The missing name

- -> !UnitState

  The module's unit state

- -> !Module

  The implementation module

- -> TcRnMessage

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: typecheckshould_failMissingDefaultMethodBinding.hs

Fields

- :: !Name

  `Name` of the class

- -> !Name

  Problematic method

- -> TcRnMessage

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: warningsminimalWarnMinimal.hs:
TcRnIllegalQuasiQuotes :: TcRnMessage | TcRnIllegalQuasiQuotes is an error that occurs when a quasi-quote is used without the QuasiQuotes extension. Example: foo = [myQuoter|x y z|] Test cases: none; the parser fails to parse this if QuasiQuotes is off.
TcRnTHError :: THError -> TcRnMessage | TcRnTHError is a family of errors involving Template Haskell. See `THError`.
TcRnDefaultMethodForPragmaLacksBinding | TcRnDefaultMethodForPragmaLacksBinding is an error that occurs when a default method pragma is missing an accompanying binding. Test cases: typecheckshould_failT5084.hs typecheckshould_failT2354.hs

Fields

- :: Id

  method

- -> Sig GhcRn

  the pragma

- -> TcRnMessage

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: th/T12387

Fields

- :: { badMethodErrClassName :: !Name
- , badMethodErrMethodName :: !Name
- } -> TcRnMessage

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: gadt/T14719 indexed-typesshould_failT14033 indexed-typesshould_failT2334A linearshould_failLinearGADTNewtype parsershould_failreadFail008 polykinds/T11459 typecheckshould_failT15523 typecheckshould_failT15796 typecheckshould_failT17955 typecheckshould_failT18891a typecheckshould_failT21447 typecheckshould_failtcfail156

Fields

- :: DataCon
- -> Bool

  True if linear types enabled

- -> IllegalNewtypeReason
- -> TcRnMessage

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: type-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: type-datashould_failTDDeriving type-datashould_failTDRecordsGADT type-datashould_failTDRecordsH98 type-datashould_failTDStrictnessGADT type-datashould_failTDStrictnessH98

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: typecheckprog001typecheck.prog001 typecheckshould_compiletc126 typecheckshould_compileT7903 typecheckshould_compiletc116 typecheckshould_compiletc175 typecheckshould_compileHasKey typecheckshould_compiletc125 typecheckshould_compiletc078 typecheckshould_compiletc161 typecheckshould_failT5051 typecheckshould_compileT21583 backpackshould_compilebkp47 backpackshould_failbkpfail25 parsershould_compileT2245 parsershould_compileread014 indexed-typesshould_compileClass3 indexed-typesshould_compileSimple2 indexed-typesshould_failT7862 derivingshould_compilederiving-1935 derivingshould_compileT9968a derivingshould_compiledrv003 derivingshould_compileT4966 derivingshould_compileT14094 perfcompilerT15304 warningsminimalWarnMinimal simplCoreshould_compilesimpl020 deSugarshould_compileT14546d ghciscriptsT5820 ghciscriptsghci019

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: module/mod45
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
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 :: HsStmtContextRn -> 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 :: HsStmtContextRn -> 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
TcRnBindingOfExistingName :: RdrName -> TcRnMessage | TcRnBindingOfExistingName is an error triggered by an attempt to rebind built-in syntax, punned list or tuple syntax, or a name quoted via Template Haskell. Examples: data [] data (->) $(pure [ValD (VarP 'succ) (NormalB (ConE 'True)) []]) Test cases: renameshould_failT14907b renameshould_failT22839 renameshould_failrnfail042 th/T13968
TcRnMultipleFixityDecls :: SrcSpan -> RdrName -> TcRnMessage | TcRnMultipleFixityDecls is an error triggered by multiple fixity declarations for the same operator. Example(s): infixr 6 $$ infixl 4 $$ Test cases: renameshould_failRnMultipleFixityFail
TcRnIllegalPatternSynonymDecl :: TcRnMessage | TcRnIllegalPatternSynonymDecl is an error thrown when a user defines a pattern synonyms without enabling the PatternSynonyms extension. Example: pattern O :: Int pattern O = 0 Test cases: renameshould_failRnPatternSynonymFail

TcRnIllegalClassBinding :: DeclSort -> HsBindLR GhcPs GhcPs -> TcRnMessage

TcRnIllegalClassBinding is an error triggered by a binding in a class or instance declaration of an illegal form.

Examples:

class ZeroOne a where zero :: a one :: a instance ZeroOne Int where (zero,one) = (0,1)

class C a where pattern P = ()

Test cases: module/mod48 patsynshould_failT9705-1 patsynshould_failT9705-2 typecheckshould_failtcfail021

TcRnOrphanCompletePragma :: TcRnMessage | TcRnOrphanCompletePragma is an error triggered by a {-# COMPLETE #-} pragma which does not mention any data constructors or pattern synonyms defined in the current module. Test cases: patsynshould_failT13349
TcRnEmptyCase :: HsMatchContextRn -> TcRnMessage | TcRnEmptyCase is an error thrown when a user uses a case expression with an empty list of alternatives without enabling the EmptyCase extension. Example(s): case () of Test cases: renameshould_failRnEmptyCaseFail
TcRnNonStdGuards :: NonStandardGuards -> TcRnMessage | TcRnNonStdGuards is a warning thrown when a user uses non-standard guards (e.g. patterns in guards) without enabling the PatternGuards extension. More realistically: the user has explicitly disabled PatternGuards, as it is enabled by default with `-XHaskell2010`. Example(s): f | 5 <- 2 + 3 = ... Test cases: renameshould_compilern049

TcRnDuplicateSigDecl :: NonEmpty (LocatedN RdrName, Sig GhcPs) -> TcRnMessage

TcRnDuplicateSigDecl is an error triggered by two or more signatures for one entity.

Examples:

f :: Int -> Bool f :: Int -> Bool f _ = True

g x = x {-# INLINE g #-} {-# NOINLINE g #-}

pattern P = () {-# COMPLETE P #-} {-# COMPLETE P #-}

Test cases: module/mod68 parsershould_failOpaqueParseFail4 patsynshould_failT12165 renameshould_failrnfail048 renameshould_failT5589 renameshould_failT7338 renameshould_failT7338a

TcRnMisplacedSigDecl :: Sig GhcRn -> TcRnMessage | TcRnMisplacedSigDecl is an error triggered by the pragma application in the wrong context, like `MINIMAL` applied to a function or `SPECIALIZE` to an instance. Example: f x = x {-# MINIMAL f #-} Test cases: renameshould_failT18138 warningsminimalWarnMinimalFail1
TcRnUnexpectedDefaultSig :: Sig GhcPs -> TcRnMessage | TcRnUnexpectedDefaultSig is an error thrown when a user uses default signatures without enabling the DefaultSignatures extension. Example: class C a where m :: a default m :: Num a => a m = 0 Test cases: renameshould_failRnDefaultSigFail
TcRnDuplicateMinimalSig :: LSig GhcPs -> LSig GhcPs -> [LSig GhcPs] -> TcRnMessage | TcRnDuplicateMinimalSig is an error triggered by two or more minimal signatures for one type class. Example: class C where f :: () {-# MINIMAL f #-} {-# MINIMAL f #-} Test cases: renameshould_failRnMultipleMinimalPragmaFail

TcRnIllegalInvisTyVarBndr :: !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn) -> TcRnMessage

`TcRnIllegalInvisTyVarBndr` is an error that occurs when invisible type variable binders in type declarations are used without enabling the `TypeAbstractions` extension.

Example: {-# LANGUAGE NoTypeAbstractions #-} -- extension disabled data T `k (a :: k)` (j :: Type) (b :: j) ^^ ^^^^^^^^^^^^

Test case: T22560_fail_ext

TcRnInvalidInvisTyVarBndr :: !Name -> !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn) -> TcRnMessage | `TcRnInvalidInvisTyVarBndr` is an error that occurs when an invisible type variable binder has no corresponding `forall k.` quantifier in the standalone kind signature. Example: type P :: forall a -> Type data P @a = MkP Test cases: T22560_fail_a T22560_fail_b
TcRnInvisBndrWithoutSig :: !Name -> !(LHsTyVarBndr (HsBndrVis GhcRn) GhcRn) -> TcRnMessage | `TcRnInvisBndrWithoutSig` is an error triggered by attempting to use an invisible type variable binder in a type declaration without a standalone kind signature or a complete user-supplied kind. Example: data T @k (a :: k) -- No CUSK, no SAKS Test case: T22560_fail_d
TcRnDeprecatedInvisTyArgInConPat :: TcRnMessage | TcRnDeprecatedInvisTyArgInConPat is a warning that triggers on type applications in constructor patterns when the user has not enabled '-XTypeAbstractions' but instead has enabled both '-XScopedTypeVariables' and '-XTypeApplications'. This warning is a deprecation mechanism that is scheduled until GHC 9.12.
TcRnUnexpectedStandaloneDerivingDecl :: TcRnMessage | TcRnUnexpectedStandaloneDerivingDecl is an error thrown when a user uses standalone deriving without enabling the StandaloneDeriving extension. Example: deriving instance Eq Foo Test cases: renameshould_failRnUnexpectedStandaloneDeriving
TcRnUnusedVariableInRuleDecl :: FastString -> Name -> TcRnMessage | TcRnUnusedVariableInRuleDecl is an error triggered by forall'd variable in rewrite rule that does not appear on left-hand side Example: {-# RULES "rule" forall a. id = id #-} Test cases: renameshould_failExplicitForAllRules2
TcRnUnexpectedStandaloneKindSig :: TcRnMessage | TcRnUnexpectedStandaloneKindSig is an error thrown when a user uses standalone kind signature without enabling the StandaloneKindSignatures extension. Example: type D :: Type data D = D Test cases: saksshould_failsaks_fail001
TcRnIllegalRuleLhs :: RuleLhsErrReason -> FastString -> LHsExpr GhcRn -> HsExpr GhcRn -> TcRnMessage | TcRnIllegalRuleLhs is an error triggered by malformed left-hand side of rewrite rule Examples: {-# RULES "test" forall x. f x = x #-} {-# RULES "test" forall x. case x of = x #-} Test cases: renameshould_failT15659
TcRnDuplicateRoleAnnot :: NonEmpty (LRoleAnnotDecl GhcPs) -> TcRnMessage | TcRnDuplicateRoleAnnot is an error triggered by two or more role annotations for one type Example: data D a type role D phantom type role D phantom Test cases: rolesshould_failRoles8
TcRnDuplicateKindSig :: NonEmpty (LStandaloneKindSig GhcPs) -> TcRnMessage | TcRnDuplicateKindSig is an error triggered by two or more standalone kind signatures for one type Example: type D :: Type type D :: Type data D Test cases: saksshould_failsaks_fail002

TcRnIllegalDerivStrategy :: DerivStrategy GhcPs -> TcRnMessage

TcRnIllegalDerivStrategy is an error thrown when a user uses deriving strategy without enabling the DerivingStrategies extension or uses deriving via without enabling the DerivingVia extension.

Examples:

data T = T deriving stock Eq

data T = T deriving via Eq T

Test cases: derivingshould_failderiving-via-fail3 derivingshould_failT10598_fail4

TcRnIllegalMultipleDerivClauses :: TcRnMessage | TcRnIllegalMultipleDerivClauses is an error thrown when a user uses two or more deriving clauses without enabling the DerivingStrategies extension. Example: data T = T deriving Eq deriving Ord Test cases: derivingshould_failT10598_fail5
TcRnNoDerivStratSpecified :: Bool -> TcRnMessage | TcRnNoDerivStratSpecified is a warning implied by -Wmissing-deriving-strategies and triggered by deriving clause without specified deriving strategy. Example: data T = T deriving Eq Test cases: renameshould_compileT15798a renameshould_compileT15798b renameshould_compileT15798c
TcRnStupidThetaInGadt :: HsDocContext -> TcRnMessage | TcRnStupidThetaInGadt is an error triggered by data contexts in GADT-style data declaration Example: data (Eq a) => D a where MkD :: D Int Test cases: renameshould_failRnStupidThetaInGadt
TcRnShadowedTyVarNameInFamResult :: IdP GhcPs -> TcRnMessage | TcRnShadowedTyVarNameInFamResult is an error triggered by type variable in type family result that shadows type variable from left hand side Example: type family F a b c = b Test cases: ghciscriptsT6018ghcirnfail renameshould_failT6018rnfail

TcRnIncorrectTyVarOnLhsOfInjCond :: IdP GhcRn -> LIdP GhcPs -> TcRnMessage

TcRnIncorrectTyVarOnRhsOfInjCond is an error caused by a situation where the left-hand side of an injectivity condition of a type family is not a variable referring to the type family result. See Note [Renaming injectivity annotation] for more details.

Example:

type family F a = r | a -> a

Test cases: ghciscriptsT6018ghcirnfail renameshould_failT6018rnfail

TcRnUnknownTyVarsOnRhsOfInjCond :: [Name] -> TcRnMessage | TcRnUnknownTyVarsOnRhsOfInjCond is an error triggered by out-of-scope type variables on the right-hand side of a of an injectivity condition of a type family Example: type family F a = res | res -> b Test cases: ghciscriptsT6018ghcirnfail renameshould_failT6018rnfail
TcRnLookupInstance :: !Class -> ![Type] -> !LookupInstanceErrReason -> TcRnMessage | TcRnLookupInstance groups several errors emitted when looking up class instances. Test cases: none
TcRnBadlyStaged | TcRnBadlyStaged is an error that occurs when a TH binding is used in an invalid stage. Test cases: T17820d

Fields

- :: !StageCheckReason

  The binding being spliced.

- -> !Int

  The binding stage.

- -> !Int

  The stage at which the binding is used.

- -> TcRnMessage

TcRnStageRestriction | TcRnStageRestriction is an error that occurs when a top level splice refers to a local name. Test cases: T17820, T21547, T5795, qq00[1-4], annfail0{3,4,6,9}

Fields

- :: !StageCheckReason

  The binding being spliced.

- -> TcRnMessage

TcRnBadlyStagedType | TcRnBadlyStagedWarn is a warning that occurs when a TH type binding is used in an invalid stage. Controlled by flags: - Wbadly-staged-type Test cases: T23829_timely T23829_tardy T23829_hasty

Fields

- :: !Name

  The type binding being spliced.

- -> !Int

  The binding stage.

- -> !Int

  The stage at which the binding is used.

- -> TcRnMessage

TcRnTyThingUsedWrong | TcRnTyThingUsedWrong is an error that occurs when a thing is used where another thing was expected. Test cases: none

Fields

- :: !WrongThingSort

  Expected thing.

- -> !TcTyThing

  Thing used wrongly.

- -> !Name

  Name of the thing used wrongly.

- -> TcRnMessage

TcRnCannotDefaultKindVar | TcRnCannotDefaultKindVar is an error that occurs when attempting to use unconstrained kind variables whose type isn't `Type`, without -XPolyKinds. Test cases: T11334b

Fields

- :: !TyVar

  The unconstrained variable.

- -> !Kind

  Kind of the variable.

- -> TcRnMessage

TcRnUninferrableTyVar | TcRnUninferrableTyVar is an error that occurs when metavariables in a type could not be defaulted. Test cases: T17301, T17562, T17567, T17567StupidTheta, T15474, T21479

Fields

- :: ![TyCoVar]

  The variables that could not be defaulted.

- -> !UninferrableTyVarCtx

  Description of the surrounding context.

- -> TcRnMessage

TcRnSkolemEscape | TcRnSkolemEscape is an error that occurs when type variables from an outer scope is used in a context where they should be locally scoped. Test cases: T15076, T15076b, T14880-2, T15825, T14880, T15807, T16946, T14350, T14040A, T15795, T15795a, T14552

Fields

- :: ![TcTyVar]

  The variables that would escape.

- -> !TcTyVar

  The variable that is being quantified.

- -> !Type

  The type in which they occur.

- -> TcRnMessage

TcRnPatSynEscapedCoercion | TcRnPatSynEscapedCoercion is an error indicating that a coercion escaped from a pattern synonym into a type. See Note [Coercions that escape] in GHC.Tc.TyCl.PatSyn Test cases: T14507

Fields

- :: !Id

  The pattern-bound variable

- -> !(NonEmpty CoVar)

  The escaped coercions

- -> TcRnMessage

TcRnPatSynExistentialInResult | TcRnPatSynExistentialInResult is an error indicating that the result type of a pattern synonym mentions an existential type variable. Test cases: PatSynExistential

Fields

- :: !Name

  The name of the pattern synonym

- -> !TcSigmaType

  The result type

- -> ![TyVar]

  The escaped existential variables

- -> TcRnMessage

TcRnPatSynArityMismatch | TcRnPatSynArityMismatch is an error indicating that the number of arguments in a pattern synonym's equation differs from the number of parameters in its signature. Test cases: PatSynArity

Fields

- :: !Name

  The name of the pattern synonym

- -> !Arity

  The number of equation arguments

- -> !Arity

  The difference

- -> TcRnMessage

TcRnPatSynInvalidRhs | TcRnPatSynInvalidRhs is an error group indicating that the pattern on the right hand side of a pattern synonym is invalid. Test cases: unidir, T14112

Fields

- :: !Name

  The name of the pattern synonym

- -> !(LPat GhcRn)

  The pattern

- -> ![LIdP GhcRn]

  The LHS args

- -> !PatSynInvalidRhsReason

  The number of equation arguments

- -> TcRnMessage

TcRnZonkerMessage :: ZonkerMessage -> TcRnMessage | TcRnZonkerMessage is collection of errors that occur when zonking, i.e. filling in metavariables with their final values. See `ZonkerMessage`
TcRnTyFamDepsDisabled :: TcRnMessage | TcRnTyFamDepsDisabled is an error indicating that a type family injectivity annotation was used without enabling the extension TypeFamilyDependencies. Test cases: T11381
TcRnAbstractClosedTyFamDecl :: TcRnMessage | TcRnAbstractClosedTyFamDecl is an error indicating that an abstract closed type family was declared in a regular source file, while it is only allowed in hs-boot files. Test cases: ClosedFam4
TcRnPartialFieldSelector | TcRnPartialFieldSelector is a warning indicating that a record selector was not defined for all constructors of a data type. Test cases: DRFPartialFields, T7169

Fields

- :: !FieldLabel

  The selector

- -> TcRnMessage

TcRnHasFieldResolvedIncomplete :: !Name -> TcRnMessage

TcRnHasFieldResolvedIncomplete is a warning triggered when a HasField constraint is resolved for a record field for which a `getField @"field"` application might not be successful. Currently, this means that the warning is triggered when the parent data type of that record field does not have that field in all its constructors.

Example(s): data T = T1 | T2 {x :: Bool} f :: HasField t "x" Bool => t -> Bool f = getField @"x" g :: T -> Bool g = f

Test cases: TcIncompleteRecSel

TcRnBadFieldAnnotation | TcRnBadFieldAnnotation is an error/warning group indicating that a strictness/unpack related data type field annotation is invalid.

Fields

- :: !Int

  The index of the field

- -> !DataCon

  The constructor in which the field is defined

- -> !BadFieldAnnotationReason

  The error specifics

- -> TcRnMessage

TcRnSuperclassCycle | TcRnSuperclassCycle is an error indicating that a class has a superclass cycle. Test cases: mod40, tcfail027, tcfail213, tcfail216, tcfail217, T9415, T9739

Fields

- :: !SuperclassCycle

  The details of the cycle

- -> TcRnMessage

TcRnDefaultSigMismatch | TcRnDefaultSigMismatch is an error indicating that a default method signature doesn't match the regular method signature. Test cases: T7437, T12918a, T12918b, T12151

Fields

- :: !Id

  The name of the method

- -> !Type

  The type of the default signature

- -> TcRnMessage

TcRnTyFamsDisabled | TcRnTyFamsDisabled is an error indicating that a type family or instance was declared while the extension TypeFamilies was disabled. Test cases: TyFamsDisabled

Fields

- :: !TyFamsDisabledReason

  The name of the family or instance

- -> TcRnMessage

TcRnBadTyConTelescope :: !TyCon -> TcRnMessage | TcRnBadTyConTelescope is an error caused by an ill-scoped `TyCon` kind, due to type variables being out of dependency order. Example: class C a (b :: Proxy a) (c :: Proxy b) where type T c a Test cases: BadTelescope{∅,3,4} T14066{f,g} T14887 T15591{b,c} T15743{c,d} T15764 T23252
TcRnTyFamResultDisabled | TcRnTyFamResultDisabled is an error indicating that a result variable was used on a type family while the extension TypeFamilyDependencies was disabled. Test cases: T13571, T13571a

Fields

- :: !Name

  The name of the type family

- -> !(LHsTyVarBndr () GhcRn)

  Name of the result variable

- -> TcRnMessage

TcRnRoleValidationFailed | TcRnRoleValidationFailed is an error indicating that a variable was assigned an invalid role by the inference algorithm. This is only performed with -dcore-lint.

Fields

- :: !Role

  The validated role

- -> !RoleValidationFailedReason

  The failure reason

- -> TcRnMessage

TcRnCommonFieldResultTypeMismatch | TcRnCommonFieldResultTypeMismatch is an error indicating that a sum type declares the same field name in multiple constructors, but the constructors' result types differ. Test cases: CommonFieldResultTypeMismatch

Fields

- :: !DataCon

  First constructor

- -> !DataCon

  Second constructor

- -> !FieldLabelString

  Field name

- -> TcRnMessage

TcRnCommonFieldTypeMismatch | TcRnCommonFieldTypeMismatch is an error indicating that a sum type declares the same field name in multiple constructors, but their types differ. Test cases: CommonFieldTypeMismatch

Fields

- :: !DataCon

  First constructor

- -> !DataCon

  Second constructor

- -> !FieldLabelString

  Field name

- -> TcRnMessage

TcRnClassExtensionDisabled | TcRnClassExtensionDisabled is an error indicating that a class was declared with an extension feature while the extension was disabled.

Fields

- :: !Class

  The class

- -> !DisabledClassExtension

  The extension

- -> TcRnMessage

TcRnDataConParentTypeMismatch | TcRnDataConParentTypeMismatch is an error indicating that a data constructor was declared with a type that doesn't match its type constructor (i.e. a GADT result type and its data name). Test cases: T7175, T13300, T14719, T18357, T18357b, gadt11, tcfail155, tcfail176

Fields

- :: !DataCon

  The data constructor

- -> !Type

  The parent type

- -> TcRnMessage

TcRnGADTsDisabled | TcRnGADTsDisabled is an error indicating that a GADT was declared while the extension GADTs was disabled. Test cases: ghci057, T9293

Fields

- :: !Name

  The name of the GADT

- -> TcRnMessage

TcRnExistentialQuantificationDisabled | TcRnExistentialQuantificationDisabled is an error indicating that a data constructor was declared with existential features while the extension ExistentialQuantification was disabled. Test cases: ghci057, T9293, gadtSyntaxFail001, gadtSyntaxFail002, gadtSyntaxFail003, prog006, rnfail053, T12083a

Fields

- :: !DataCon

  The constructor

- -> TcRnMessage

TcRnGADTDataContext | TcRnGADTDataContext is an error indicating that a GADT was declared with a data type context. This error is emitted in the tc, but it is also caught in the renamer.

Fields

- :: !Name

  The data type name

- -> TcRnMessage

TcRnMultipleConForNewtype | TcRnMultipleConForNewtype is an error indicating that a newtype was declared with multiple constructors. This error is caught by the parser.

Fields

- :: !Name

  The newtype name

- -> !Int

  The number of constructors

- -> TcRnMessage

TcRnKindSignaturesDisabled | TcRnKindSignaturesDisabled is an error indicating that a kind signature was used in a data type declaration while the extension KindSignatures was disabled. Test cases: T20873c, readFail036

Fields

- :: !(Either (HsType GhcPs) (Name, HsType GhcRn))

  The data type name

- -> TcRnMessage

TcRnEmptyDataDeclsDisabled | TcRnEmptyDataDeclsDisabled is an error indicating that a data type was declared with no constructors while the extension EmptyDataDecls was disabled. Test cases: readFail035

Fields

- :: !Name

  The data type name

- -> TcRnMessage

TcRnRoleMismatch | TcRnRoleMismatch is an error indicating that the role specified in an annotation differs from its inferred role. Test cases: T7253, Roles11

Fields

- :: !Name

  The type variable

- -> !Role

  The annotated role

- -> !Role

  The inferred role

- -> TcRnMessage

TcRnRoleCountMismatch | TcRnRoleCountMismatch is an error indicating that the number of roles in an annotation doesn't match the number of type parameters. Test cases: Roles6

Fields

- :: !Int

  The number of type variables

- -> !(LRoleAnnotDecl GhcRn)

  The role annotation

- -> TcRnMessage

TcRnIllegalRoleAnnotation | TcRnIllegalRoleAnnotation is an error indicating that a role annotation was attached to a decl that doesn't allow it. Test cases: Roles5

Fields

- :: !(RoleAnnotDecl GhcRn)

  The role annotation

- -> TcRnMessage

TcRnRoleAnnotationsDisabled | TcRnRoleAnnotationsDisabled is an error indicating that a role annotation was declared while the extension RoleAnnotations was disabled. Test cases: Roles5, TH_Roles1

Fields

- :: !TyCon

  The annotated type

- -> TcRnMessage

TcRnIncoherentRoles | TcRnIncoherentRoles is an error indicating that a role annotation for a class parameter was declared as not nominal. Test cases: T8773

Fields

- :: !TyCon

  The class tycon

- -> TcRnMessage

TcRnPrecedenceParsingError | TcRnPrecedenceParsingError is an error caused by attempting to use operators with the same precedence in one infix expression. Example: eq :: (a ~ b ~ c) :~: () Test cases: module/mod61 parsershould_failreadFail016 renameshould_failrnfail017 renameshould_failT9077 typecheckshould_failT18252a

Fields

- :: (OpName, Fixity)

  first operator's name and fixity

- -> (OpName, Fixity)

  second operator's name and fixity

- -> TcRnMessage

TcRnSectionPrecedenceError | TcRnPrecedenceParsingError is an error caused by attempting to use an operator with higher precedence than the operand. Example: k = (-3 **) where (**) = const infixl 7 ** Test cases: overloadedrecfldsshould_failT13132_duplicaterecflds parsershould_failreadFail023 renameshould_failrnfail019 th/TH_unresolvedInfix2

Fields

- :: (OpName, Fixity)

  first operator's name and fixity

- -> (OpName, Fixity)

  argument operator

- -> HsExpr GhcPs

  Section

- -> TcRnMessage

TcRnTypeSynonymCycle | TcRnTypeSynonymCycle is an error indicating that a cycle between type synonyms has occurred. Test cases: mod27, ghc-e-fail2, bkpfail29

Fields

- :: !TySynCycleTyCons

  The tycons involved in the cycle

- -> TcRnMessage

TcRnSelfImport | TcRnSelfImport is an error indicating that a module contains an import of itself. Test cases: T9032

Fields

- :: !ModuleName

  The module

- -> TcRnMessage

TcRnNoExplicitImportList | TcRnNoExplicitImportList is a warning indicating that an import statement did not include an explicit import list. Test cases: T1789, T4489

Fields

- :: !ModuleName

  The imported module

- -> TcRnMessage

TcRnSafeImportsDisabled | TcRnSafeImportsDisabled is an error indicating that an import was declared using the `safe` keyword while SafeHaskell wasn't active. Test cases: Mixed01

Fields

- :: !ModuleName

  The imported module

- -> TcRnMessage

TcRnDeprecatedModule | TcRnDeprecatedModule is a warning indicating that an imported module is annotated with a warning or deprecation pragma. Test cases: DeprU

Fields

- :: !ModuleName

  The imported module

- -> !(WarningTxt GhcRn)

  The pragma data

- -> TcRnMessage

TcRnCompatUnqualifiedImport | TcRnCompatUnqualifiedImport is a warning indicating that a special module (right now only Data.List) was imported unqualified without import list, for compatibility reasons. Test cases: T17244A

Fields

- :: !(ImportDecl GhcPs)

  The import

- -> TcRnMessage

TcRnRedundantSourceImport | TcRnRedundantSourceImport is a warning indicating that a {-# SOURCE #-} import was used when there is no import cycle. Test cases: none

Fields

- :: !ModuleName

  The imported module

- -> TcRnMessage

TcRnImportLookup | TcRnImportLookup is a group of errors about bad imported names.

Fields

- :: !ImportLookupReason

  Details about the error

- -> TcRnMessage

TcRnUnusedImport | TcRnUnusedImport is a group of errors about unused imports.

Fields

- :: !(ImportDecl GhcRn)

  The import

- -> !UnusedImportReason

  Details about the error

- -> TcRnMessage

TcRnDuplicateDecls

TcRnDuplicateDecls is an error indicating that the same name was used for multiple declarations.

Test cases: FieldSelectors, overloadedrecfldsfail03, T17965, NFSDuplicate, T9975a, TDMultiple01, mod19, mod38, mod21, mod66, mod20, TDPunning, mod18, mod22, TDMultiple02, T4127a, ghci048, T8932, rnfail015, rnfail010, rnfail011, rnfail013, rnfail002, rnfail003, rn_dup, rnfail009, T7164, rnfail043, TH_dupdecl, rnfail012

Fields

- :: !OccName

  The name of the declarations

- -> !(NonEmpty Name)

  The individual declarations

- -> TcRnMessage

TcRnPackageImportsDisabled :: TcRnMessage | TcRnPackageImportsDisabled is an error indicating that an import uses a package qualifier while the extension PackageImports was disabled. Test cases: PackageImportsDisabled
TcRnIllegalDataCon | TcRnIllegalDataCon is an error indicating that a data constructor was defined using a lowercase name, or a symbolic name in prefix position. Mostly caught by PsErrNotADataCon. Test cases: None

Fields

- :: !RdrName

  The constructor name

- -> TcRnMessage

TcRnNestedForallsContexts :: !NestedForallsContextsIn -> TcRnMessage | TcRnNestedForallsContexts is an error indicating that multiple foralls or contexts are nested/curried where this is not supported, like `∀ x. ∀ y.` instead of `∀ x y.`. Test cases: T12087, T14320, T16114, T16394, T16427, T18191, T18240a, T18240b, T18455, T5951
TcRnRedundantRecordWildcard :: TcRnMessage | TcRnRedundantRecordWildcard is a warning indicating that a pattern uses a record wildcard even though all of the record's fields are bound explicitly. Test cases: T15957_Fail
TcRnUnusedRecordWildcard | TcRnUnusedRecordWildcard is a warning indicating that a pattern uses a record wildcard while none of the fields bound by it are used. Test cases: T15957_Fail

Fields

- :: ![Name]

  The names bound by the wildcard

- -> TcRnMessage

TcRnUnusedName

TcRnUnusedName is a warning indicating that a defined or imported name is not used in the module.

Test cases: ds053, mc10, overloadedrecfldsfail05, overloadedrecfldsfail06, prog018, read014, rn040, rn041, rn047, rn063, T13839, T13839a, T13919, T17171b, T17a, T17b, T17d, T17e, T18470, T1972, t22391, t22391j, T2497, T3371, T3449, T7145b, T7336, TH_recover_warns, unused_haddock, WarningGroups, werror

Fields

- :: !OccName

  The unused name

- -> !UnusedNameProv

  The provenance of the name

- -> TcRnMessage

TcRnQualifiedBinder | TcRnQualifiedBinder is an error indicating that a qualified name was used in binding position. Test cases: mod62, rnfail021, rnfail034, rnfail039, rnfail046

Fields

- :: !RdrName

  The name used as a binder

- -> TcRnMessage

TcRnTypeApplicationsDisabled | TcRnTypeApplicationsDisabled is an error indicating that a type application was used while the extension TypeApplications was disabled. Test cases: T12411, T12446, T15527, T16133, T18251c

Fields

- :: !TypeApplication

  what kind of type application is it?

- -> TcRnMessage

TcRnInvalidRecordField | TcRnInvalidRecordField is an error indicating that a record field was used that doesn't exist in a constructor. Test cases: T13644, T13847, T17469, T8448, T8570, tcfail083, tcfail084

Fields

- :: !Name

  The constructor name

- -> !FieldLabelString

  The name of the field

- -> TcRnMessage

TcRnTupleTooLarge | TcRnTupleTooLarge is an error indicating that the arity of a tuple exceeds mAX_TUPLE_SIZE. Test cases: T18723a, T18723b, T18723c, T6148a, T6148b, T6148c, T6148d

Fields

- :: !Int

  The arity of the tuple

- -> TcRnMessage

TcRnCTupleTooLarge | TcRnCTupleTooLarge is an error indicating that the arity of a constraint tuple exceeds mAX_CTUPLE_SIZE. Test cases: T10451

Fields

- :: !Int

  The arity of the constraint tuple

- -> TcRnMessage

TcRnIllegalInferredTyVars | TcRnIllegalInferredTyVars is an error indicating that some type variables were quantified as inferred (like `∀ {a}.`) in a place where this is not allowed, like in an instance declaration. Test cases: ExplicitSpecificity5, ExplicitSpecificity6, ExplicitSpecificity8, ExplicitSpecificity9

Fields

- :: !(NonEmpty (HsTyVarBndr Specificity GhcPs))

  The offending type variables

- -> TcRnMessage

TcRnAmbiguousName

TcRnAmbiguousName is an error indicating that an unbound name might refer to multiple names in scope.

Test cases: BootFldReexport, DRFUnused, duplicaterecfldsghci01, GHCiDRF, mod110, mod151, mod152, mod153, mod164, mod165, NoFieldSelectorsFail, overloadedrecfldsfail02, overloadedrecfldsfail04, overloadedrecfldsfail11, overloadedrecfldsfail12, overloadedrecfldsfail13, overloadedrecfldswasrunnowfail06, rnfail044, T11167_ambig, T11167_ambiguous_fixity, T13132_duplicaterecflds, T15487, T16745, T17420, T18999_NoDisambiguateRecordFields, T19397E1, T19397E2, T23010_fail, tcfail037

Fields

- :: !GlobalRdrEnv
- -> !RdrName

  The name

- -> !(NonEmpty GlobalRdrElt)

  The possible matches

- -> TcRnMessage

TcRnBindingNameConflict | TcRnBindingNameConflict is an error indicating that multiple local or top-level bindings have the same name. Test cases: dsrun006, mdofail002, mdofail003, mod23, mod24, qq006, rnfail001, rnfail004, SimpleFail6, T14114, T16110_Fail1, tcfail038, TH_spliceD1, T22478b, TyAppPat_NonlinearMultiAppPat, TyAppPat_NonlinearMultiPat, TyAppPat_NonlinearSinglePat,

Fields

- :: !RdrName

  The conflicting name

- -> !(NonEmpty SrcSpan)

  The locations of the duplicates

- -> TcRnMessage

TcRnNonCanonicalDefinition

TcRnNonCanonicalDefinition is a warning indicating that an instance defines an implementation for a method that should not be defined in a way that deviates from its default implementation, for example because it has been scheduled to be absorbed into another method, like `pure` making `return` obsolete.

Test cases: WCompatWarningsOn, WCompatWarningsOff, WCompatWarningsOnOff

Fields

- :: !NonCanonicalDefinition

  Specifics

- -> !(LHsSigType GhcRn)

  The instance type

- -> TcRnMessage

TcRnImplicitImportOfPrelude :: TcRnMessage | TcRnImplicitImportOfPrelude is a warning, controlled by `Wimplicit-prelude`, that is triggered upon an implicit import of the `Prelude` module. Example: {-# OPTIONS_GHC -fwarn-implicit-prelude #-} module M where {} Test case: rn055
TcRnMissingMain | TcRnMissingMain is an error that occurs when a Main module does not define a main function (named `main` by default, but overridable with the `main-is` command line flag). Example: module Main where {} Test cases: T414, T7765, readFail021, rnfail007, T13839b, T17171a, T16453E1, tcfail030, T19397E3, T19397E4

Fields

- :: !Bool

  whether the module has an explicit export list

- -> !Module
- -> !OccName

  the expected name of the main function

- -> TcRnMessage

TcRnGhciUnliftedBind :: !Id -> TcRnMessage | TcRnGhciUnliftedBind is an error that occurs when a user attempts to bind an unlifted value in GHCi. Example (in GHCi): let a = (# 1#, 3# #) Test cases: T9140, T19035b
TcRnGhciMonadLookupFail | TcRnGhciMonadLookupFail is an error that occurs when the user sets the GHCi monad, using the GHC API `setGHCiMonad` function, but GHC can't find which monad the user is referring to. Example: import GHC ( setGHCiMonad ) ... setGHCiMonad NoSuchThing Test cases: none

Fields

- :: String

  the textual name of the monad requested by the user

- -> Maybe [GlobalRdrElt]

  lookup result

- -> TcRnMessage

TcRnMissingRoleAnnotation :: Name -> [Role] -> TcRnMessage | TcRnMissingRoleAnnotation is a warning that occurs when type declaration doesn't have a role annotatiosn Controlled by flags: - Wmissing-role-annotations Test cases: T22702
TcRnPatersonCondFailure | TcRnPatersonCondFailure is an error that occurs when an instance declaration fails to conform to the Paterson conditions. Which particular condition fails depends on the constructor of PatersonCondFailure See Note [Paterson conditions]. Test cases: T15231, tcfail157, T15316, T19187a, fd-loop, tcfail108, tcfail154, T15172, tcfail214

Fields

- :: PatersonCondFailure

  the failed Paterson Condition

- -> PatersonCondFailureContext
- -> Type

  the LHS

- -> Type

  the RHS

- -> TcRnMessage

TcRnImplicitRhsQuantification :: LocatedN RdrName -> TcRnMessage | TcRnImplicitRhsQuantification is a warning that occurs when GHC implicitly quantifies over a type variable that occurs free on the RHS of the type declaration that is not mentioned on the LHS Example: type T = 'Nothing :: Maybe a Controlled by flags: - Wimplicit-rhs-quantification Test cases: T23510a T23510b
TcRnIllformedTypePattern :: !(Pat GhcRn) -> TcRnMessage | TcRnIllformedTypePattern is an error raised when the pattern corresponding to a required type argument (visible forall) does not have a form that can be interpreted as a type pattern. Example: vfun :: forall (a :: k) -> () vfun !x = () -- ^^ -- bang-patterns not allowed as type patterns Test cases: T22326_fail_bang_pat
TcRnIllegalTypePattern :: TcRnMessage | TcRnIllegalTypePattern is an error raised when a pattern constructed with the `type` keyword occurs in a position that does not correspond to a required type argument (visible forall). Example: case x of (type _) -> True -- the (type _) pattern is illegal here _ -> False Test cases: T22326_fail_ado T22326_fail_caseof

TcRnIllformedTypeArgument :: !(LHsExpr GhcRn) -> TcRnMessage

TcRnIllformedTypeArgument is an error raised when an argument that specifies a required type argument (instantiates a visible forall) does not have a form that can be interpreted as a type argument.

Example:

vfun :: forall (a :: k) -> () x = vfun (_ -> _) -- ^^^^^^^^^ -- lambdas not allowed in type arguments

Test cases: T22326_fail_lam_arg

TcRnIllegalTypeExpr :: TcRnMessage | TcRnIllegalTypeExpr is an error raised when an expression constructed with the `type` keyword occurs in a position that does not correspond to a required type argument (visible forall). Example: xtop = type Int -- not a function argument xarg = length (type Int) -- `length` does not expect a required type argument Test cases: T22326_fail_app T22326_fail_top
TcRnInvalidDefaultedTyVar | TcRnInvalidDefaultedTyVar is an error raised when a defaulting plugin proposes to default a type variable that is not an unfilled metavariable Test cases: T23832_invalid

Fields

- :: ![Ct]

  The constraints passed to the plugin

- -> [(TcTyVar, Type)]

  The plugin-proposed type variable defaults

- -> NonEmpty TcTyVar

  The invalid type variables of the proposal

- -> TcRnMessage

TcRnNamespacedWarningPragmaWithoutFlag :: WarnDecl GhcPs -> TcRnMessage | TcRnNamespacedWarningPragmaWithoutFlag is an error that occurs when a namespace specifier is used in {-# WARNING ... #-} or {-# DEPRECATED ... #-} pragmas without the -XExplicitNamespaces extension enabled Example: {-# LANGUAGE NoExplicitNamespaces #-} f = id {-# WARNING data f "some warning message" #-} Test cases: T24396c
TcRnInvisPatWithNoForAll :: HsTyPat GhcRn -> TcRnMessage | TcRnInvisPatWithNoForAll is an error raised when invisible type pattern is used without associated `forall` in types Examples: f :: Int f @t = 5 g :: [a -> a] g = [ @t x -> x :: t] Test cases: T17694c T17594d
TcRnIllegalInvisibleTypePattern :: HsTyPat GhcPs -> TcRnMessage | TcRnIllegalInvisibleTypePattern is an error raised when invisible type pattern is used without the TypeAbstractions extension enabled Example: {-# LANGUAGE NoTypeAbstractions #-} id :: a -> a id @t x = x Test cases: T17694b
TcRnNamespacedFixitySigWithoutFlag :: FixitySig GhcPs -> TcRnMessage | TcRnNamespacedFixitySigWithoutFlag is an error that occurs when a namespace specifier is used in fixity signatures without the -XExplicitNamespaces extension enabled Example: {-# LANGUAGE NoExplicitNamespaces #-} f = const infixl 7 data `f` Test cases: T14032c
TcRnDefaultedExceptionContext :: CtLoc -> TcRnMessage | TcRnDefaultedExceptionContext is a warning that is triggered when the backward-compatibility logic solving for implicit ExceptionContext constraints fires. Test cases: DefaultExceptionContext
TcRnOutOfArityTyVar | TcRnOutOfArityTyVar is an error raised when the arity of a type synonym (as determined by the SAKS and the LHS) is insufficiently high to accommodate an implicit binding for a free variable that occurs in the outermost kind signature on the RHS of the said type synonym. Example: type SynBad :: forall k. k -> Type type SynBad = Proxy :: j -> Type Test cases: T24770a

Fields

- :: Name

  Type synonym's name

- -> Name

  Type variable's name

- -> TcRnMessage

TcRnMisplacedInvisPat :: HsTyPat GhcPs -> TcRnMessage |

#### Instances

Instances details

Generic TcRnMessage # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TcRnMessage |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcRnMessage = D1 ('MetaData "TcRnMessage" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((((((((C1 ('MetaCons "TcRnUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UnknownDiagnostic (DiagnosticOpts TcRnMessage)))) :+: C1 ('MetaCons "TcRnInterfaceError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IfaceMessage))) :+: (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)) :+: C1 ('MetaCons "TcRnSolverDepthError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SubGoalDepth))) :+: (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 "TcRnInaccessibleCoAxBranch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CoAxBranch)))))) :+: (((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 "TcRnUnusedQuantifiedTypeVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsDocContext) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsTyVarBndrExistentialFlag)))) :+: ((C1 ('MetaCons "TcRnDodgyImports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DodgyImportsReason)) :+: C1 ('MetaCons "TcRnDodgyExports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalRdrElt))) :+: (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 "TcRnInvalidWarningCategory" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WarningCategory)))) :+: ((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 "TcRnIllegalNamedWildcardInTypeArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))) :+: ((C1 ('MetaCons "TcRnIllegalImplicitTyVarInTypeArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :+: 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 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "TcRnNegativeNumTypeLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyLit GhcPs))))))))) :+: (((((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 "TcRnIllegalHsBootOrSigDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsBootOrSig) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BadBootDecls)) :+: C1 ('MetaCons "TcRnBootMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsBootOrSig) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BootMismatch))) :+: (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))) :+: (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 TcIdSig)) :+: C1 ('MetaCons "TcRnTupleConstraintInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class))))))) :+: ((((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 "TcRnOversaturatedVisibleKindArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (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 "TcRnSimplifiableConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PredType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InstanceWhat))))) :+: ((C1 ('MetaCons "TcRnArityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity))) :+: C1 ('MetaCons "TcRnIllegalInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IllegalInstanceReason))) :+: (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 (Either ClsInst FamInst))) :+: 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 GlobalRdrElt) :*: (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 Name) :*: 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 GlobalRdrElt)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalRdrElt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs))))) :+: C1 ('MetaCons "TcRnDuplicateFieldExport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GlobalRdrElt, IE GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (GlobalRdrElt, IE GhcPs))))))))) :+: ((((C1 ('MetaCons "TcRnAmbiguousRecordUpdate" '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 "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 "TcRnAmbiguousFieldInUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GlobalRdrElt, GlobalRdrElt, [GlobalRdrElt]))) :+: C1 ('MetaCons "TcRnBadRecordUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [RdrName]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BadRecordUpdateReason))) :+: (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 "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 "TcRnCapturedTermName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either [GlobalRdrElt] Name))) :+: 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 "TcRnTermNameInType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName) :*: 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 "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 "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 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (HsType GhcPs) (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 (HsBndrVis GhcRn) 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 "TcRnDisconnectedTyVar" 'PrefixI 'False) (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 "TcRnUnexpectedKindVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))))) :+: (((C1 ('MetaCons "TcRnIllegalKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTypeOrSigType GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: 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 "TcRnIllegalTermLevelUse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TermLevelUseErr)) :+: C1 ('MetaCons "TcRnMatchesHaveDiffNumArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsMatchContextRn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MatchArgBadMatches))))) :+: ((C1 ('MetaCons "TcRnUnexpectedPatSigType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsPatSigType GhcPs))) :+: C1 ('MetaCons "TcRnIllegalKindSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsType GhcPs)))) :+: (C1 ('MetaCons "TcRnDataKindsError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeOrKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (HsType GhcPs) Type))) :+: (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 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (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 "TcRnPragmaWarning" 'PrefixI 'True) (S1 ('MetaSel ('Just "pragma_warning_info") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PragmaWarningInfo) :*: S1 ('MetaSel ('Just "pragma_warning_msg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WarningTxt GhcRn)))) :+: (C1 ('MetaCons "TcRnDifferentExportWarnings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SrcSpan))) :+: (C1 ('MetaCons "TcRnIncompleteExportWarnings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SrcSpan))) :+: 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 "TcRnHsigFixityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Fixity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Fixity))) :+: C1 ('MetaCons "TcRnHsigShapeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsigShapeMismatchReason))) :+: (C1 ('MetaCons "TcRnHsigMissingModuleExport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module))) :+: 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 "TcRnIllegalQuasiQuotes" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TcRnTHError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 THError)) :+: (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 "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 "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 "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 "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 HsStmtContextRn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnexpectedStatement)) :+: C1 ('MetaCons "TcRnUnexpectedStatementInContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsStmtContextRn) :*: (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 "TcRnBindingOfExistingName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnMultipleFixityDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))))))) :+: (((((C1 ('MetaCons "TcRnIllegalPatternSynonymDecl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnIllegalClassBinding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DeclSort) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsBindLR GhcPs GhcPs)))) :+: (C1 ('MetaCons "TcRnOrphanCompletePragma" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnEmptyCase" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsMatchContextRn)))) :+: ((C1 ('MetaCons "TcRnNonStdGuards" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonStandardGuards)) :+: C1 ('MetaCons "TcRnDuplicateSigDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LocatedN RdrName, Sig GhcPs))))) :+: (C1 ('MetaCons "TcRnMisplacedSigDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sig GhcRn))) :+: (C1 ('MetaCons "TcRnUnexpectedDefaultSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sig GhcPs))) :+: C1 ('MetaCons "TcRnDuplicateMinimalSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LSig GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LSig GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LSig GhcPs]))))))) :+: (((C1 ('MetaCons "TcRnIllegalInvisTyVarBndr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn))) :+: C1 ('MetaCons "TcRnInvalidInvisTyVarBndr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn)))) :+: (C1 ('MetaCons "TcRnInvisBndrWithoutSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn))) :+: C1 ('MetaCons "TcRnDeprecatedInvisTyArgInConPat" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TcRnUnexpectedStandaloneDerivingDecl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnUnusedVariableInRuleDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FastString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :+: (C1 ('MetaCons "TcRnUnexpectedStandaloneKindSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnIllegalRuleLhs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RuleLhsErrReason) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FastString)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsExpr GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcRn)))) :+: C1 ('MetaCons "TcRnDuplicateRoleAnnot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LRoleAnnotDecl GhcPs))))))))) :+: ((((C1 ('MetaCons "TcRnDuplicateKindSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LStandaloneKindSig GhcPs)))) :+: C1 ('MetaCons "TcRnIllegalDerivStrategy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DerivStrategy GhcPs)))) :+: (C1 ('MetaCons "TcRnIllegalMultipleDerivClauses" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnNoDerivStratSpecified" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :+: ((C1 ('MetaCons "TcRnStupidThetaInGadt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsDocContext)) :+: C1 ('MetaCons "TcRnShadowedTyVarNameInFamResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IdP GhcPs)))) :+: (C1 ('MetaCons "TcRnIncorrectTyVarOnLhsOfInjCond" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IdP GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LIdP GhcPs))) :+: (C1 ('MetaCons "TcRnUnknownTyVarsOnRhsOfInjCond" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name])) :+: C1 ('MetaCons "TcRnLookupInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LookupInstanceErrReason))))))) :+: (((C1 ('MetaCons "TcRnBadlyStaged" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StageCheckReason) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: C1 ('MetaCons "TcRnStageRestriction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StageCheckReason))) :+: (C1 ('MetaCons "TcRnBadlyStagedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "TcRnTyThingUsedWrong" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WrongThingSort) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyThing) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: C1 ('MetaCons "TcRnCannotDefaultKindVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind))))) :+: ((C1 ('MetaCons "TcRnUninferrableTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TyCoVar]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UninferrableTyVarCtx)) :+: C1 ('MetaCons "TcRnSkolemEscape" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TcTyVar]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "TcRnPatSynEscapedCoercion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty CoVar))) :+: (C1 ('MetaCons "TcRnPatSynExistentialInResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcSigmaType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TyVar]))) :+: C1 ('MetaCons "TcRnPatSynArityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity)))))))))) :+: ((((((C1 ('MetaCons "TcRnPatSynInvalidRhs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LPat GhcRn))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [LIdP GhcRn]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PatSynInvalidRhsReason))) :+: C1 ('MetaCons "TcRnZonkerMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ZonkerMessage))) :+: (C1 ('MetaCons "TcRnTyFamDepsDisabled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnAbstractClosedTyFamDecl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TcRnPartialFieldSelector" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabel)) :+: C1 ('MetaCons "TcRnHasFieldResolvedIncomplete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "TcRnBadFieldAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BadFieldAnnotationReason))) :+: (C1 ('MetaCons "TcRnSuperclassCycle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SuperclassCycle)) :+: C1 ('MetaCons "TcRnDefaultSigMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))))) :+: (((C1 ('MetaCons "TcRnTyFamsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyFamsDisabledReason)) :+: C1 ('MetaCons "TcRnBadTyConTelescope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "TcRnTyFamResultDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr () GhcRn))) :+: C1 ('MetaCons "TcRnRoleValidationFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RoleValidationFailedReason)))) :+: ((C1 ('MetaCons "TcRnCommonFieldResultTypeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString))) :+: C1 ('MetaCons "TcRnCommonFieldTypeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString)))) :+: (C1 ('MetaCons "TcRnClassExtensionDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DisabledClassExtension)) :+: (C1 ('MetaCons "TcRnDataConParentTypeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnGADTsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))))))) :+: ((((C1 ('MetaCons "TcRnExistentialQuantificationDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon)) :+: C1 ('MetaCons "TcRnGADTDataContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "TcRnMultipleConForNewtype" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "TcRnKindSignaturesDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Either (HsType GhcPs) (Name, HsType GhcRn)))))) :+: ((C1 ('MetaCons "TcRnEmptyDataDeclsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TcRnRoleMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role)))) :+: (C1 ('MetaCons "TcRnRoleCountMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LRoleAnnotDecl GhcRn))) :+: (C1 ('MetaCons "TcRnIllegalRoleAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (RoleAnnotDecl GhcRn))) :+: C1 ('MetaCons "TcRnRoleAnnotationsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)))))) :+: (((C1 ('MetaCons "TcRnIncoherentRoles" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "TcRnPrecedenceParsingError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)))) :+: (C1 ('MetaCons "TcRnSectionPrecedenceError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcPs)))) :+: (C1 ('MetaCons "TcRnTypeSynonymCycle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TySynCycleTyCons)) :+: C1 ('MetaCons "TcRnSelfImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))))) :+: ((C1 ('MetaCons "TcRnNoExplicitImportList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)) :+: C1 ('MetaCons "TcRnSafeImportsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))) :+: (C1 ('MetaCons "TcRnDeprecatedModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WarningTxt GhcRn))) :+: (C1 ('MetaCons "TcRnCompatUnqualifiedImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ImportDecl GhcPs))) :+: C1 ('MetaCons "TcRnRedundantSourceImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)))))))) :+: (((((C1 ('MetaCons "TcRnImportLookup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ImportLookupReason)) :+: C1 ('MetaCons "TcRnUnusedImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ImportDecl GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnusedImportReason))) :+: (C1 ('MetaCons "TcRnDuplicateDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty Name))) :+: C1 ('MetaCons "TcRnPackageImportsDisabled" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TcRnIllegalDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnNestedForallsContexts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NestedForallsContextsIn))) :+: (C1 ('MetaCons "TcRnRedundantRecordWildcard" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnUnusedRecordWildcard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Name])) :+: C1 ('MetaCons "TcRnUnusedName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnusedNameProv)))))) :+: (((C1 ('MetaCons "TcRnQualifiedBinder" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnTypeApplicationsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeApplication))) :+: (C1 ('MetaCons "TcRnInvalidRecordField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString)) :+: C1 ('MetaCons "TcRnTupleTooLarge" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))) :+: ((C1 ('MetaCons "TcRnCTupleTooLarge" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "TcRnIllegalInferredTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (HsTyVarBndr Specificity GhcPs))))) :+: (C1 ('MetaCons "TcRnAmbiguousName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobalRdrEnv) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty GlobalRdrElt)))) :+: (C1 ('MetaCons "TcRnBindingNameConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty SrcSpan))) :+: C1 ('MetaCons "TcRnNonCanonicalDefinition" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonCanonicalDefinition) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsSigType GhcRn)))))))) :+: ((((C1 ('MetaCons "TcRnImplicitImportOfPrelude" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnMissingMain" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)))) :+: (C1 ('MetaCons "TcRnGhciUnliftedBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "TcRnGhciMonadLookupFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [GlobalRdrElt]))))) :+: ((C1 ('MetaCons "TcRnMissingRoleAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: C1 ('MetaCons "TcRnPatersonCondFailure" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PatersonCondFailure) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PatersonCondFailureContext)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)))) :+: (C1 ('MetaCons "TcRnImplicitRhsQuantification" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LocatedN RdrName))) :+: (C1 ('MetaCons "TcRnIllformedTypePattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcRn))) :+: C1 ('MetaCons "TcRnIllegalTypePattern" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TcRnIllformedTypeArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcRn))) :+: C1 ('MetaCons "TcRnIllegalTypeExpr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TcRnInvalidDefaultedTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Ct]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(TcTyVar, Type)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty TcTyVar)))) :+: (C1 ('MetaCons "TcRnNamespacedWarningPragmaWithoutFlag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WarnDecl GhcPs))) :+: C1 ('MetaCons "TcRnInvisPatWithNoForAll" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyPat GhcRn)))))) :+: ((C1 ('MetaCons "TcRnIllegalInvisibleTypePattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyPat GhcPs))) :+: C1 ('MetaCons "TcRnNamespacedFixitySigWithoutFlag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FixitySig GhcPs)))) :+: (C1 ('MetaCons "TcRnDefaultedExceptionContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CtLoc)) :+: (C1 ('MetaCons "TcRnOutOfArityTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "TcRnMisplacedInvisPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyPat GhcPs))))))))))))

Methods

from :: TcRnMessage -> Rep TcRnMessage x #

to :: Rep TcRnMessage x -> TcRnMessage #

Diagnostic TcRnMessage # |

Instance details

Defined in GHC.Tc.Errors.Ppr

Associated Types

type DiagnosticOpts TcRnMessage |
Instance details Defined in GHC.Tc.Errors.Ppr type DiagnosticOpts TcRnMessage = TcRnMessageOpts

Methods

diagnosticMessage :: DiagnosticOpts TcRnMessage -> TcRnMessage -> DecoratedSDoc #

diagnosticReason :: TcRnMessage -> DiagnosticReason #

diagnosticHints :: TcRnMessage -> [GhcHint] #

diagnosticCode :: TcRnMessage -> Maybe DiagnosticCode #

type Rep TcRnMessage # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcRnMessage = D1 ('MetaData "TcRnMessage" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((((((((C1 ('MetaCons "TcRnUnknownMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UnknownDiagnostic (DiagnosticOpts TcRnMessage)))) :+: C1 ('MetaCons "TcRnInterfaceError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IfaceMessage))) :+: (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)) :+: C1 ('MetaCons "TcRnSolverDepthError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SubGoalDepth))) :+: (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 "TcRnInaccessibleCoAxBranch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CoAxBranch)))))) :+: (((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 "TcRnUnusedQuantifiedTypeVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsDocContext) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsTyVarBndrExistentialFlag)))) :+: ((C1 ('MetaCons "TcRnDodgyImports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DodgyImportsReason)) :+: C1 ('MetaCons "TcRnDodgyExports" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalRdrElt))) :+: (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 "TcRnInvalidWarningCategory" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WarningCategory)))) :+: ((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 "TcRnIllegalNamedWildcardInTypeArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))) :+: ((C1 ('MetaCons "TcRnIllegalImplicitTyVarInTypeArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :+: 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 'DecidedStrict) (Rec0 Char)) :+: C1 ('MetaCons "TcRnNegativeNumTypeLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyLit GhcPs))))))))) :+: (((((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 "TcRnIllegalHsBootOrSigDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsBootOrSig) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BadBootDecls)) :+: C1 ('MetaCons "TcRnBootMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsBootOrSig) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BootMismatch))) :+: (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))) :+: (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 TcIdSig)) :+: C1 ('MetaCons "TcRnTupleConstraintInst" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class))))))) :+: ((((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 "TcRnOversaturatedVisibleKindArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (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 "TcRnSimplifiableConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PredType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InstanceWhat))))) :+: ((C1 ('MetaCons "TcRnArityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity))) :+: C1 ('MetaCons "TcRnIllegalInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IllegalInstanceReason))) :+: (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 (Either ClsInst FamInst))) :+: 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 GlobalRdrElt) :*: (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 Name) :*: 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 GlobalRdrElt)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlobalRdrElt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs))))) :+: C1 ('MetaCons "TcRnDuplicateFieldExport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GlobalRdrElt, IE GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (GlobalRdrElt, IE GhcPs))))))))) :+: ((((C1 ('MetaCons "TcRnAmbiguousRecordUpdate" '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 "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 "TcRnAmbiguousFieldInUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GlobalRdrElt, GlobalRdrElt, [GlobalRdrElt]))) :+: C1 ('MetaCons "TcRnBadRecordUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [RdrName]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BadRecordUpdateReason))) :+: (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 "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 "TcRnCapturedTermName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either [GlobalRdrElt] Name))) :+: 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 "TcRnTermNameInType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName) :*: 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 "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 "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 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (HsType GhcPs) (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 (HsBndrVis GhcRn) 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 "TcRnDisconnectedTyVar" 'PrefixI 'False) (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 "TcRnUnexpectedKindVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))))) :+: (((C1 ('MetaCons "TcRnIllegalKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTypeOrSigType GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: 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 "TcRnIllegalTermLevelUse" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TermLevelUseErr)) :+: C1 ('MetaCons "TcRnMatchesHaveDiffNumArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsMatchContextRn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MatchArgBadMatches))))) :+: ((C1 ('MetaCons "TcRnUnexpectedPatSigType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsPatSigType GhcPs))) :+: C1 ('MetaCons "TcRnIllegalKindSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsType GhcPs)))) :+: (C1 ('MetaCons "TcRnDataKindsError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeOrKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either (HsType GhcPs) Type))) :+: (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 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (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 "TcRnPragmaWarning" 'PrefixI 'True) (S1 ('MetaSel ('Just "pragma_warning_info") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PragmaWarningInfo) :*: S1 ('MetaSel ('Just "pragma_warning_msg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WarningTxt GhcRn)))) :+: (C1 ('MetaCons "TcRnDifferentExportWarnings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SrcSpan))) :+: (C1 ('MetaCons "TcRnIncompleteExportWarnings" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty SrcSpan))) :+: 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 "TcRnHsigFixityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Fixity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Fixity))) :+: C1 ('MetaCons "TcRnHsigShapeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsigShapeMismatchReason))) :+: (C1 ('MetaCons "TcRnHsigMissingModuleExport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitState) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module))) :+: 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 "TcRnIllegalQuasiQuotes" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TcRnTHError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 THError)) :+: (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 "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 "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 "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 "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 HsStmtContextRn) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnexpectedStatement)) :+: C1 ('MetaCons "TcRnUnexpectedStatementInContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsStmtContextRn) :*: (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 "TcRnBindingOfExistingName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnMultipleFixityDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RdrName)))))))) :+: (((((C1 ('MetaCons "TcRnIllegalPatternSynonymDecl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnIllegalClassBinding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DeclSort) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsBindLR GhcPs GhcPs)))) :+: (C1 ('MetaCons "TcRnOrphanCompletePragma" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnEmptyCase" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsMatchContextRn)))) :+: ((C1 ('MetaCons "TcRnNonStdGuards" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonStandardGuards)) :+: C1 ('MetaCons "TcRnDuplicateSigDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LocatedN RdrName, Sig GhcPs))))) :+: (C1 ('MetaCons "TcRnMisplacedSigDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sig GhcRn))) :+: (C1 ('MetaCons "TcRnUnexpectedDefaultSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Sig GhcPs))) :+: C1 ('MetaCons "TcRnDuplicateMinimalSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LSig GhcPs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LSig GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [LSig GhcPs]))))))) :+: (((C1 ('MetaCons "TcRnIllegalInvisTyVarBndr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn))) :+: C1 ('MetaCons "TcRnInvalidInvisTyVarBndr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn)))) :+: (C1 ('MetaCons "TcRnInvisBndrWithoutSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr (HsBndrVis GhcRn) GhcRn))) :+: C1 ('MetaCons "TcRnDeprecatedInvisTyArgInConPat" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TcRnUnexpectedStandaloneDerivingDecl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnUnusedVariableInRuleDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FastString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :+: (C1 ('MetaCons "TcRnUnexpectedStandaloneKindSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnIllegalRuleLhs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RuleLhsErrReason) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FastString)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LHsExpr GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcRn)))) :+: C1 ('MetaCons "TcRnDuplicateRoleAnnot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LRoleAnnotDecl GhcPs))))))))) :+: ((((C1 ('MetaCons "TcRnDuplicateKindSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (LStandaloneKindSig GhcPs)))) :+: C1 ('MetaCons "TcRnIllegalDerivStrategy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DerivStrategy GhcPs)))) :+: (C1 ('MetaCons "TcRnIllegalMultipleDerivClauses" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnNoDerivStratSpecified" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :+: ((C1 ('MetaCons "TcRnStupidThetaInGadt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsDocContext)) :+: C1 ('MetaCons "TcRnShadowedTyVarNameInFamResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IdP GhcPs)))) :+: (C1 ('MetaCons "TcRnIncorrectTyVarOnLhsOfInjCond" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IdP GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LIdP GhcPs))) :+: (C1 ('MetaCons "TcRnUnknownTyVarsOnRhsOfInjCond" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name])) :+: C1 ('MetaCons "TcRnLookupInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LookupInstanceErrReason))))))) :+: (((C1 ('MetaCons "TcRnBadlyStaged" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StageCheckReason) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: C1 ('MetaCons "TcRnStageRestriction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StageCheckReason))) :+: (C1 ('MetaCons "TcRnBadlyStagedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "TcRnTyThingUsedWrong" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 WrongThingSort) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyThing) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: C1 ('MetaCons "TcRnCannotDefaultKindVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind))))) :+: ((C1 ('MetaCons "TcRnUninferrableTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TyCoVar]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UninferrableTyVarCtx)) :+: C1 ('MetaCons "TcRnSkolemEscape" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TcTyVar]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "TcRnPatSynEscapedCoercion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty CoVar))) :+: (C1 ('MetaCons "TcRnPatSynExistentialInResult" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcSigmaType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [TyVar]))) :+: C1 ('MetaCons "TcRnPatSynArityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity)))))))))) :+: ((((((C1 ('MetaCons "TcRnPatSynInvalidRhs" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LPat GhcRn))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [LIdP GhcRn]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PatSynInvalidRhsReason))) :+: C1 ('MetaCons "TcRnZonkerMessage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ZonkerMessage))) :+: (C1 ('MetaCons "TcRnTyFamDepsDisabled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnAbstractClosedTyFamDecl" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TcRnPartialFieldSelector" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabel)) :+: C1 ('MetaCons "TcRnHasFieldResolvedIncomplete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "TcRnBadFieldAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BadFieldAnnotationReason))) :+: (C1 ('MetaCons "TcRnSuperclassCycle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SuperclassCycle)) :+: C1 ('MetaCons "TcRnDefaultSigMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))))) :+: (((C1 ('MetaCons "TcRnTyFamsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyFamsDisabledReason)) :+: C1 ('MetaCons "TcRnBadTyConTelescope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "TcRnTyFamResultDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsTyVarBndr () GhcRn))) :+: C1 ('MetaCons "TcRnRoleValidationFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RoleValidationFailedReason)))) :+: ((C1 ('MetaCons "TcRnCommonFieldResultTypeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString))) :+: C1 ('MetaCons "TcRnCommonFieldTypeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString)))) :+: (C1 ('MetaCons "TcRnClassExtensionDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DisabledClassExtension)) :+: (C1 ('MetaCons "TcRnDataConParentTypeMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "TcRnGADTsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))))))) :+: ((((C1 ('MetaCons "TcRnExistentialQuantificationDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DataCon)) :+: C1 ('MetaCons "TcRnGADTDataContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "TcRnMultipleConForNewtype" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "TcRnKindSignaturesDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Either (HsType GhcPs) (Name, HsType GhcRn)))))) :+: ((C1 ('MetaCons "TcRnEmptyDataDeclsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TcRnRoleMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role)))) :+: (C1 ('MetaCons "TcRnRoleCountMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LRoleAnnotDecl GhcRn))) :+: (C1 ('MetaCons "TcRnIllegalRoleAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (RoleAnnotDecl GhcRn))) :+: C1 ('MetaCons "TcRnRoleAnnotationsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)))))) :+: (((C1 ('MetaCons "TcRnIncoherentRoles" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "TcRnPrecedenceParsingError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)))) :+: (C1 ('MetaCons "TcRnSectionPrecedenceError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OpName, Fixity)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsExpr GhcPs)))) :+: (C1 ('MetaCons "TcRnTypeSynonymCycle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TySynCycleTyCons)) :+: C1 ('MetaCons "TcRnSelfImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))))) :+: ((C1 ('MetaCons "TcRnNoExplicitImportList" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)) :+: C1 ('MetaCons "TcRnSafeImportsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName))) :+: (C1 ('MetaCons "TcRnDeprecatedModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WarningTxt GhcRn))) :+: (C1 ('MetaCons "TcRnCompatUnqualifiedImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ImportDecl GhcPs))) :+: C1 ('MetaCons "TcRnRedundantSourceImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName)))))))) :+: (((((C1 ('MetaCons "TcRnImportLookup" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ImportLookupReason)) :+: C1 ('MetaCons "TcRnUnusedImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ImportDecl GhcRn)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnusedImportReason))) :+: (C1 ('MetaCons "TcRnDuplicateDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty Name))) :+: C1 ('MetaCons "TcRnPackageImportsDisabled" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TcRnIllegalDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnNestedForallsContexts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NestedForallsContextsIn))) :+: (C1 ('MetaCons "TcRnRedundantRecordWildcard" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TcRnUnusedRecordWildcard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Name])) :+: C1 ('MetaCons "TcRnUnusedName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnusedNameProv)))))) :+: (((C1 ('MetaCons "TcRnQualifiedBinder" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "TcRnTypeApplicationsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeApplication))) :+: (C1 ('MetaCons "TcRnInvalidRecordField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString)) :+: C1 ('MetaCons "TcRnTupleTooLarge" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))) :+: ((C1 ('MetaCons "TcRnCTupleTooLarge" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "TcRnIllegalInferredTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (HsTyVarBndr Specificity GhcPs))))) :+: (C1 ('MetaCons "TcRnAmbiguousName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobalRdrEnv) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty GlobalRdrElt)))) :+: (C1 ('MetaCons "TcRnBindingNameConflict" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty SrcSpan))) :+: C1 ('MetaCons "TcRnNonCanonicalDefinition" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonCanonicalDefinition) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsSigType GhcRn)))))))) :+: ((((C1 ('MetaCons "TcRnImplicitImportOfPrelude" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TcRnMissingMain" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Module) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OccName)))) :+: (C1 ('MetaCons "TcRnGhciUnliftedBind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "TcRnGhciMonadLookupFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [GlobalRdrElt]))))) :+: ((C1 ('MetaCons "TcRnMissingRoleAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: C1 ('MetaCons "TcRnPatersonCondFailure" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PatersonCondFailure) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PatersonCondFailureContext)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)))) :+: (C1 ('MetaCons "TcRnImplicitRhsQuantification" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LocatedN RdrName))) :+: (C1 ('MetaCons "TcRnIllformedTypePattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcRn))) :+: C1 ('MetaCons "TcRnIllegalTypePattern" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "TcRnIllformedTypeArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LHsExpr GhcRn))) :+: C1 ('MetaCons "TcRnIllegalTypeExpr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TcRnInvalidDefaultedTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Ct]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(TcTyVar, Type)]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty TcTyVar)))) :+: (C1 ('MetaCons "TcRnNamespacedWarningPragmaWithoutFlag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WarnDecl GhcPs))) :+: C1 ('MetaCons "TcRnInvisPatWithNoForAll" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyPat GhcRn)))))) :+: ((C1 ('MetaCons "TcRnIllegalInvisibleTypePattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyPat GhcPs))) :+: C1 ('MetaCons "TcRnNamespacedFixitySigWithoutFlag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FixitySig GhcPs)))) :+: (C1 ('MetaCons "TcRnDefaultedExceptionContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CtLoc)) :+: (C1 ('MetaCons "TcRnOutOfArityTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "TcRnMisplacedInvisPat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HsTyPat GhcPs))))))))))))

type DiagnosticOpts TcRnMessage # |
Instance details Defined in GHC.Tc.Errors.Ppr type DiagnosticOpts TcRnMessage = TcRnMessageOpts

data TcRnMessageOpts #

Constructors

TcRnMessageOpts |

Fields

- tcOptsShowContext :: !Bool

  Whether we show the error context or not

- tcOptsIfaceOpts :: !IfaceMessageOpts

#### Instances

Instances details

HasDefaultDiagnosticOpts TcRnMessageOpts # |
Instance details Defined in GHC.Tc.Errors.Ppr Methods defaultOpts :: TcRnMessageOpts #

mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage #

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

- !ErrInfo

  Extra info associated with the message

- !TcRnMessage

#### Instances

Instances details

Generic TcRnMessageDetailed # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TcRnMessageDetailed |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcRnMessageDetailed = D1 ('MetaData "TcRnMessageDetailed" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TcRnMessageDetailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ErrInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcRnMessage)))

Methods

from :: TcRnMessageDetailed -> Rep TcRnMessageDetailed x #

to :: Rep TcRnMessageDetailed x -> TcRnMessageDetailed #

type Rep TcRnMessageDetailed # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcRnMessageDetailed = D1 ('MetaData "TcRnMessageDetailed" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TcRnMessageDetailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ErrInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcRnMessage)))

data TypeDataForbids #

Things forbidden in `type data` declarations. See Note [Type data declarations]

Constructors

TypeDataForbidsDatatypeContexts |
TypeDataForbidsLabelledFields |
TypeDataForbidsStrictnessAnnotations |
TypeDataForbidsDerivingClauses |

#### Instances

Instances details

Generic TypeDataForbids # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TypeDataForbids |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypeDataForbids = D1 ('MetaData "TypeDataForbids" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "TypeDataForbidsDatatypeContexts" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeDataForbidsLabelledFields" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeDataForbidsStrictnessAnnotations" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeDataForbidsDerivingClauses" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: TypeDataForbids -> Rep TypeDataForbids x #

to :: Rep TypeDataForbids x -> TypeDataForbids #

Outputable TypeDataForbids # |
Instance details Defined in GHC.Tc.Errors.Types Methods ppr :: TypeDataForbids -> SDoc #
type Rep TypeDataForbids # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypeDataForbids = D1 ('MetaData "TypeDataForbids" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "TypeDataForbidsDatatypeContexts" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeDataForbidsLabelledFields" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TypeDataForbidsStrictnessAnnotations" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeDataForbidsDerivingClauses" 'PrefixI 'False) (U1 :: Type -> Type)))

data ErrInfo #

Constructors

ErrInfo |

Fields

- errInfoContext :: !SDoc

  Extra context associated to the error.

- errInfoSupplementary :: !SDoc

  Extra supplementary info associated to the error.

data FixedRuntimeRepProvenance #

In what context did we require a type to have a fixed runtime representation?

Used by `checkTypeHasFixedRuntimeRep` for throwing representation polymorphism errors when validity checking.

See Note [Representation polymorphism checking] in GHC.Tc.Utils.Concrete

Constructors

FixedRuntimeRepDataConField | Data constructor fields must have a fixed runtime representation. Tests: T11734, T18534.
FixedRuntimeRepPatSynSigArg | Pattern synonym signature arguments must have a fixed runtime representation. Test: RepPolyPatSynArg.
FixedRuntimeRepPatSynSigRes | Pattern synonym signature scrutinee must have a fixed runtime representation. Test: RepPolyPatSynRes.

pprFixedRuntimeRepProvenance :: FixedRuntimeRepProvenance -> SDoc #

data ShadowedNameProvenance #

Where a shadowed name comes from

Constructors

ShadowedNameProvenanceLocal !SrcLoc | The shadowed name is local to the module
ShadowedNameProvenanceGlobal [GlobalRdrElt] | The shadowed name is global, typically imported from elsewhere.

data RecordFieldPart #

Which parts of a record field are affected by a particular error or warning.

Constructors

RecordFieldDecl !Name |
RecordFieldConstructor !Name |
RecordFieldPattern !Name |
RecordFieldUpdate |

data IllegalNewtypeReason #

Why the particular illegal newtype error arose together with more information, if any.

Constructors

DoesNotHaveSingleField !Int |
IsNonLinear |
IsGADT |
HasConstructorContext |
HasExistentialTyVar |
HasStrictnessAnnotation |

#### Instances

Instances details

Generic IllegalNewtypeReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalNewtypeReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalNewtypeReason = D1 ('MetaData "IllegalNewtypeReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "DoesNotHaveSingleField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "IsNonLinear" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IsGADT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "HasConstructorContext" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HasExistentialTyVar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HasStrictnessAnnotation" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: IllegalNewtypeReason -> Rep IllegalNewtypeReason x #

to :: Rep IllegalNewtypeReason x -> IllegalNewtypeReason #

type Rep IllegalNewtypeReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalNewtypeReason = D1 ('MetaData "IllegalNewtypeReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "DoesNotHaveSingleField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "IsNonLinear" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IsGADT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "HasConstructorContext" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HasExistentialTyVar" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HasStrictnessAnnotation" 'PrefixI 'False) (U1 :: Type -> Type))))

data BadRecordUpdateReason #

Why did we reject a record update?

Constructors

NoConstructorHasAllFields | No constructor has all of the required fields.

Fields

- conflictingFields :: [FieldLabelString]

MultiplePossibleParents | There are several possible parents which have all of the required fields, and we weren't able to disambiguate in any way.

Fields

- (RecSelParent, RecSelParent, [RecSelParent])

  The possible parents (at least 2)

InvalidTyConParent TyCon (NonEmpty RecSelParent) | We used type-directed disambiguation, but this resulted in an invalid parent (the type-directed parent is not among the parents we computed from the field labels alone).

#### Instances

Instances details

Generic BadRecordUpdateReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep BadRecordUpdateReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BadRecordUpdateReason = D1 ('MetaData "BadRecordUpdateReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "NoConstructorHasAllFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "conflictingFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FieldLabelString])) :+: (C1 ('MetaCons "MultiplePossibleParents" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RecSelParent, RecSelParent, [RecSelParent]))) :+: C1 ('MetaCons "InvalidTyConParent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty RecSelParent)))))

Methods

from :: BadRecordUpdateReason -> Rep BadRecordUpdateReason x #

to :: Rep BadRecordUpdateReason x -> BadRecordUpdateReason #

type Rep BadRecordUpdateReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BadRecordUpdateReason = D1 ('MetaData "BadRecordUpdateReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "NoConstructorHasAllFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "conflictingFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FieldLabelString])) :+: (C1 ('MetaCons "MultiplePossibleParents" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RecSelParent, RecSelParent, [RecSelParent]))) :+: C1 ('MetaCons "InvalidTyConParent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty RecSelParent)))))

data InjectivityErrReason #

Why the particular injectivity error arose together with more information, if any.

Constructors

InjErrRhsBareTyVar [Type] |
InjErrRhsCannotBeATypeFam |
InjErrRhsOverlap |
InjErrCannotInferFromRhs !TyVarSet !HasKinds !SuggestUndecidableInstances |

data HasKinds #

Constructors

YesHasKinds |
NoHasKinds |

#### Instances

Instances details

Show HasKinds # |
Instance details Defined in GHC.Tc.Errors.Types Methods showsPrec :: Int -> HasKinds -> ShowS # show :: HasKinds -> String # showList :: [HasKinds] -> ShowS #
Eq HasKinds # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: HasKinds -> HasKinds -> Bool # (/=) :: HasKinds -> HasKinds -> Bool #

hasKinds :: Bool -> HasKinds #

data SuggestUndecidableInstances #

Constructors

YesSuggestUndecidableInstaces |
NoSuggestUndecidableInstaces |

#### Instances

Instances details

Show SuggestUndecidableInstances # |
Instance details Defined in GHC.Tc.Errors.Types Methods showsPrec :: Int -> SuggestUndecidableInstances -> ShowS # show :: SuggestUndecidableInstances -> String # showList :: [SuggestUndecidableInstances] -> ShowS #
Eq SuggestUndecidableInstances # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: SuggestUndecidableInstances -> SuggestUndecidableInstances -> Bool # (/=) :: SuggestUndecidableInstances -> SuggestUndecidableInstances -> Bool #

suggestUndecidableInstances :: Bool -> SuggestUndecidableInstances #

data SuggestUnliftedTypes #

Constructors

SuggestUnliftedNewtypes |
SuggestUnliftedDatatypes |

data DataSort #

A description of whether something is a

- `data` or `newtype` (`DataDeclSort`)
- `data instance` or `newtype instance` (`DataInstanceSort`)
- `data family` (`DataFamilySort`)

At present, this data type is only consumed by `checkDataKindSig`.

Constructors

DataDeclSort NewOrData |
DataInstanceSort NewOrData |
DataFamilySort |

ppDataSort :: DataSort -> SDoc #

data AllowedDataResKind #

Helper type used in `checkDataKindSig`.

Superficially similar to `ContextKind`, but it lacks `AnyKind` and `AnyBoxedKind`, and instead of ``TheKind` liftedTypeKind` provides `LiftedKind`, which is much simpler to match on and handle in `isAllowedDataResKind`.

Constructors

AnyTYPEKind |
AnyBoxedKind |
LiftedKind |

data NotClosedReason #

A data type to describe why a variable is not closed. See Note [Not-closed error messages] in GHC.Tc.Gen.Expr

Constructors

NotLetBoundReason |
NotTypeClosed VarSet |
NotClosed Name NotClosedReason |

data SuggestPartialTypeSignatures #

Constructors

YesSuggestPartialTypeSignatures |
NoSuggestPartialTypeSignatures |

#### Instances

Instances details

Show SuggestPartialTypeSignatures # |
Instance details Defined in GHC.Tc.Errors.Types Methods showsPrec :: Int -> SuggestPartialTypeSignatures -> ShowS # show :: SuggestPartialTypeSignatures -> String # showList :: [SuggestPartialTypeSignatures] -> ShowS #
Eq SuggestPartialTypeSignatures # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: SuggestPartialTypeSignatures -> SuggestPartialTypeSignatures -> Bool # (/=) :: SuggestPartialTypeSignatures -> SuggestPartialTypeSignatures -> Bool #

suggestPartialTypeSignatures :: Bool -> SuggestPartialTypeSignatures #

data DeriveInstanceErrReason #

Why a particular typeclass instance couldn't be derived.

Constructors

DerivErrNotWellKinded | The typeclass instance is not well-kinded.

Fields

- !TyCon

  The type constructor that occurs in the typeclass instance declaration.

- !Kind

  The typeclass kind.

- !Int

  The number of typeclass arguments that GHC kept. See Note [tc_args and tycon arity] in GHC.Tc.Deriv. | Generic instances can only be derived using the stock strategy in Safe Haskell.

DerivErrSafeHaskellGenericInst |
DerivErrDerivingViaWrongKind !Kind !Type !Kind |
DerivErrNoEtaReduce !Type | The instance type | We cannot derive instances in boot files
DerivErrBootFileFound |
DerivErrDataConsNotAllInScope !TyCon |
DerivErrGNDUsedOnData | We cannot use GND on non-newtype types
DerivErrNullaryClasses | We cannot derive instances of nullary classes
DerivErrLastArgMustBeApp | Last arg must be newtype or data application
DerivErrNoFamilyInstance !TyCon [Type] |
DerivErrNotStockDeriveable !DeriveAnyClassEnabled |
DerivErrHasAssociatedDatatypes !HasAssociatedDataFamInsts !AssociatedTyLastVarInKind !AssociatedTyNotParamOverLastTyVar |
DerivErrNewtypeNonDeriveableClass |
DerivErrCannotEtaReduceEnough !Bool |
DerivErrOnlyAnyClassDeriveable |

Fields

- !TyCon

  Type constructor for which the instance is requested

- !DeriveAnyClassEnabled

  Whether or not -XDeriveAnyClass is enabled already. | Stock deriving won't work, but perhaps DeriveAnyClass will.

DerivErrNotDeriveable !DeriveAnyClassEnabled |
DerivErrNotAClass !PredType | The given `PredType` is not a class.
DerivErrNoConstructors !TyCon | The given (representation of the) `TyCon` has no data constructors.
DerivErrLangExtRequired !Extension |
DerivErrDunnoHowToDeriveForType !Type | GHC simply doesn't how to how derive the input `Class` for the given `Type`.
DerivErrMustBeEnumType !TyCon | The given `TyCon` must be an enumeration. See Note [Enumeration types] in GHC.Core.TyCon
DerivErrMustHaveExactlyOneConstructor !TyCon | The given `TyCon` must have precisely one constructor.
DerivErrMustHaveSomeParameters !TyCon | The given data type must have some parameters.
DerivErrMustNotHaveClassContext !TyCon !ThetaType | The given data type must not have a class context.
DerivErrBadConstructor !(Maybe HasWildcard) [DeriveInstanceBadConstructor] | We couldn't derive an instance for a particular data constructor for a variety of reasons.
DerivErrGenerics [DeriveGenericsErrReason] | We couldn't derive a `Generic` instance for the given type for a variety of reasons
DerivErrEnumOrProduct !DeriveInstanceErrReason !DeriveInstanceErrReason | We couldn't derive an instance either because the type was not an enum type or because it did have more than one constructor.

#### Instances

Instances details

Generic DeriveInstanceErrReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep DeriveInstanceErrReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep DeriveInstanceErrReason = D1 ('MetaData "DeriveInstanceErrReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((((C1 ('MetaCons "DerivErrNotWellKinded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "DerivErrSafeHaskellGenericInst" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivErrDerivingViaWrongKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind))))) :+: (C1 ('MetaCons "DerivErrNoEtaReduce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "DerivErrBootFileFound" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivErrDataConsNotAllInScope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))))) :+: ((C1 ('MetaCons "DerivErrGNDUsedOnData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DerivErrNullaryClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivErrLastArgMustBeApp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DerivErrNoFamilyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type])) :+: C1 ('MetaCons "DerivErrNotStockDeriveable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveAnyClassEnabled))) :+: (C1 ('MetaCons "DerivErrHasAssociatedDatatypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HasAssociatedDataFamInsts) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AssociatedTyLastVarInKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AssociatedTyNotParamOverLastTyVar))) :+: C1 ('MetaCons "DerivErrNewtypeNonDeriveableClass" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DerivErrCannotEtaReduceEnough" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: (C1 ('MetaCons "DerivErrOnlyAnyClassDeriveable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveAnyClassEnabled)) :+: C1 ('MetaCons "DerivErrNotDeriveable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveAnyClassEnabled)))) :+: ((C1 ('MetaCons "DerivErrNotAClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PredType)) :+: C1 ('MetaCons "DerivErrNoConstructors" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "DerivErrLangExtRequired" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Extension)) :+: C1 ('MetaCons "DerivErrDunnoHowToDeriveForType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))) :+: ((C1 ('MetaCons "DerivErrMustBeEnumType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: (C1 ('MetaCons "DerivErrMustHaveExactlyOneConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "DerivErrMustHaveSomeParameters" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)))) :+: ((C1 ('MetaCons "DerivErrMustNotHaveClassContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ThetaType)) :+: C1 ('MetaCons "DerivErrBadConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HasWildcard)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeriveInstanceBadConstructor]))) :+: (C1 ('MetaCons "DerivErrGenerics" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeriveGenericsErrReason])) :+: C1 ('MetaCons "DerivErrEnumOrProduct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveInstanceErrReason) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveInstanceErrReason)))))))

Methods

from :: DeriveInstanceErrReason -> Rep DeriveInstanceErrReason x #

to :: Rep DeriveInstanceErrReason x -> DeriveInstanceErrReason #

type Rep DeriveInstanceErrReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep DeriveInstanceErrReason = D1 ('MetaData "DeriveInstanceErrReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((((C1 ('MetaCons "DerivErrNotWellKinded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :+: (C1 ('MetaCons "DerivErrSafeHaskellGenericInst" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivErrDerivingViaWrongKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Kind))))) :+: (C1 ('MetaCons "DerivErrNoEtaReduce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: (C1 ('MetaCons "DerivErrBootFileFound" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivErrDataConsNotAllInScope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))))) :+: ((C1 ('MetaCons "DerivErrGNDUsedOnData" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DerivErrNullaryClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivErrLastArgMustBeApp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DerivErrNoFamilyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type])) :+: C1 ('MetaCons "DerivErrNotStockDeriveable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveAnyClassEnabled))) :+: (C1 ('MetaCons "DerivErrHasAssociatedDatatypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HasAssociatedDataFamInsts) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AssociatedTyLastVarInKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AssociatedTyNotParamOverLastTyVar))) :+: C1 ('MetaCons "DerivErrNewtypeNonDeriveableClass" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DerivErrCannotEtaReduceEnough" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: (C1 ('MetaCons "DerivErrOnlyAnyClassDeriveable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveAnyClassEnabled)) :+: C1 ('MetaCons "DerivErrNotDeriveable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveAnyClassEnabled)))) :+: ((C1 ('MetaCons "DerivErrNotAClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PredType)) :+: C1 ('MetaCons "DerivErrNoConstructors" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "DerivErrLangExtRequired" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Extension)) :+: C1 ('MetaCons "DerivErrDunnoHowToDeriveForType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))) :+: ((C1 ('MetaCons "DerivErrMustBeEnumType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: (C1 ('MetaCons "DerivErrMustHaveExactlyOneConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "DerivErrMustHaveSomeParameters" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)))) :+: ((C1 ('MetaCons "DerivErrMustNotHaveClassContext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ThetaType)) :+: C1 ('MetaCons "DerivErrBadConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe HasWildcard)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeriveInstanceBadConstructor]))) :+: (C1 ('MetaCons "DerivErrGenerics" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DeriveGenericsErrReason])) :+: C1 ('MetaCons "DerivErrEnumOrProduct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveInstanceErrReason) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeriveInstanceErrReason)))))))

data UsingGeneralizedNewtypeDeriving #

Constructors

YesGeneralizedNewtypeDeriving |
NoGeneralizedNewtypeDeriving |

#### Instances

Instances details

Eq UsingGeneralizedNewtypeDeriving # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: UsingGeneralizedNewtypeDeriving -> UsingGeneralizedNewtypeDeriving -> Bool # (/=) :: UsingGeneralizedNewtypeDeriving -> UsingGeneralizedNewtypeDeriving -> Bool #

usingGeneralizedNewtypeDeriving :: Bool -> UsingGeneralizedNewtypeDeriving #

data DeriveAnyClassEnabled #

Constructors

YesDeriveAnyClassEnabled |
NoDeriveAnyClassEnabled |

#### Instances

Instances details

Eq DeriveAnyClassEnabled # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: DeriveAnyClassEnabled -> DeriveAnyClassEnabled -> Bool # (/=) :: DeriveAnyClassEnabled -> DeriveAnyClassEnabled -> Bool #

deriveAnyClassEnabled :: Bool -> DeriveAnyClassEnabled #

data DeriveInstanceBadConstructor #

Constructors

DerivErrBadConExistential !DataCon | The given `DataCon` must be truly polymorphic in the last argument of the data type.
DerivErrBadConCovariant !DataCon | The given `DataCon` must not use the type variable in a function argument"
DerivErrBadConFunTypes !DataCon | The given `DataCon` must not contain function types
DerivErrBadConWrongArg !DataCon | The given `DataCon` must use the type variable only as the last argument of a data type
DerivErrBadConIsGADT !DataCon | The given `DataCon` is a GADT so we cannot directly derive an istance for it.
DerivErrBadConHasExistentials !DataCon | The given `DataCon` has existentials type vars in its type.
DerivErrBadConHasConstraints !DataCon | The given `DataCon` has constraints in its type.
DerivErrBadConHasHigherRankType !DataCon | The given `DataCon` has a higher-rank type.

data HasWildcard #

Constructors

YesHasWildcard |
NoHasWildcard |

#### Instances

Instances details

Eq HasWildcard # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: HasWildcard -> HasWildcard -> Bool # (/=) :: HasWildcard -> HasWildcard -> Bool #

hasWildcard :: Bool -> HasWildcard #

data BadAnonWildcardContext #

A context in which we don't allow anonymous wildcards.

Constructors

WildcardNotLastInConstraint |
ExtraConstraintWildcardNotAllowed SoleExtraConstraintWildcardAllowed |
WildcardsNotAllowedAtAll |

data SoleExtraConstraintWildcardAllowed #

Whether a sole extra-constraint wildcard is allowed, e.g. `_ => ..` as opposed to `( .., _ ) => ..`.

Constructors

SoleExtraConstraintWildcardNotAllowed |
SoleExtraConstraintWildcardAllowed |

data DeriveGenericsErrReason #

Constructors

DerivErrGenericsMustNotHaveDatatypeContext !TyCon | The type must not have some datatype context.
DerivErrGenericsMustNotHaveExoticArgs !DataCon | The data constructor must not have exotic unlifted or polymorphic arguments.
DerivErrGenericsMustBeVanillaDataCon !DataCon | The data constructor must be a vanilla constructor.
DerivErrGenericsMustHaveSomeTypeParams !TyCon | The type must have some type parameters. check (d) from Note [Requirements for deriving Generic and Rep] in GHC.Tc.Deriv.Generics.
DerivErrGenericsMustNotHaveExistentials !DataCon | The data constructor must not have existential arguments.
DerivErrGenericsWrongArgKind !DataCon | The derivation applies a type to an argument involving the last parameter but the applied type is not of kind * -> *.

data HasAssociatedDataFamInsts #

A type representing whether or not the input type has associated data family instances.

Constructors

YesHasAdfs |
NoHasAdfs |

#### Instances

Instances details

Eq HasAssociatedDataFamInsts # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: HasAssociatedDataFamInsts -> HasAssociatedDataFamInsts -> Bool # (/=) :: HasAssociatedDataFamInsts -> HasAssociatedDataFamInsts -> Bool #

hasAssociatedDataFamInsts :: Bool -> HasAssociatedDataFamInsts #

data AssociatedTyLastVarInKind #

If `YesAssocTyLastVarInKind`, the associated type of a typeclass contains the last type variable of the class in a kind, which is not (yet) allowed by GHC.

Constructors

YesAssocTyLastVarInKind !TyCon | The associated type family of the class
NoAssocTyLastVarInKind |

#### Instances

Instances details

Eq AssociatedTyLastVarInKind # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: AssociatedTyLastVarInKind -> AssociatedTyLastVarInKind -> Bool # (/=) :: AssociatedTyLastVarInKind -> AssociatedTyLastVarInKind -> Bool #

associatedTyLastVarInKind :: Maybe TyCon -> AssociatedTyLastVarInKind #

data AssociatedTyNotParamOverLastTyVar #

If `NoAssociatedTyNotParamOverLastTyVar`, the associated type of a typeclass is not parameterized over the last type variable of the class

Constructors

YesAssociatedTyNotParamOverLastTyVar !TyCon | The associated type family of the class
NoAssociatedTyNotParamOverLastTyVar |

#### Instances

Instances details

Eq AssociatedTyNotParamOverLastTyVar # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: AssociatedTyNotParamOverLastTyVar -> AssociatedTyNotParamOverLastTyVar -> Bool # (/=) :: AssociatedTyNotParamOverLastTyVar -> AssociatedTyNotParamOverLastTyVar -> Bool #

associatedTyNotParamOverLastTyVar :: Maybe TyCon -> AssociatedTyNotParamOverLastTyVar #

data MissingSignature #

What kind of thing is missing a type signature?

Used for reporting `"missing signature"` warnings, see `tcRnMissingSignature`.

Constructors

MissingTopLevelBindingSig Name Type |
MissingPatSynSig PatSyn |
MissingTyConKindSig TyCon Bool | whether -XCUSKs is enabled

data Exported #

Is the object we are dealing with exported or not?

Used for reporting `"missing signature"` warnings, see `TcRnMissingSignature`.

Constructors

IsNotExported |
IsExported |

#### Instances

Instances details

Outputable Exported # |
Instance details Defined in GHC.Tc.Errors.Types Methods ppr :: Exported -> SDoc #
Eq Exported # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: Exported -> Exported -> Bool # (/=) :: Exported -> Exported -> Bool #

data HsDocContext #

Constructors

TypeSigCtx SDoc |
StandaloneKindSigCtx SDoc |
PatCtx |
SpecInstSigCtx |
DefaultDeclCtx |
ForeignDeclCtx (LocatedN RdrName) |
DerivDeclCtx |
RuleCtx FastString |
TyDataCtx (LocatedN RdrName) |
TySynCtx (LocatedN RdrName) |
TyFamilyCtx (LocatedN RdrName) |
FamPatCtx (LocatedN RdrName) |
ConDeclCtx [LocatedN Name] |
ClassDeclCtx (LocatedN RdrName) |
ExprWithTySigCtx |
TypBrCtx |
HsTypeCtx |
HsTypePatCtx |
GHCiCtx |
SpliceTypeCtx (LHsType GhcPs) |
ClassInstanceCtx |
GenericCtx SDoc |

data FixedRuntimeRepErrorInfo #

Stores the information to be reported in a representation-polymorphism error message.

Constructors

FRR_Info |

Fields

- frr_info_origin :: FixedRuntimeRepOrigin

  What is the original type we checked for representation-polymorphism, and what specific check did we perform?

- frr_info_not_concrete :: Maybe (TcTyVar, TcType)

  Which non-concrete type did we try to unify this concrete type variable with?

data ErrorItem #

A predicate with its arising location; used to encapsulate a constraint that will give rise to a diagnostic.

Constructors

EI |

Fields

- ei_pred :: PredType
- ei_evdest :: Maybe TcEvDest

  for Wanteds, where to put the evidence for Givens, Nothing

- ei_flavour :: CtFlavour
- ei_loc :: CtLoc
- ei_m_reason :: Maybe CtIrredReason
- ei_suppress :: Bool

#### Instances

Instances details

Outputable ErrorItem # |
Instance details Defined in GHC.Tc.Errors.Types Methods ppr :: ErrorItem -> SDoc #

errorItemOrigin :: ErrorItem -> CtOrigin #

errorItemEqRel :: ErrorItem -> EqRel #

errorItemPred :: ErrorItem -> PredType #

errorItemCtLoc :: ErrorItem -> CtLoc #

data SolverReport #

A collection of main error messages and supplementary information.

In practice, we will: - display the important messages first, - then the error context (e.g. by way of a call to `mkErrorReport`), - then the supplementary information (e.g. relevant bindings, valid hole fits), - then the hints ("Possible fix: ...").

So this is mostly just a way of making sure that the error context appears early on rather than at the end of the message.

See Note [Error report] for details.

Constructors

SolverReport |

Fields

- sr_important_msg :: SolverReportWithCtxt
- sr_supplementary :: [SolverReportSupplementary]

data SolverReportSupplementary #

Additional information to print in a `SolverReport`, after the important messages and after the error context.

See Note [Error report].

Constructors

SupplementaryBindings RelevantBindings |
SupplementaryHoleFits ValidHoleFits |
SupplementaryCts [(PredType, RealSrcSpan)] |

data SolverReportWithCtxt #

A `TcSolverReportMsg`, together with context (e.g. enclosing implication constraints) that are needed in order to report it.

Constructors

SolverReportWithCtxt |

Fields

- reportContext :: SolverReportErrCtxt

  Context for what we wish to report. This can change as we enter implications, so is stored alongside the content.

- reportContent :: TcSolverReportMsg

  The content of the message to report.

#### Instances

Instances details

Generic SolverReportWithCtxt # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep SolverReportWithCtxt |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep SolverReportWithCtxt = D1 ('MetaData "SolverReportWithCtxt" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "SolverReportWithCtxt" 'PrefixI 'True) (S1 ('MetaSel ('Just "reportContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SolverReportErrCtxt) :*: S1 ('MetaSel ('Just "reportContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcSolverReportMsg)))

Methods

from :: SolverReportWithCtxt -> Rep SolverReportWithCtxt x #

to :: Rep SolverReportWithCtxt x -> SolverReportWithCtxt #

type Rep SolverReportWithCtxt # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep SolverReportWithCtxt = D1 ('MetaData "SolverReportWithCtxt" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "SolverReportWithCtxt" 'PrefixI 'True) (S1 ('MetaSel ('Just "reportContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SolverReportErrCtxt) :*: S1 ('MetaSel ('Just "reportContent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcSolverReportMsg)))

data SolverReportErrCtxt #

Context needed when reporting a `TcSolverReportMsg`, such as the enclosing implication constraints or whether we are deferring type errors.

Constructors

CEC |

Fields

- cec_encl :: [Implication]

  Enclosing implications (innermost first) ic_skols and givens are tidied, rest are not

- cec_tidy :: TidyEnv
- cec_binds :: EvBindsVar

  We make some errors (depending on cec_defer) into warnings, and emit evidence bindings into `cec_binds` for unsolved constraints

- cec_defer_type_errors :: DiagnosticReason

  Whether to defer type errors until runtime

- cec_expr_holes :: DiagnosticReason

  Reason for reporting holes in expressions.

- cec_type_holes :: DiagnosticReason

  Reason for reporting holes in types.

- cec_out_of_scope_holes :: DiagnosticReason

  Reason for reporting out of scope holes.

- cec_warn_redundant :: Bool

  True = -Wredundant-constraints

- cec_expand_syns :: Bool

  True = -fprint-expanded-synonyms

- cec_suppress :: Bool

  True = More important errors have occurred, so create bindings if need be, but don't issue any more errors/warnings See Note [Suppressing error messages]

#### Instances

Instances details

Outputable SolverReportErrCtxt # |
Instance details Defined in GHC.Tc.Errors.Ppr Methods ppr :: SolverReportErrCtxt -> SDoc #

getUserGivens :: SolverReportErrCtxt -> [UserGiven] #

discardProvCtxtGivens :: CtOrigin -> [UserGiven] -> [UserGiven] #

data TcSolverReportMsg #

An error reported after constraint solving. This is usually, some sort of unsolved constraint error, but we try to be specific about the precise problem we encountered.

Constructors

BadTelescope TyVarBndrs [TyCoVar] | Quantified variables appear out of dependency order. Example: forall (a :: k) k. ... Test cases: BadTelescope2, T16418, T16247, T16726, T18451.
UserTypeError | We came across a custom type error and we have decided to report it. Example: type family F a where F a = TypeError (Text "error") err :: F () err = () Test cases: CustomTypeErrors0{1,2,3,4,5}, T12104.

Fields

- ErrorMsgType

  the message to report

UnsatisfiableError | Report a Wanted constraint of the form "Unsatisfiable msg".

Fields

- ErrorMsgType

  the message to report

ReportHoleError Hole HoleError | We want to report an out of scope variable or a typed hole. See `HoleError`.
CannotUnifyVariable | Cannot unify a variable, because of a type mismatch.

Fields

- mismatchMsg :: MismatchMsg
- cannotUnifyReason :: CannotUnifyVariableReason

Mismatch | A mismatch between two types.

Fields

- mismatchMsg :: MismatchMsg
- mismatchTyVarInfo :: Maybe TyVarInfo
- mismatchAmbiguityInfo :: [AmbiguityInfo]
- mismatchCoercibleInfo :: Maybe CoercibleMsg

FixedRuntimeRepError [FixedRuntimeRepErrorInfo] | A violation of the representation-polymorphism invariants. See `FixedRuntimeRepErrorInfo` and `FixedRuntimeRepContext` for more information.
BlockedEquality ErrorItem | An equality between two types is blocked on a kind equality between their kinds. Test cases: none.
ExpectingMoreArguments Int TypedThing | Something was not applied to sufficiently many arguments. Example: instance Eq Maybe where {..} Test case: T11563.
UnboundImplicitParams (NonEmpty ErrorItem) | Trying to use an unbound implicit parameter. Example: foo :: Int foo = ?param Test case: tcfail130.
AmbiguityPreventsSolvingCt | A constraint couldn't be solved because it contains ambiguous type variables. Example: class C a b where f :: (a,b) x = fst f Test case: T4921.

Fields

- ErrorItem

  always a class constraint

- ([TyVar], [TyVar])

  ambiguous kind and type variables, respectively

CannotResolveInstance | Could not solve a constraint; there were several unifying candidate instances but no matching instances. This is used to report as much useful information as possible about why we couldn't choose any instance, e.g. because of ambiguous type variables.

Fields

- cannotResolve_item :: ErrorItem
- cannotResolve_unifiers :: [ClsInst]
- cannotResolve_candidates :: [ClsInst]
- cannotResolve_importErrors :: [ImportError]
- cannotResolve_suggestions :: [GhcHint]
- cannotResolve_relevant_bindings :: RelevantBindings

OverlappingInstances | Could not solve a constraint using available instances because the instances overlap. Test cases: tcfail118, tcfail121, tcfail218.

Fields

- overlappingInstances_item :: ErrorItem
- overlappingInstances_matches :: NonEmpty ClsInst
- overlappingInstances_unifiers :: [ClsInst]

UnsafeOverlap | Could not solve a constraint from instances because instances declared in a Safe module cannot overlap instances from other modules (with -XSafeHaskell). Test cases: SH_Overlap{1,2,5,6,7,11}.

Fields

- unsafeOverlap_item :: ErrorItem
- unsafeOverlap_match :: ClsInst
- unsafeOverlapped :: NonEmpty ClsInst

#### Instances

Instances details

Generic TcSolverReportMsg # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TcSolverReportMsg |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcSolverReportMsg = D1 ('MetaData "TcSolverReportMsg" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "BadTelescope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVarBndrs) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyCoVar])) :+: (C1 ('MetaCons "UserTypeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorMsgType)) :+: C1 ('MetaCons "UnsatisfiableError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorMsgType)))) :+: ((C1 ('MetaCons "ReportHoleError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hole) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HoleError)) :+: C1 ('MetaCons "CannotUnifyVariable" 'PrefixI 'True) (S1 ('MetaSel ('Just "mismatchMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MismatchMsg) :*: S1 ('MetaSel ('Just "cannotUnifyReason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CannotUnifyVariableReason))) :+: (C1 ('MetaCons "Mismatch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mismatchMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MismatchMsg) :*: S1 ('MetaSel ('Just "mismatchTyVarInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TyVarInfo))) :*: (S1 ('MetaSel ('Just "mismatchAmbiguityInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AmbiguityInfo]) :*: S1 ('MetaSel ('Just "mismatchCoercibleInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CoercibleMsg)))) :+: C1 ('MetaCons "FixedRuntimeRepError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FixedRuntimeRepErrorInfo]))))) :+: ((C1 ('MetaCons "BlockedEquality" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem)) :+: (C1 ('MetaCons "ExpectingMoreArguments" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypedThing)) :+: C1 ('MetaCons "UnboundImplicitParams" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ErrorItem))))) :+: ((C1 ('MetaCons "AmbiguityPreventsSolvingCt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ([TyVar], [TyVar]))) :+: C1 ('MetaCons "CannotResolveInstance" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cannotResolve_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Just "cannotResolve_unifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClsInst]) :*: S1 ('MetaSel ('Just "cannotResolve_candidates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClsInst]))) :*: (S1 ('MetaSel ('Just "cannotResolve_importErrors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ImportError]) :*: (S1 ('MetaSel ('Just "cannotResolve_suggestions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint]) :*: S1 ('MetaSel ('Just "cannotResolve_relevant_bindings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelevantBindings))))) :+: (C1 ('MetaCons "OverlappingInstances" 'PrefixI 'True) (S1 ('MetaSel ('Just "overlappingInstances_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Just "overlappingInstances_matches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ClsInst)) :*: S1 ('MetaSel ('Just "overlappingInstances_unifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClsInst]))) :+: C1 ('MetaCons "UnsafeOverlap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unsafeOverlap_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Just "unsafeOverlap_match") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClsInst) :*: S1 ('MetaSel ('Just "unsafeOverlapped") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ClsInst))))))))

Methods

from :: TcSolverReportMsg -> Rep TcSolverReportMsg x #

to :: Rep TcSolverReportMsg x -> TcSolverReportMsg #

type Rep TcSolverReportMsg # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TcSolverReportMsg = D1 ('MetaData "TcSolverReportMsg" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "BadTelescope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVarBndrs) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyCoVar])) :+: (C1 ('MetaCons "UserTypeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorMsgType)) :+: C1 ('MetaCons "UnsatisfiableError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorMsgType)))) :+: ((C1 ('MetaCons "ReportHoleError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hole) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HoleError)) :+: C1 ('MetaCons "CannotUnifyVariable" 'PrefixI 'True) (S1 ('MetaSel ('Just "mismatchMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MismatchMsg) :*: S1 ('MetaSel ('Just "cannotUnifyReason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CannotUnifyVariableReason))) :+: (C1 ('MetaCons "Mismatch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mismatchMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MismatchMsg) :*: S1 ('MetaSel ('Just "mismatchTyVarInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TyVarInfo))) :*: (S1 ('MetaSel ('Just "mismatchAmbiguityInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AmbiguityInfo]) :*: S1 ('MetaSel ('Just "mismatchCoercibleInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CoercibleMsg)))) :+: C1 ('MetaCons "FixedRuntimeRepError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FixedRuntimeRepErrorInfo]))))) :+: ((C1 ('MetaCons "BlockedEquality" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem)) :+: (C1 ('MetaCons "ExpectingMoreArguments" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypedThing)) :+: C1 ('MetaCons "UnboundImplicitParams" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ErrorItem))))) :+: ((C1 ('MetaCons "AmbiguityPreventsSolvingCt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ([TyVar], [TyVar]))) :+: C1 ('MetaCons "CannotResolveInstance" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cannotResolve_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Just "cannotResolve_unifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClsInst]) :*: S1 ('MetaSel ('Just "cannotResolve_candidates") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClsInst]))) :*: (S1 ('MetaSel ('Just "cannotResolve_importErrors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ImportError]) :*: (S1 ('MetaSel ('Just "cannotResolve_suggestions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint]) :*: S1 ('MetaSel ('Just "cannotResolve_relevant_bindings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RelevantBindings))))) :+: (C1 ('MetaCons "OverlappingInstances" 'PrefixI 'True) (S1 ('MetaSel ('Just "overlappingInstances_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Just "overlappingInstances_matches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ClsInst)) :*: S1 ('MetaSel ('Just "overlappingInstances_unifiers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ClsInst]))) :+: C1 ('MetaCons "UnsafeOverlap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unsafeOverlap_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Just "unsafeOverlap_match") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClsInst) :*: S1 ('MetaSel ('Just "unsafeOverlapped") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ClsInst))))))))

data CannotUnifyVariableReason #

Constructors

CannotUnifyWithPolytype ErrorItem TyVar Type (Maybe TyVarInfo) | A type equality between a type variable and a polytype. Test cases: T12427a, T2846b, T10194, ...
OccursCheck | An occurs check.

Fields

- occursCheckInterestingTyVars :: [TyVar]
- occursCheckAmbiguityInfos :: [AmbiguityInfo]

SkolemEscape ErrorItem Implication [TyVar] | A skolem type variable escapes its scope. Example: data Ex where { MkEx :: a -> MkEx } foo (MkEx x) = x Test cases: TypeSkolEscape, T11142.
DifferentTyVars TyVarInfo | Can't unify the type variable with the other type due to the kind of type variable it is. For example, trying to unify a `SkolemTv` with the type Int, or with a `TyVarTv`.
RepresentationalEq TyVarInfo (Maybe CoercibleMsg) |

#### Instances

Instances details

Generic CannotUnifyVariableReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep CannotUnifyVariableReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep CannotUnifyVariableReason = D1 ('MetaData "CannotUnifyVariableReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "CannotUnifyWithPolytype" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVar)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TyVarInfo)))) :+: C1 ('MetaCons "OccursCheck" 'PrefixI 'True) (S1 ('MetaSel ('Just "occursCheckInterestingTyVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVar]) :*: S1 ('MetaSel ('Just "occursCheckAmbiguityInfos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AmbiguityInfo]))) :+: (C1 ('MetaCons "SkolemEscape" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Implication) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVar]))) :+: (C1 ('MetaCons "DifferentTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVarInfo)) :+: C1 ('MetaCons "RepresentationalEq" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVarInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CoercibleMsg))))))

Methods

from :: CannotUnifyVariableReason -> Rep CannotUnifyVariableReason x #

to :: Rep CannotUnifyVariableReason x -> CannotUnifyVariableReason #

type Rep CannotUnifyVariableReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep CannotUnifyVariableReason = D1 ('MetaData "CannotUnifyVariableReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "CannotUnifyWithPolytype" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVar)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TyVarInfo)))) :+: C1 ('MetaCons "OccursCheck" 'PrefixI 'True) (S1 ('MetaSel ('Just "occursCheckInterestingTyVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVar]) :*: S1 ('MetaSel ('Just "occursCheckAmbiguityInfos") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [AmbiguityInfo]))) :+: (C1 ('MetaCons "SkolemEscape" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Implication) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TyVar]))) :+: (C1 ('MetaCons "DifferentTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVarInfo)) :+: C1 ('MetaCons "RepresentationalEq" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyVarInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CoercibleMsg))))))

data MismatchMsg #

Constructors

BasicMismatch | Couldn't unify two types or kinds. Example: 3 + 3# -- can't match a lifted type with an unlifted type Test cases: T1396, T8263, ...

Fields

- mismatch_ea :: MismatchEA

  Should this be phrased in terms of expected vs actual?

- mismatch_item :: ErrorItem

  The constraint in which the mismatch originated.

- mismatch_ty1 :: Type

  First type (the expected type if if mismatch_ea is True)

- mismatch_ty2 :: Type

  Second type (the actual type if mismatch_ea is True)

- mismatch_whenMatching :: Maybe WhenMatching
- mismatch_mb_same_occ :: Maybe SameOccInfo

KindMismatch | A type has an unexpected kind. Test cases: T2994, T7609, ...

Fields

- kmismatch_what :: TypedThing

  What thing is `kmismatch_actual` the kind of?

- kmismatch_expected :: Type
- kmismatch_actual :: Type

TypeEqMismatch | A mismatch between two types, which arose from a type equality. Test cases: T1470, tcfail212.

Fields

- teq_mismatch_ppr_explicit_kinds :: Bool
- teq_mismatch_item :: ErrorItem
- teq_mismatch_ty1 :: Type
- teq_mismatch_ty2 :: Type
- teq_mismatch_expected :: Type

  The overall expected type

- teq_mismatch_actual :: Type

  The overall actual type

- teq_mismatch_what :: Maybe TypedThing

  What thing is `teq_mismatch_actual` the kind of?

- teq_mb_same_occ :: Maybe SameOccInfo

CouldNotDeduce | Couldn't solve some Wanted constraints using the Givens. Used for messages such as `"No instance for ..."` and `"Could not deduce ... from"`.

Fields

- cnd_user_givens :: [Implication]
- cnd_wanted :: NonEmpty ErrorItem

  The Wanted constraints we couldn't solve.

  N.B.: the `ErrorItem` at the head of the list has been tidied, perhaps not the others.

- cnd_extra :: Maybe CND_Extra

  Some additional info consumed by `mk_supplementary_ea_msg`.

#### Instances

Instances details

Generic MismatchMsg # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep MismatchMsg |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep MismatchMsg = D1 ('MetaData "MismatchMsg" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "BasicMismatch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mismatch_ea") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MismatchEA) :*: (S1 ('MetaSel ('Just "mismatch_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: S1 ('MetaSel ('Just "mismatch_ty1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :*: (S1 ('MetaSel ('Just "mismatch_ty2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: (S1 ('MetaSel ('Just "mismatch_whenMatching") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe WhenMatching)) :*: S1 ('MetaSel ('Just "mismatch_mb_same_occ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SameOccInfo))))) :+: C1 ('MetaCons "KindMismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "kmismatch_what") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypedThing) :*: (S1 ('MetaSel ('Just "kmismatch_expected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "kmismatch_actual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)))) :+: (C1 ('MetaCons "TypeEqMismatch" 'PrefixI 'True) (((S1 ('MetaSel ('Just "teq_mismatch_ppr_explicit_kinds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "teq_mismatch_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem)) :*: (S1 ('MetaSel ('Just "teq_mismatch_ty1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "teq_mismatch_ty2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :*: ((S1 ('MetaSel ('Just "teq_mismatch_expected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "teq_mismatch_actual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :*: (S1 ('MetaSel ('Just "teq_mismatch_what") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TypedThing)) :*: S1 ('MetaSel ('Just "teq_mb_same_occ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SameOccInfo))))) :+: C1 ('MetaCons "CouldNotDeduce" 'PrefixI 'True) (S1 ('MetaSel ('Just "cnd_user_givens") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Implication]) :*: (S1 ('MetaSel ('Just "cnd_wanted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ErrorItem)) :*: S1 ('MetaSel ('Just "cnd_extra") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CND_Extra))))))

Methods

from :: MismatchMsg -> Rep MismatchMsg x #

to :: Rep MismatchMsg x -> MismatchMsg #

type Rep MismatchMsg # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep MismatchMsg = D1 ('MetaData "MismatchMsg" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "BasicMismatch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "mismatch_ea") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MismatchEA) :*: (S1 ('MetaSel ('Just "mismatch_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem) :*: S1 ('MetaSel ('Just "mismatch_ty1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :*: (S1 ('MetaSel ('Just "mismatch_ty2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: (S1 ('MetaSel ('Just "mismatch_whenMatching") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe WhenMatching)) :*: S1 ('MetaSel ('Just "mismatch_mb_same_occ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SameOccInfo))))) :+: C1 ('MetaCons "KindMismatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "kmismatch_what") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypedThing) :*: (S1 ('MetaSel ('Just "kmismatch_expected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "kmismatch_actual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)))) :+: (C1 ('MetaCons "TypeEqMismatch" 'PrefixI 'True) (((S1 ('MetaSel ('Just "teq_mismatch_ppr_explicit_kinds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "teq_mismatch_item") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorItem)) :*: (S1 ('MetaSel ('Just "teq_mismatch_ty1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "teq_mismatch_ty2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :*: ((S1 ('MetaSel ('Just "teq_mismatch_expected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "teq_mismatch_actual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :*: (S1 ('MetaSel ('Just "teq_mismatch_what") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TypedThing)) :*: S1 ('MetaSel ('Just "teq_mb_same_occ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SameOccInfo))))) :+: C1 ('MetaCons "CouldNotDeduce" 'PrefixI 'True) (S1 ('MetaSel ('Just "cnd_user_givens") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Implication]) :*: (S1 ('MetaSel ('Just "cnd_wanted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty ErrorItem)) :*: S1 ('MetaSel ('Just "cnd_extra") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CND_Extra))))))

data MismatchEA #

Whether to use expected/actual in a type mismatch message.

Constructors

NoEA | Don't use expected/actual.
EA | Use expected/actual.

Fields

- mismatch_mbEA :: Maybe ExpectedActualInfo

  Whether to also mention type synonym expansion.

mkPlainMismatchMsg :: MismatchMsg -> TcSolverReportMsg #

Report a mismatch error without any extra information.

mkBasicMismatchMsg :: MismatchEA -> ErrorItem -> Type -> Type -> MismatchMsg #

Construct a basic mismatch message between two types.

See `pprMismatchMsg` for how such a message is displayed to users.

data WhenMatching #

Explain how a kind equality originated.

Constructors

WhenMatching TcType TcType CtOrigin (Maybe TypeOrKind) |

#### Instances

Instances details

Generic WhenMatching # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep WhenMatching |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep WhenMatching = D1 ('MetaData "WhenMatching" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "WhenMatching" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CtOrigin) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TypeOrKind)))))

Methods

from :: WhenMatching -> Rep WhenMatching x #

to :: Rep WhenMatching x -> WhenMatching #

type Rep WhenMatching # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep WhenMatching = D1 ('MetaData "WhenMatching" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "WhenMatching" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CtOrigin) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TypeOrKind)))))

data ExpectedActualInfo #

Expected/actual information.

Constructors

ExpectedActual | Display the expected and actual types.

Fields

- ea_expected :: Type
- ea_actual :: Type

ExpectedActualAfterTySynExpansion | Display the expected and actual types, after expanding type synonyms.

Fields

- ea_expanded_expected :: Type
- ea_expanded_actual :: Type

data TyVarInfo #

A cue to print out information about type variables, e.g. where they were bound, when there is a mismatch `tv1 ~ ty2`.

Constructors

TyVarInfo |

Fields

- thisTyVar :: TyVar
- thisTyVarIsUntouchable :: Maybe Implication
- otherTy :: Maybe TyVar

data SameOccInfo #

Add some information to disambiguate errors in which two `Names` would otherwise appear to be identical.

See Note [Disambiguating (X ~ X) errors].

Constructors

SameOcc |

Fields

- sameOcc_same_pkg :: Bool

  Whether the two `Name`s also came from the same package.

- sameOcc_lhs :: Name
- sameOcc_rhs :: Name

data AmbiguityInfo #

Add some information about ambiguity

Constructors

Ambiguity | Some type variables remained ambiguous: print them to the user.

Fields

- lead_with_ambig_msg :: Bool

  True = start the message with "Ambiguous type variable ..." False = create a message of the form "The type variable is ambiguous."

- ambig_tyvars :: ([TyVar], [TyVar])

  Ambiguous kind and type variables, respectively. Guaranteed to not both be empty.

NonInjectiveTyFam TyCon | Remind the user that a particular type family is not injective.

data CND_Extra #

Additional information to be given in a `CouldNotDeduce` message, which is then passed on to `mk_supplementary_ea_msg`.

Constructors

CND_Extra TypeOrKind Type Type |

data FitsMbSuppressed #

A collection of valid hole fits or refinement fits, in which some fits might have been suppressed.

Constructors

Fits |

Fields

- fits :: [HoleFit]
- fitsSuppressed :: Bool

  Whether we have suppressed any fits because there were too many.

data ValidHoleFits #

A collection of hole fits and refinement fits.

Constructors

ValidHoleFits |

Fields

- holeFits :: FitsMbSuppressed
- refinementFits :: FitsMbSuppressed

noValidHoleFits :: ValidHoleFits #

data HoleFitDispConfig #

Configuration for pretty-printing valid hole fits.

Constructors

HFDC |

Fields

- showWrap :: Bool
- showWrapVars :: Bool
- showType :: Bool
- showProv :: Bool
- showMatches :: Bool

data RelevantBindings #

Constructors

RelevantBindings |

Fields

- relevantBindingNamesAndTys :: [(Name, Type)]
- ranOutOfFuel :: Bool

  Whether we ran out of fuel generating the bindings.

pprRelevantBindings :: RelevantBindings -> SDoc #

Display some relevant bindings.

data PromotionErr #

Constructors

TyConPE |
ClassPE |
FamDataConPE |
ConstrainedDataConPE ThetaType |
PatSynPE |
RecDataConPE |
TermVariablePE |
TypeVariablePE |

#### Instances

Instances details

Generic PromotionErr # |

Instance details

Defined in GHC.Tc.Errors.Types.PromotionErr

Associated Types

type Rep PromotionErr |

Instance details

Defined in GHC.Tc.Errors.Types.PromotionErr

type Rep PromotionErr = D1 ('MetaData "PromotionErr" "GHC.Tc.Errors.Types.PromotionErr" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "TyConPE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClassPE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FamDataConPE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrainedDataConPE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ThetaType)))) :+: ((C1 ('MetaCons "PatSynPE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RecDataConPE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TermVariablePE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeVariablePE" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: PromotionErr -> Rep PromotionErr x #

to :: Rep PromotionErr x -> PromotionErr #

Outputable PromotionErr # |
Instance details Defined in GHC.Tc.Errors.Types.PromotionErr Methods ppr :: PromotionErr -> SDoc #
type Rep PromotionErr # |

Instance details

Defined in GHC.Tc.Errors.Types.PromotionErr

type Rep PromotionErr = D1 ('MetaData "PromotionErr" "GHC.Tc.Errors.Types.PromotionErr" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "TyConPE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClassPE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FamDataConPE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrainedDataConPE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ThetaType)))) :+: ((C1 ('MetaCons "PatSynPE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RecDataConPE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TermVariablePE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeVariablePE" 'PrefixI 'False) (U1 :: Type -> Type))))

pprPECategory :: PromotionErr -> SDoc #

peCategory :: PromotionErr -> String #

data TermLevelUseErr #

Constructors

TyConTE |
ClassTE |
TyVarTE |

#### Instances

Instances details

Generic TermLevelUseErr # |

Instance details

Defined in GHC.Tc.Errors.Types.PromotionErr

Associated Types

type Rep TermLevelUseErr |

Instance details

Defined in GHC.Tc.Errors.Types.PromotionErr

type Rep TermLevelUseErr = D1 ('MetaData "TermLevelUseErr" "GHC.Tc.Errors.Types.PromotionErr" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TyConTE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ClassTE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyVarTE" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: TermLevelUseErr -> Rep TermLevelUseErr x #

to :: Rep TermLevelUseErr x -> TermLevelUseErr #

type Rep TermLevelUseErr # |

Instance details

Defined in GHC.Tc.Errors.Types.PromotionErr

type Rep TermLevelUseErr = D1 ('MetaData "TermLevelUseErr" "GHC.Tc.Errors.Types.PromotionErr" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TyConTE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ClassTE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TyVarTE" 'PrefixI 'False) (U1 :: Type -> Type)))

teCategory :: TermLevelUseErr -> String #

data NotInScopeError #

Some form of `"not in scope"` error. See also the `OutOfScopeHole` constructor of `HoleError`.

Constructors

NotInScope | A run-of-the-mill `"not in scope"` error.
NotARecordField | Like `NotInScope`, but when we know we are looking for a record field.
NoExactName Name | An exact `Name` was not in scope. This usually indicates a problem with a Template Haskell splice. Test cases: T5971, T18263.
SameName [GlobalRdrElt] | always at least 2 elements
MissingBinding SDoc [GhcHint] |
NoTopLevelBinding | Couldn't find a top-level binding. Happens when specifying an annotation for something that is not in scope. Test cases: annfail01, annfail02, annfail11.
UnknownSubordinate SDoc | A class doesn't have a method with this name, or, a class doesn't have an associated type with this name, or, a record doesn't have a record field with this name.
NotInScopeTc (NameEnv TcTyThing) | A name is not in scope during type checking but passed the renamer. Test cases: none

#### Instances

Instances details

Generic NotInScopeError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep NotInScopeError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep NotInScopeError = D1 ('MetaData "NotInScopeError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "NotInScope" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotARecordField" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NoExactName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "SameName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GlobalRdrElt])))) :+: ((C1 ('MetaCons "MissingBinding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint])) :+: C1 ('MetaCons "NoTopLevelBinding" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnknownSubordinate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SDoc)) :+: C1 ('MetaCons "NotInScopeTc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NameEnv TcTyThing))))))

Methods

from :: NotInScopeError -> Rep NotInScopeError x #

to :: Rep NotInScopeError x -> NotInScopeError #

type Rep NotInScopeError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep NotInScopeError = D1 ('MetaData "NotInScopeError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "NotInScope" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotARecordField" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NoExactName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "SameName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GlobalRdrElt])))) :+: ((C1 ('MetaCons "MissingBinding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SDoc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint])) :+: C1 ('MetaCons "NoTopLevelBinding" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnknownSubordinate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SDoc)) :+: C1 ('MetaCons "NotInScopeTc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NameEnv TcTyThing))))))

mkTcRnNotInScope :: RdrName -> NotInScopeError -> TcRnMessage #

Create a `"not in scope"` error message for the given `RdrName`.

data ImportError #

Explain a problem with an import.

Constructors

MissingModule ModuleName | Couldn't find a module with the requested name.
ModulesDoNotExport (NonEmpty Module) OccName | The imported modules don't export what we're looking for.

#### Instances

Instances details

Outputable ImportError # |
Instance details Defined in GHC.Tc.Errors.Ppr Methods ppr :: ImportError -> SDoc #

data HoleError #

Report an error involving a `Hole`.

This could be an out of scope data constructor or variable, a typed hole, or a wildcard in a type.

Constructors

OutOfScopeHole [ImportError] [GhcHint] | Report an out-of-scope data constructor or variable masquerading as an expression hole. See Note [Insoluble holes] in GHC.Tc.Types.Constraint. See `NotInScopeError` for other not-in-scope errors. Test cases: T9177a.
HoleError HoleSort [TcTyVar] [(SkolemInfoAnon, [TcTyVar])] | Report a typed hole, or wildcard, with additional information.

data CoercibleMsg #

A message that aims to explain why two types couldn't be seen to be representationally equal.

Constructors

UnknownRoles Type | Not knowing the role of a type constructor prevents us from concluding that two types are representationally equal. Example: foo :: Applicative m => m (Sum Int) foo = coerce (pure $ 1 :: Int) We don't know what role `m` has, so we can't coerce `m Int` to `m (Sum Int)`. Test cases: T8984, TcCoercibleFail.
TyConIsAbstract TyCon | The fact that a `TyCon` is abstract prevents us from decomposing a `TyConApp` and deducing that two types are representationally equal. Test cases: none.
OutOfScopeNewtypeConstructor TyCon DataCon | We can't unwrap a newtype whose constructor is not in scope. Example: import Data.Ord (Down) -- NB: not importing the constructor foo :: Int -> Down Int foo = coerce Test cases: TcCoercibleFail.

data PotentialInstances #

This datatype collates instances that match or unifier, in order to report an error message for an unsolved typeclass constraint.

Constructors

PotentialInstances |

Fields

- matches :: [ClsInst]
- unifiers :: [ClsInst]

data UnsupportedCallConvention #

Specifies which calling convention is unsupported on the current platform

Constructors

StdCallConvUnsupported |
PrimCallConvUnsupported |
JavaScriptCallConvUnsupported |

#### Instances

Instances details

Eq UnsupportedCallConvention # |
Instance details Defined in GHC.Tc.Errors.Types Methods (==) :: UnsupportedCallConvention -> UnsupportedCallConvention -> Bool # (/=) :: UnsupportedCallConvention -> UnsupportedCallConvention -> Bool #

type ExpectedBackends = [Backend] #

Specifies which back ends can handle a requested foreign import or export

data ArgOrResult #

Whether the error pertains to a function argument or a result.

Constructors

Arg |
Result |

data MatchArgsContext #

Context for a mismatch in the number of arguments

Constructors

EquationArgs !Name | Name of the function
PatternArgs !HsMatchContextRn | Pattern match specifics

data MatchArgBadMatches where #

The information necessary to report mismatched numbers of arguments in a match group.

Constructors

MatchArgMatches |

Fields

- :: forall body. { matchArgFirstMatch :: LocatedA (Match GhcRn body)
- , matchArgBadMatches :: NonEmpty (LocatedA (Match GhcRn body))
- } -> MatchArgBadMatches

data PragmaWarningInfo #

Constructors

PragmaWarningName |

Fields

- pwarn_occname :: OccName
- pwarn_impmod :: ModuleName
- pwarn_declmod :: ModuleName

PragmaWarningExport |

Fields

- pwarn_occname :: OccName
- pwarn_impmod :: ModuleName

PragmaWarningInstance |

Fields

- pwarn_dfunid :: DFunId
- pwarn_ctorig :: CtOrigin

data EmptyStatementGroupErrReason #

The context for an "empty statement group" error.

Constructors

EmptyStmtsGroupInParallelComp | Empty statement group in a parallel list comprehension
EmptyStmtsGroupInTransformListComp | Empty statement group in a transform list comprehension Example: [() | then ()]
EmptyStmtsGroupInDoNotation HsDoFlavour | Empty statement group in do notation Example: do
EmptyStmtsGroupInArrowNotation | Empty statement group in arrow notation Example: proc () -> do

#### Instances

Instances details

Generic EmptyStatementGroupErrReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep EmptyStatementGroupErrReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep EmptyStatementGroupErrReason = D1 ('MetaData "EmptyStatementGroupErrReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "EmptyStmtsGroupInParallelComp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EmptyStmtsGroupInTransformListComp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EmptyStmtsGroupInDoNotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsDoFlavour)) :+: C1 ('MetaCons "EmptyStmtsGroupInArrowNotation" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: EmptyStatementGroupErrReason -> Rep EmptyStatementGroupErrReason x #

to :: Rep EmptyStatementGroupErrReason x -> EmptyStatementGroupErrReason #

type Rep EmptyStatementGroupErrReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep EmptyStatementGroupErrReason = D1 ('MetaData "EmptyStatementGroupErrReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "EmptyStmtsGroupInParallelComp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EmptyStmtsGroupInTransformListComp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EmptyStmtsGroupInDoNotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HsDoFlavour)) :+: C1 ('MetaCons "EmptyStmtsGroupInArrowNotation" 'PrefixI 'False) (U1 :: Type -> Type)))

data UnexpectedStatement where #

An existential wrapper around ``StmtLR` GhcPs GhcPs body`.

Constructors

UnexpectedStatement :: forall body. Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement |

data DeclSort #

Constructors

ClassDeclSort |
InstanceDeclSort |

data NonStandardGuards where #

Constructors

NonStandardGuards :: forall body. (Outputable body, Anno (Stmt GhcRn body) ~ SrcSpanAnnA) => [LStmtLR GhcRn GhcRn body] -> NonStandardGuards |

data RuleLhsErrReason #

Constructors

UnboundVariable RdrName NotInScopeError |
IllegalExpression |

data HsigShapeMismatchReason #

Constructors

HsigShapeSortMismatch !AvailInfo !AvailInfo | HsigShapeSortMismatch is an error indicating that an item in the export list of a signature doesn't match the item of the same name in another signature when merging the two – one is a type while the other is a plain identifier. Test cases: none
HsigShapeNotUnifiable !Name !Name !Bool | HsigShapeNotUnifiable is an error indicating that a name in the export list of a signature cannot be unified with a name of the same name in another signature when merging the two. Test cases: bkpfail20, bkpfail21

#### Instances

Instances details

Generic HsigShapeMismatchReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep HsigShapeMismatchReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep HsigShapeMismatchReason = D1 ('MetaData "HsigShapeMismatchReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "HsigShapeSortMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AvailInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AvailInfo)) :+: C1 ('MetaCons "HsigShapeNotUnifiable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))

Methods

from :: HsigShapeMismatchReason -> Rep HsigShapeMismatchReason x #

to :: Rep HsigShapeMismatchReason x -> HsigShapeMismatchReason #

type Rep HsigShapeMismatchReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep HsigShapeMismatchReason = D1 ('MetaData "HsigShapeMismatchReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "HsigShapeSortMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AvailInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AvailInfo)) :+: C1 ('MetaCons "HsigShapeNotUnifiable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool))))

data WrongThingSort #

Constructors

WrongThingType |
WrongThingDataCon |
WrongThingPatSyn |
WrongThingConLike |
WrongThingClass |
WrongThingTyCon |
WrongThingAxiom |

data StageCheckReason #

Constructors

StageCheckInstance !InstanceWhat !PredType |
StageCheckSplice !Name |

data UninferrableTyVarCtx #

Constructors

UninfTyCtx_ClassContext [TcType] |
UninfTyCtx_DataContext [TcType] |
UninfTyCtx_ProvidedContext [TcType] |
UninfTyCtx_TyFamRhs TcType |
UninfTyCtx_TySynRhs TcType |
UninfTyCtx_Sig TcType (LHsSigType GhcRn) |

data PatSynInvalidRhsReason #

Constructors

PatSynNotInvertible !(Pat GhcRn) |
PatSynUnboundVar !Name |

#### Instances

Instances details

Generic PatSynInvalidRhsReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep PatSynInvalidRhsReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep PatSynInvalidRhsReason = D1 ('MetaData "PatSynInvalidRhsReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "PatSynNotInvertible" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcRn))) :+: C1 ('MetaCons "PatSynUnboundVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))

Methods

from :: PatSynInvalidRhsReason -> Rep PatSynInvalidRhsReason x #

to :: Rep PatSynInvalidRhsReason x -> PatSynInvalidRhsReason #

type Rep PatSynInvalidRhsReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep PatSynInvalidRhsReason = D1 ('MetaData "PatSynInvalidRhsReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "PatSynNotInvertible" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Pat GhcRn))) :+: C1 ('MetaCons "PatSynUnboundVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))

data BadFieldAnnotationReason where #

Constructors

LazyFieldsDisabled :: BadFieldAnnotationReason | A lazy data type field annotation (~) was used without enabling the extension StrictData. Test cases: LazyFieldsDisabled
UnpackWithoutStrictness :: BadFieldAnnotationReason | An UNPACK pragma was applied to a field without strictness annotation (!). Test cases: T14761a, T7562
BackpackUnpackAbstractType :: BadFieldAnnotationReason | An UNPACK pragma was applied to an abstract type in an indefinite package in Backpack. Test cases: unpack_sums_5, T3966, T7050

#### Instances

Instances details

Generic BadFieldAnnotationReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep BadFieldAnnotationReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BadFieldAnnotationReason = D1 ('MetaData "BadFieldAnnotationReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "LazyFieldsDisabled" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnpackWithoutStrictness" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BackpackUnpackAbstractType" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: BadFieldAnnotationReason -> Rep BadFieldAnnotationReason x #

to :: Rep BadFieldAnnotationReason x -> BadFieldAnnotationReason #

type Rep BadFieldAnnotationReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BadFieldAnnotationReason = D1 ('MetaData "BadFieldAnnotationReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "LazyFieldsDisabled" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnpackWithoutStrictness" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BackpackUnpackAbstractType" 'PrefixI 'False) (U1 :: Type -> Type)))

data SuperclassCycle #

Constructors

MkSuperclassCycle |

Fields

- cls :: Class
- definite :: Bool
- reasons :: [SuperclassCycleDetail]

data SuperclassCycleDetail #

Constructors

SCD_HeadTyVar !PredType |
SCD_HeadTyFam !PredType |
SCD_Superclass !Class |

data RoleValidationFailedReason #

Constructors

TyVarRoleMismatch !TyVar !Role |
TyVarMissingInEnv !TyVar |
BadCoercionRole !Coercion |

#### Instances

Instances details

Generic RoleValidationFailedReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep RoleValidationFailedReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep RoleValidationFailedReason = D1 ('MetaData "RoleValidationFailedReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TyVarRoleMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role)) :+: (C1 ('MetaCons "TyVarMissingInEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyVar)) :+: C1 ('MetaCons "BadCoercionRole" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coercion))))

Methods

from :: RoleValidationFailedReason -> Rep RoleValidationFailedReason x #

to :: Rep RoleValidationFailedReason x -> RoleValidationFailedReason #

type Rep RoleValidationFailedReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep RoleValidationFailedReason = D1 ('MetaData "RoleValidationFailedReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TyVarRoleMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Role)) :+: (C1 ('MetaCons "TyVarMissingInEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyVar)) :+: C1 ('MetaCons "BadCoercionRole" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coercion))))

data DisabledClassExtension where #

Constructors

MultiParamDisabled | MultiParamTypeClasses is required. Test cases: readFail037, TcNoNullaryTC

Fields

- :: !Int

  The arity

- -> DisabledClassExtension

FunDepsDisabled :: DisabledClassExtension | FunctionalDependencies is required. Test cases: readFail041
ConstrainedClassMethodsDisabled :: !Id -> !TcPredType -> DisabledClassExtension | ConstrainedClassMethods is required. Test cases: mod39, tcfail150

#### Instances

Instances details

Generic DisabledClassExtension # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep DisabledClassExtension |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep DisabledClassExtension = D1 ('MetaData "DisabledClassExtension" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "MultiParamDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "FunDepsDisabled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrainedClassMethodsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcPredType))))

Methods

from :: DisabledClassExtension -> Rep DisabledClassExtension x #

to :: Rep DisabledClassExtension x -> DisabledClassExtension #

type Rep DisabledClassExtension # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep DisabledClassExtension = D1 ('MetaData "DisabledClassExtension" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "MultiParamDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "FunDepsDisabled" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrainedClassMethodsDisabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcPredType))))

data TyFamsDisabledReason #

Constructors

TyFamsDisabledFamily !Name |
TyFamsDisabledInstance !TyCon |

#### Instances

Instances details

Generic TyFamsDisabledReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TyFamsDisabledReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TyFamsDisabledReason = D1 ('MetaData "TyFamsDisabledReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TyFamsDisabledFamily" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TyFamsDisabledInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)))

Methods

from :: TyFamsDisabledReason -> Rep TyFamsDisabledReason x #

to :: Rep TyFamsDisabledReason x -> TyFamsDisabledReason #

type Rep TyFamsDisabledReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TyFamsDisabledReason = D1 ('MetaData "TyFamsDisabledReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TyFamsDisabledFamily" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "TyFamsDisabledInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)))

data TypeApplication #

Constructors

TypeApplication !(HsType GhcPs) !TypeOrKind |
TypeApplicationInPattern !(HsConPatTyArg GhcPs) |

#### Instances

Instances details

Generic TypeApplication # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TypeApplication |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypeApplication = D1 ('MetaData "TypeApplication" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TypeApplication" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeOrKind)) :+: C1 ('MetaCons "TypeApplicationInPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsConPatTyArg GhcPs))))

Methods

from :: TypeApplication -> Rep TypeApplication x #

to :: Rep TypeApplication x -> TypeApplication #

type Rep TypeApplication # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypeApplication = D1 ('MetaData "TypeApplication" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "TypeApplication" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsType GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeOrKind)) :+: C1 ('MetaCons "TypeApplicationInPattern" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsConPatTyArg GhcPs))))

data HsTypeOrSigType p #

Either `HsType p` or `HsSigType p`.

Used for reporting errors in `TcRnIllegalKind`.

Constructors

HsType (HsType p) |
HsSigType (HsSigType p) |

#### Instances

Instances details

OutputableBndrId p => Outputable (HsTypeOrSigType (GhcPass p)) # |
Instance details Defined in GHC.Tc.Errors.Types Methods ppr :: HsTypeOrSigType (GhcPass p) -> SDoc #

data HsTyVarBndrExistentialFlag #

A wrapper around HsTyVarBndr. Used for reporting errors in `TcRnUnusedQuantifiedTypeVar`.

Constructors

OutputableBndrFlag flag 'Renamed => HsTyVarBndrExistentialFlag (HsTyVarBndr flag GhcRn) |

#### Instances

Instances details

Outputable HsTyVarBndrExistentialFlag # |
Instance details Defined in GHC.Tc.Errors.Types Methods ppr :: HsTyVarBndrExistentialFlag -> SDoc #

type TySynCycleTyCons = [Either TyCon (LTyClDecl GhcRn)] #

data BadImportKind #

Constructors

BadImportNotExported | Module does not export...

Fields

- [GhcHint]

  suggestions for what might have been meant | Missing `type` keyword when importing a type. e.g. `import TypeLits( (+) )`, where TypeLits exports a type (+), not a term (+) Then we want to suggest using `import TypeLits( type (+) )`

BadImportAvailTyCon Bool | is ExplicitNamespaces enabled? | Trying to import a data constructor directly, e.g. `import Data.Maybe (Just)` instead of `import Data.Maybe (Maybe(Just))`
BadImportAvailDataCon OccName |
BadImportNotExportedSubordinates [OccName] | The parent does not export the given children.
BadImportAvailVar | Incorrect `type` keyword when importing something which isn't a type.

#### Instances

Instances details

Generic BadImportKind # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep BadImportKind |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BadImportKind = D1 ('MetaData "BadImportKind" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "BadImportNotExported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint])) :+: C1 ('MetaCons "BadImportAvailTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :+: (C1 ('MetaCons "BadImportAvailDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OccName)) :+: (C1 ('MetaCons "BadImportNotExportedSubordinates" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [OccName])) :+: C1 ('MetaCons "BadImportAvailVar" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: BadImportKind -> Rep BadImportKind x #

to :: Rep BadImportKind x -> BadImportKind #

type Rep BadImportKind # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BadImportKind = D1 ('MetaData "BadImportKind" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "BadImportNotExported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GhcHint])) :+: C1 ('MetaCons "BadImportAvailTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :+: (C1 ('MetaCons "BadImportAvailDataCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OccName)) :+: (C1 ('MetaCons "BadImportNotExportedSubordinates" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [OccName])) :+: C1 ('MetaCons "BadImportAvailVar" 'PrefixI 'False) (U1 :: Type -> Type))))

data DodgyImportsReason #

Different types of warnings for dodgy imports.

Constructors

DodgyImportsEmptyParent !GlobalRdrElt | An import of the form 'T(..)' or 'f(..)' does not actually import anything beside `T`/`f` itself. Test cases: DodgyImports
DodgyImportsHiding !ImportLookupReason | A `hiding` clause contains something that would be reported as an error in a regular import, but is relaxed to a warning. Test cases: DodgyImports_hiding

#### Instances

Instances details

Generic DodgyImportsReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep DodgyImportsReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep DodgyImportsReason = D1 ('MetaData "DodgyImportsReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "DodgyImportsEmptyParent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobalRdrElt)) :+: C1 ('MetaCons "DodgyImportsHiding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ImportLookupReason)))

Methods

from :: DodgyImportsReason -> Rep DodgyImportsReason x #

to :: Rep DodgyImportsReason x -> DodgyImportsReason #

type Rep DodgyImportsReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep DodgyImportsReason = D1 ('MetaData "DodgyImportsReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "DodgyImportsEmptyParent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GlobalRdrElt)) :+: C1 ('MetaCons "DodgyImportsHiding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ImportLookupReason)))

data ImportLookupReason where #

Different types of errors for import lookup.

Constructors

ImportLookupBad | An item in an import statement is not exported by the corresponding module. Test cases: T21826, recomp001, retc001, mod79, mod80, mod81, mod91, T6007, T7167, T9006, T11071, T9905fail2, T5385, T10668

Fields

- :: BadImportKind
- -> ModIface
- -> ImpDeclSpec
- -> IE GhcPs
- -> Bool

  whether `-XPatternSynonyms` was enabled

- -> ImportLookupReason

ImportLookupQualified | A name is specified with a qualifying module. Test cases: T3792

Fields

- :: !RdrName

  The name extracted from the import item

- -> ImportLookupReason

ImportLookupIllegal :: ImportLookupReason | Something completely unexpected is in an import list, like `module Foo`. Test cases: ImportLookupIllegal
ImportLookupAmbiguous | An item in an import list matches multiple names exported from that module. Test cases: None

Fields

- :: !RdrName

  The name extracted from the import item

- -> ![GlobalRdrElt]

  The potential matches

- -> ImportLookupReason

#### Instances

Instances details

Generic ImportLookupReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep ImportLookupReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep ImportLookupReason = D1 ('MetaData "ImportLookupReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "ImportLookupBad" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BadImportKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModIface)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImpDeclSpec) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :+: C1 ('MetaCons "ImportLookupQualified" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))) :+: (C1 ('MetaCons "ImportLookupIllegal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ImportLookupAmbiguous" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GlobalRdrElt]))))

Methods

from :: ImportLookupReason -> Rep ImportLookupReason x #

to :: Rep ImportLookupReason x -> ImportLookupReason #

type Rep ImportLookupReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep ImportLookupReason = D1 ('MetaData "ImportLookupReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "ImportLookupBad" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BadImportKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModIface)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImpDeclSpec) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IE GhcPs)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :+: C1 ('MetaCons "ImportLookupQualified" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName))) :+: (C1 ('MetaCons "ImportLookupIllegal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ImportLookupAmbiguous" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [GlobalRdrElt]))))

data UnusedImportReason where #

Different types of errors for unused imports.

Constructors

UnusedImportNone :: UnusedImportReason | No names in the import list are used in the module. Test cases: overloadedrecfldsfail06, T10890_2, t22391, t22391j, T1074, prog018, mod177, rn046, rn037, T5211
UnusedImportSome | A set of names in the import list are not used in the module. Test cases: overloadedrecfldsfail06, T17324, mod176, T11970A, rn046, T14881, T7454, T8149, T13064

Fields

- :: ![UnusedImportName]

  The unsed names

- -> UnusedImportReason

#### Instances

Instances details

Generic UnusedImportReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep UnusedImportReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep UnusedImportReason = D1 ('MetaData "UnusedImportReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "UnusedImportNone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnusedImportSome" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [UnusedImportName])))

Methods

from :: UnusedImportReason -> Rep UnusedImportReason x #

to :: Rep UnusedImportReason x -> UnusedImportReason #

type Rep UnusedImportReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep UnusedImportReason = D1 ('MetaData "UnusedImportReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "UnusedImportNone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnusedImportSome" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [UnusedImportName])))

data UnusedImportName where #

Distinguish record fields from other names for pretty-printing.

Constructors

UnusedImportNameRecField :: !Parent -> !OccName -> UnusedImportName |
UnusedImportNameRegular :: !Name -> UnusedImportName |

data NestedForallsContextsIn #

Different places in which a nested foralls/contexts error might occur.

Constructors

NFC_Specialize | Nested forall in `SPECIALISE instance`
NFC_ViaType | Nested forall in `deriving via` (via-type)
NFC_GadtConSig | Nested forall in the type of a GADT constructor
NFC_InstanceHead | Nested forall in an instance head
NFC_StandaloneDerivedInstanceHead | Nested forall in a standalone deriving instance head
NFC_DerivedClassType | Nested forall in deriving class type

data UnusedNameProv #

Provenance of an unused name.

Constructors

UnusedNameTopDecl |
UnusedNameImported !ModuleName |
UnusedNameTypePattern |
UnusedNameMatch |
UnusedNameLocalBind |

data NonCanonicalDefinition #

Different reasons for TcRnNonCanonicalDefinition.

Constructors

NonCanonicalMonoid NonCanonical_Monoid | Related to `(<>)` and `mappend`.
NonCanonicalMonad NonCanonical_Monad | Related to `(*>)``(>>)` and `pure` `return`.

#### Instances

Instances details

Generic NonCanonicalDefinition # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep NonCanonicalDefinition |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep NonCanonicalDefinition = D1 ('MetaData "NonCanonicalDefinition" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "NonCanonicalMonoid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonCanonical_Monoid)) :+: C1 ('MetaCons "NonCanonicalMonad" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonCanonical_Monad)))

Methods

from :: NonCanonicalDefinition -> Rep NonCanonicalDefinition x #

to :: Rep NonCanonicalDefinition x -> NonCanonicalDefinition #

type Rep NonCanonicalDefinition # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep NonCanonicalDefinition = D1 ('MetaData "NonCanonicalDefinition" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "NonCanonicalMonoid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonCanonical_Monoid)) :+: C1 ('MetaCons "NonCanonicalMonad" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NonCanonical_Monad)))

data NonCanonical_Monoid #

Possible cases for the -Wnoncanonical-monoid-instances.

Constructors

NonCanonical_Sappend | `(<>) = mappend` was defined.
NonCanonical_Mappend | `mappend` was defined as something other than `(<>)`.

data NonCanonical_Monad #

Possible cases for the -Wnoncanonical-monad-instances.

Constructors

NonCanonical_Pure | `pure = return` was defined.
NonCanonical_ThenA | `(*>) = (>>)` was defined.
NonCanonical_Return | `return` was defined as something other than `pure`.
NonCanonical_ThenM | `(>>)` was defined as something other than `(*>)`.

# Errors for hs-boot and signature files

data BadBootDecls #

What declarations were not allowed in an hs-boot or hsig file?

Constructors

BootBindsPs !(NonEmpty (LHsBindLR GhcRn GhcPs)) |
BootBindsRn !(NonEmpty (LHsBindLR GhcRn GhcRn)) |
BootInstanceSigs !(NonEmpty (LSig GhcRn)) |
BootFamInst !TyCon |
BootSpliceDecls !(NonEmpty (LocatedA (HsUntypedSplice GhcPs))) |
BootForeignDecls !(NonEmpty (LForeignDecl GhcRn)) |
BootDefaultDecls !(NonEmpty (LDefaultDecl GhcRn)) |
BootRuleDecls !(NonEmpty (LRuleDecls GhcRn)) |

data MissingBootThing #

Something from the hs-boot or signature file is missing from the implementing module.

Constructors

MissingBootDefinition | Something defined in the hs-boot or signature file is not defined in the implementing module.
MissingBootExport | Something exported by the hs-boot or signature file is not exported by the implementing module.

#### Instances

Instances details

Generic MissingBootThing # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep MissingBootThing |
Instance details Defined in GHC.Tc.Errors.Types type Rep MissingBootThing = D1 ('MetaData "MissingBootThing" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "MissingBootDefinition" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MissingBootExport" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: MissingBootThing -> Rep MissingBootThing x #

to :: Rep MissingBootThing x -> MissingBootThing #

type Rep MissingBootThing # |
Instance details Defined in GHC.Tc.Errors.Types type Rep MissingBootThing = D1 ('MetaData "MissingBootThing" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "MissingBootDefinition" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MissingBootExport" 'PrefixI 'False) (U1 :: Type -> Type))

missingBootThing :: HsBootOrSig -> Name -> MissingBootThing -> TcRnMessage #

data BootMismatch #

A mismatch between an hs-boot or signature file and its implementing module.

Constructors

MissingBootThing !Name !MissingBootThing | Something defined or exported by an hs-boot or signature file is missing from the implementing module.
MissingBootInstance | A typeclass instance is declared in the hs-boot file but it is not present in the implementing module.

Fields

- !DFunId

  the boot instance `DFunId` NB: we never trigger this for hsig files, as in that case we do a full round of constraint solving, and a missing instance gets reported as an unsolved Wanted constraint with a `InstProvidedOrigin` `CtOrigin`. See GHC.Tc.Utils.Backpack.check_inst.

BadReexportedBootThing !Name !Name | A mismatch between an hsig file and its implementing module in the `Name` that a particular re-export refers to.
BootMismatch | A mismatch between the declaration of something in the hs-boot or signature file and its implementation, e.g. a type mismatch or a type family implemented as a class.

Fields

- !TyThing

  boot thing

- !TyThing

  real thing

- !BootMismatchWhat

#### Instances

Instances details

Generic BootMismatch # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep BootMismatch |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BootMismatch = D1 ('MetaData "BootMismatch" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "MissingBootThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MissingBootThing)) :+: C1 ('MetaCons "MissingBootInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DFunId))) :+: (C1 ('MetaCons "BadReexportedBootThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "BootMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BootMismatchWhat)))))

Methods

from :: BootMismatch -> Rep BootMismatch x #

to :: Rep BootMismatch x -> BootMismatch #

type Rep BootMismatch # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BootMismatch = D1 ('MetaData "BootMismatch" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "MissingBootThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MissingBootThing)) :+: C1 ('MetaCons "MissingBootInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DFunId))) :+: (C1 ('MetaCons "BadReexportedBootThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "BootMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyThing) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BootMismatchWhat)))))

data BootMismatchWhat #

A mismatch of two `TyThing`s between an hs-boot or signature file and its implementing module.

Constructors

BootMismatchedIdTypes | The `Id`s have different types.

Fields

- !Id

  boot `Id`

- !Id

  real `Id` | Two `TyCon`s aren't compatible.

BootMismatchedTyCons |

Fields

- !TyCon

  boot `TyCon`

- !TyCon

  real `TyCon`

- !(NonEmpty BootTyConMismatch)

#### Instances

Instances details

Generic BootMismatchWhat # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep BootMismatchWhat |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BootMismatchWhat = D1 ('MetaData "BootMismatchWhat" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "BootMismatchedIdTypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "BootMismatchedTyCons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty BootTyConMismatch)))))

Methods

from :: BootMismatchWhat -> Rep BootMismatchWhat x #

to :: Rep BootMismatchWhat x -> BootMismatchWhat #

type Rep BootMismatchWhat # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep BootMismatchWhat = D1 ('MetaData "BootMismatchWhat" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "BootMismatchedIdTypes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "BootMismatchedTyCons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty BootTyConMismatch)))))

data BootTyConMismatch #

Mismatched implementation of a `TyCon` in an hs-boot or signature file.

Constructors

TyConKindMismatch | The `TyCon` kinds differ.
TyConRoleMismatch | The `TyCon` `Role`s aren't compatible.

Fields

- !Bool

  True = role subtype check | Two type synonyms have different RHSs.

TyConSynonymMismatch !Kind !Kind |
TyConFlavourMismatch !FamTyConFlav !FamTyConFlav | The two `TyCon`s are of a different flavour, e.g. one is a data family and the other is a type family.
TyConAxiomMismatch !(BootListMismatches CoAxBranch BootAxiomBranchMismatch) | The equations of a type family don't match.
TyConInjectivityMismatch | The type family injectivity annotations don't match.
TyConMismatchedData !AlgTyConRhs !AlgTyConRhs !BootDataMismatch | The `TyCon`s are both datatype `TyCon`s, but they have diferent `DataCon`s.
TyConMismatchedClasses !Class !Class !BootClassMismatch | The `TyCon`s are both `Class` `TyCon`s, but the classes don't match.
TyConsVeryDifferent | The `TyCon`s are something completely different.
SynAbstractData !SynAbstractDataError | An abstract `TyCon` is implemented using a type synonym in an invalid manner. See `SynAbstractDataError`.

data BootAxiomBranchMismatch #

Constructors

MismatchedAxiomBinders

The quantified variables in an equation don't match.

Example: the quantification of `a` in

    type family F a where { forall a. F a = Maybe a }

MismatchedAxiomLHS | The LHSs of an equation don't match.
MismatchedAxiomRHS | The RHSs of an equation don't match.

data BootClassMismatch #

A mismatch in a class, between its declaration in an hs-boot or signature file, and its implementation in a source Haskell file.

Constructors

MismatchedMethods !(BootListMismatches ClassOpItem BootMethodMismatch) | The class methods don't match.
MismatchedATs !(BootListMismatches ClassATItem BootATMismatch) | The associated types don't match.
MismatchedFunDeps | The functional dependencies don't match.
MismatchedSuperclasses | The superclasses don't match.
MismatchedMinimalPragmas | The `MINIMAL` pragmas are not compatible.

data BootMethodMismatch #

A mismatch in a class method, between its declaration in an hs-boot or signature file, and its implementation in a source Haskell file.

Constructors

MismatchedMethodNames | The class method names are different.
MismatchedMethodTypes !Type !Type | The types of a class method are different.
MismatchedDefaultMethods | The default method types are not compatible.

Fields

- !Bool

  True = subtype check

data BootATMismatch #

A mismatch in an associated type of a class, between its declaration in an hs-boot or signature file, and its implementation in a source Haskell file.

Constructors

MismatchedTyConAT !BootTyConMismatch | Two associated types don't match.
MismatchedATDefaultType | Two associated type defaults don't match.

data BootDataMismatch #

A mismatch in a datatype declaration, between an hs-boot file or signature file and its implementing module.

Constructors

MismatchedNewtypeVsData | A datatype is implemented as a newtype or vice-versa.
MismatchedConstructors !(BootListMismatches DataCon BootDataConMismatch) | The constructors don't match.
MismatchedDatatypeContexts | The datatype contexts differ.

data BootDataConMismatch #

A mismatch in a data constrcutor, between its declaration in an hs-boot file or signature file, and its implementation in a source Haskell module.

Constructors

MismatchedDataConNames | The `Name`s of the `DataCon`s differ.
MismatchedDataConFixities | The fixities of the `DataCon`s differ.
MismatchedDataConBangs | The strictness annotations of the `DataCon`s differ.
MismatchedDataConFieldLabels | The `DataCon`s have different field labels.
MismatchedDataConTypes | The `DataCon`s have incompatible types.

data SynAbstractDataError #

An error in the implementation of an abstract datatype using a type synonym.

Constructors

SynAbsDataTySynNotNullary | The type synony was not nullary.
SynAbstractDataInvalidRHS !(NonEmpty Type) | The type synonym RHS contained invalid types, e.g. a type family or a forall.

data BootListMismatch item err #

Utility datatype to record errors when checking compatibity between two lists of things, e.g. class methods, associated types, type family equations, etc.

Constructors

MismatchedLength | Different number of items.
MismatchedThing !Int !item !item !err | The item at the given position in the list differs.

type BootListMismatches item err = NonEmpty (BootListMismatch item err) #

# Class and family instance errors

data IllegalInstanceReason #

Why was an instance declaration rejected?

Constructors

IllegalClassInstance |

Fields

- !TypedThing

  the instance head type

- !IllegalClassInstanceReason

  the problem with the instance head

IllegalFamilyInstance !IllegalFamilyInstanceReason |
IllegalFamilyApplicationInInstance |

Fields

- !Type

  the instance head type

- !Bool

  is this an invisible argument?

- !TyCon

  type family

- ![Type]

  type family argument

#### Instances

Instances details

Generic IllegalInstanceReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalInstanceReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalInstanceReason = D1 ('MetaData "IllegalInstanceReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "IllegalClassInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypedThing) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalClassInstanceReason)) :+: (C1 ('MetaCons "IllegalFamilyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalFamilyInstanceReason)) :+: C1 ('MetaCons "IllegalFamilyApplicationInInstance" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type])))))

Methods

from :: IllegalInstanceReason -> Rep IllegalInstanceReason x #

to :: Rep IllegalInstanceReason x -> IllegalInstanceReason #

type Rep IllegalInstanceReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalInstanceReason = D1 ('MetaData "IllegalInstanceReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "IllegalClassInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypedThing) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalClassInstanceReason)) :+: (C1 ('MetaCons "IllegalFamilyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalFamilyInstanceReason)) :+: C1 ('MetaCons "IllegalFamilyApplicationInInstance" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type])))))

data IllegalClassInstanceReason #

Why was a class instance declaration rejected?

Constructors

IllegalInstanceHead !IllegalInstanceHeadReason | An illegal type at the head of the instance. See `IllegalInstanceHeadReason`.
IllegalHasFieldInstance !IllegalHasFieldInstance | An illegal HasField instance. See `IllegalHasFieldInstance`.
IllegalSpecialClassInstance | An illegal 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

- !Class
- !Bool

  Whether the error is due to Safe Haskell being enabled | The instance failed the coverage condition, i.e. the functional dependencies were not respected.

  Example:

  class C a b | a -> b where {..} instance C a b where {..}

  Test cases: T9106, T10570, T2247, T12803, tcfail170.

IllegalInstanceFailsCoverageCondition !Class !CoverageProblem |

#### Instances

Instances details

Generic IllegalClassInstanceReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalClassInstanceReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalClassInstanceReason = D1 ('MetaData "IllegalClassInstanceReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "IllegalInstanceHead" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalInstanceHeadReason)) :+: C1 ('MetaCons "IllegalHasFieldInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalHasFieldInstance))) :+: (C1 ('MetaCons "IllegalSpecialClassInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "IllegalInstanceFailsCoverageCondition" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoverageProblem))))

Methods

from :: IllegalClassInstanceReason -> Rep IllegalClassInstanceReason x #

to :: Rep IllegalClassInstanceReason x -> IllegalClassInstanceReason #

type Rep IllegalClassInstanceReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalClassInstanceReason = D1 ('MetaData "IllegalClassInstanceReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "IllegalInstanceHead" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalInstanceHeadReason)) :+: C1 ('MetaCons "IllegalHasFieldInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalHasFieldInstance))) :+: (C1 ('MetaCons "IllegalSpecialClassInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "IllegalInstanceFailsCoverageCondition" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoverageProblem))))

data IllegalInstanceHeadReason #

Why is a class instance head invalid?

Constructors

InstHeadAbstractClass !Class

An instance for an abstract class from an hs-boot or Backpack hsig file.

Example:

- - 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

Test cases: typecheckshould_failT13068

InstHeadNonClass | An instance whose head is not a class. Examples(s): instance c instance 42 instance !Show D type C1 a = (Show (a -> Bool)) instance C1 Int where Test cases: typecheckrenameT5513 typecheckrenameT16385 parsershould_failT3811c renameshould_failT18240a polykinds/T13267 derivingshould_failT23522

Fields

- !(Maybe TyCon)

  the `TyCon` at the head of the instance head, or `Nothing` if the instance head is not even headed by a `TyCon`

InstHeadTySynArgs | Instance head was headed by a type synonym. Example: type MyInt = Int class C a where {..} instance C MyInt where {..} Test cases: drvfail015, mod42, TidyClassKinds, tcfail139
InstHeadNonTyVarArgs | Instance head was not of the form `T a1 ... an`, where `a1, ..., an` are all type variables or literals. Example: instance Num [Int] where {..} Test cases: mod41, mod42, tcfail044, tcfail047.
InstHeadMultiParam | Multi-param instance without -XMultiParamTypeClasses. Example: instance C a b where {..} Test case: IllegalMultiParamInstance

#### Instances

Instances details

Generic IllegalInstanceHeadReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalInstanceHeadReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalInstanceHeadReason = D1 ('MetaData "IllegalInstanceHeadReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "InstHeadAbstractClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class)) :+: C1 ('MetaCons "InstHeadNonClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TyCon)))) :+: (C1 ('MetaCons "InstHeadTySynArgs" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InstHeadNonTyVarArgs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InstHeadMultiParam" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: IllegalInstanceHeadReason -> Rep IllegalInstanceHeadReason x #

to :: Rep IllegalInstanceHeadReason x -> IllegalInstanceHeadReason #

type Rep IllegalInstanceHeadReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalInstanceHeadReason = D1 ('MetaData "IllegalInstanceHeadReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "InstHeadAbstractClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class)) :+: C1 ('MetaCons "InstHeadNonClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TyCon)))) :+: (C1 ('MetaCons "InstHeadTySynArgs" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InstHeadNonTyVarArgs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InstHeadMultiParam" 'PrefixI 'False) (U1 :: Type -> Type))))

data IllegalHasFieldInstance #

Why was a HasField instance declaration rejected?

Constructors

IllegalHasFieldInstanceNotATyCon | HasField instance for a type not headed by a TyCon. Example: instance HasField a where {..} Test case: hasfieldfail03
IllegalHasFieldInstanceFamilyTyCon | HasField instance for a data family. Example: data family D a data instance D Int = MkDInt Char instance HasField "fld" (D Int) where {..} Test case: hasfieldfail03
IllegalHasFieldInstanceTyConHasField !TyCon !FieldLabelString | HasField instance for a type that already has that field. Example data T = MkT { quux :: Int } instance HasField "quux" T Int where {..} Test case: hasfieldfail03
IllegalHasFieldInstanceTyConHasFields | HasField instance for a type that already has fields, when the field label could potentially unify with those fields. Example: data T = MkInt { quux :: Int } instance forall (fld :: Symbol). HasField fld T Int where {..} Test case: hasfieldfail03

Fields

- !TyCon
- !Type

  the label type in the instance head

#### Instances

Instances details

Generic IllegalHasFieldInstance # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalHasFieldInstance |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalHasFieldInstance = D1 ('MetaData "IllegalHasFieldInstance" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "IllegalHasFieldInstanceNotATyCon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IllegalHasFieldInstanceFamilyTyCon" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IllegalHasFieldInstanceTyConHasField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString)) :+: C1 ('MetaCons "IllegalHasFieldInstanceTyConHasFields" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))

Methods

from :: IllegalHasFieldInstance -> Rep IllegalHasFieldInstance x #

to :: Rep IllegalHasFieldInstance x -> IllegalHasFieldInstance #

type Rep IllegalHasFieldInstance # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalHasFieldInstance = D1 ('MetaData "IllegalHasFieldInstance" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "IllegalHasFieldInstanceNotATyCon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IllegalHasFieldInstanceFamilyTyCon" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IllegalHasFieldInstanceTyConHasField" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FieldLabelString)) :+: C1 ('MetaCons "IllegalHasFieldInstanceTyConHasFields" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))

data CoverageProblem #

Description of an instance coverage condition failure.

Constructors

CoverageProblem |

Fields

- not_covered_fundep :: ([TyVar], [TyVar])
- not_covered_fundep_inst :: ([Type], [Type])
- not_covered_invis_vis_tvs :: Pair VarSet
- not_covered_liberal :: FailedCoverageCondition

data FailedCoverageCondition #

Which instance coverage condition failed? Was it the liberal coverage condition?

Constructors

FailedICC | Failed the instance coverage condition (ICC)

Fields

- alsoFailedLICC :: !Bool

  Whether the instance also failed the LICC

FailedLICC | Failed the liberal instance coverage condition (LICC)

data IllegalFamilyInstanceReason #

Why is a (type or data) family instance invalid?

Constructors

NotAFamilyTyCon | A top-level family instance for a `TyCon` that isn't a family `TyCon`. Example: data D a = MkD type instance D Int = Bool Test case: indexed-typesshould_failT3092

Fields

- !TypeOrData

  was this a 'type' or a 'data' instance?

- !TyCon

NotAnOpenFamilyTyCon !TyCon | A top-level (open) type family instance for a closed type family. Test cases: indexed-typesshould_failOverlap7 indexed-typesshould_failOverlap3
FamilyCategoryMismatch | A family instance was declared for a family of a different kind, e.g. a data instance for a type family `TyCon`. Test cases: T9896, SimpleFail3a

Fields

- !TyCon

  The family tycon

FamilyArityMismatch | A family instance was declared with a different number of arguments than expected. See Note [Oversaturated type family equations] in GHC.Tc.Validity. Test cases: TyFamArity1, TyFamArity2, T11136, Overlap4, AssocTyDef05, AssocTyDef06, T14110

Fields

- !TyCon

  The family tycon

- !Arity

  The right number of parameters

TyFamNameMismatch | A closed type family equation used a different name than the parent family. Example: type family F a where G Int = Bool Test cases: Overlap5, T15362, T16002, T20260, T11623

Fields

- !Name

  The family name

- !Name

  The name used in the equation

FamInstRHSOutOfScopeTyVars | There are out-of-scope type variables in the right-hand side of an associated type or data family instance. Example: instance forall a. C Int where data instance D Int = MkD1 a Test cases: indexed-typesshould_failT5515, polykindsT9574, renameshould_fail/T18021

Fields

- !(Maybe (TyCon, [Type], TyVarSet))

  family `TyCon`, arguments, and set of "dodgy" type variables See Note [Dodgy binding sites in type family instances] in GHC.Tc.Validity

- !(NonEmpty Name)

  the out-of-scope type variables

FamInstLHSUnusedBoundTyVars !(NonEmpty InvalidFamInstQTv) | the unused bound type variables
InvalidAssoc !InvalidAssoc |

#### Instances

Instances details

Generic IllegalFamilyInstanceReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalFamilyInstanceReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalFamilyInstanceReason = D1 ('MetaData "IllegalFamilyInstanceReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "NotAFamilyTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeOrData) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "NotAnOpenFamilyTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "FamilyCategoryMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "FamilyArityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity)))) :+: ((C1 ('MetaCons "TyFamNameMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "FamInstRHSOutOfScopeTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (TyCon, [Type], TyVarSet))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty Name)))) :+: (C1 ('MetaCons "FamInstLHSUnusedBoundTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty InvalidFamInstQTv))) :+: C1 ('MetaCons "InvalidAssoc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InvalidAssoc)))))

Methods

from :: IllegalFamilyInstanceReason -> Rep IllegalFamilyInstanceReason x #

to :: Rep IllegalFamilyInstanceReason x -> IllegalFamilyInstanceReason #

type Rep IllegalFamilyInstanceReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalFamilyInstanceReason = D1 ('MetaData "IllegalFamilyInstanceReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "NotAFamilyTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeOrData) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "NotAnOpenFamilyTyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "FamilyCategoryMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "FamilyArityMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Arity)))) :+: ((C1 ('MetaCons "TyFamNameMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "FamInstRHSOutOfScopeTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe (TyCon, [Type], TyVarSet))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty Name)))) :+: (C1 ('MetaCons "FamInstLHSUnusedBoundTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty InvalidFamInstQTv))) :+: C1 ('MetaCons "InvalidAssoc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InvalidAssoc)))))

data InvalidFamInstQTv #

A quantified type variable in a type or data family equation that is either not bound in any LHS patterns or not used in the RHS (or both).

Constructors

InvalidFamInstQTv |

Fields

- ifiqtv :: TcTyVar
- ifiqtv_user_written :: Bool

  Did the user write this type variable, or was introduced by GHC? For example: with `-XPolyKinds`, in `type instance forall a. F = ()`, we have a user-written `a` but GHC introduces a kind variable `k` as well. See #23734.

- ifiqtv_reason :: InvalidFamInstQTvReason

  For what reason was the quantified type variable invalid?

#### Instances

Instances details

NamedThing InvalidFamInstQTv # |
Instance details Defined in GHC.Tc.Errors.Types Methods getOccName :: InvalidFamInstQTv -> OccName # getName :: InvalidFamInstQTv -> Name #

data InvalidFamInstQTvReason #

Constructors

InvalidFamInstQTvDodgy | A dodgy binder, i.e. a variable that syntactically appears in LHS patterns but only in non-injective positions. See Note [Dodgy binding sites in type family instances] in GHC.Tc.Validity.
InvalidFamInstQTvNotBoundInPats | A quantified type variable in a type or data family equation that is not bound in any LHS patterns.
InvalidFamInstQTvNotUsedInRHS | A quantified type variable in a type or data family equation that is not used on the RHS.

data InvalidAssoc #

Constructors

InvalidAssocInstance !InvalidAssocInstance | An invalid associated family instance. See `InvalidAssocInstance`.Builder
InvalidAssocDefault !InvalidAssocDefault | An invalid associated family default declaration. See `InvalidAssocDefault`.

#### Instances

Instances details

Generic InvalidAssoc # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep InvalidAssoc |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep InvalidAssoc = D1 ('MetaData "InvalidAssoc" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "InvalidAssocInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InvalidAssocInstance)) :+: C1 ('MetaCons "InvalidAssocDefault" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InvalidAssocDefault)))

Methods

from :: InvalidAssoc -> Rep InvalidAssoc x #

to :: Rep InvalidAssoc x -> InvalidAssoc #

type Rep InvalidAssoc # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep InvalidAssoc = D1 ('MetaData "InvalidAssoc" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "InvalidAssocInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InvalidAssocInstance)) :+: C1 ('MetaCons "InvalidAssocDefault" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InvalidAssocDefault)))

data InvalidAssocInstance #

The reason that an associated family instance was invalid.

Constructors

AssocInstanceMissing !Name | A class instance is missing its expected associated type/data instance. Test cases: derivingshould_compileT14094 indexed-typesshould_compileSimple2 typecheckshould_compiletc254
AssocInstanceNotInAClass !TyCon | A top-level instance for an associated family `TyCon`. Example: class C a where { type T a } instance T Int = Bool Test case: indexed-typesshould_failSimpleFail7
AssocNotInThisClass !Class !TyCon | An associated type instance is provided for a class that doesn't have that 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
AssocNoClassTyVar !Class !TyCon | An associated family instance does not mention any of the parent `Class` `TyVar`s. Test cases: T2888, T9167, T12867
AssocTyVarsDontMatch |

Fields

- !ForAllTyFlag
- !TyCon

  family `TyCon`

- ![Type]

  expected type arguments

- ![Type]

  actual type arguments

#### Instances

Instances details

Generic InvalidAssocInstance # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep InvalidAssocInstance |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep InvalidAssocInstance = D1 ('MetaData "InvalidAssocInstance" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "AssocInstanceMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "AssocInstanceNotInAClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "AssocNotInThisClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: (C1 ('MetaCons "AssocNoClassTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "AssocTyVarsDontMatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ForAllTyFlag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]))))))

Methods

from :: InvalidAssocInstance -> Rep InvalidAssocInstance x #

to :: Rep InvalidAssocInstance x -> InvalidAssocInstance #

type Rep InvalidAssocInstance # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep InvalidAssocInstance = D1 ('MetaData "InvalidAssocInstance" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "AssocInstanceMissing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "AssocInstanceNotInAClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon))) :+: (C1 ('MetaCons "AssocNotInThisClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: (C1 ('MetaCons "AssocNoClassTyVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Class) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :+: C1 ('MetaCons "AssocTyVarsDontMatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ForAllTyFlag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]))))))

data InvalidAssocDefault #

The reason that an associated family default declaration was invalid.

Constructors

AssocDefaultNotAssoc | An associated family default declaration for something that isn't an associated family.

Fields

- !Name

  `Class` `Name`

- !Name

  `TyCon` `Name` | Multiple default declarations were given for an associated family instance.

  Test cases: none.

AssocMultipleDefaults !Name |
AssocDefaultBadArgs !TyCon ![Type] AssocDefaultBadArgs | Invalid arguments in an associated family instance. See `AssocDefaultBadArgs`.

#### Instances

Instances details

Generic InvalidAssocDefault # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep InvalidAssocDefault |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep InvalidAssocDefault = D1 ('MetaData "InvalidAssocDefault" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "AssocDefaultNotAssoc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: (C1 ('MetaCons "AssocMultipleDefaults" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "AssocDefaultBadArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssocDefaultBadArgs)))))

Methods

from :: InvalidAssocDefault -> Rep InvalidAssocDefault x #

to :: Rep InvalidAssocDefault x -> InvalidAssocDefault #

type Rep InvalidAssocDefault # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep InvalidAssocDefault = D1 ('MetaData "InvalidAssocDefault" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "AssocDefaultNotAssoc" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: (C1 ('MetaCons "AssocMultipleDefaults" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: C1 ('MetaCons "AssocDefaultBadArgs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssocDefaultBadArgs)))))

data AssocDefaultBadArgs #

Invalid arguments in an associated family instance declaration.

Constructors

AssocDefaultNonTyVarArg !(Type, ForAllTyFlag) | An argument which isn't a type variable in an associated family instance default declaration.
AssocDefaultDuplicateTyVars !(NonEmpty (TyCoVar, ForAllTyFlag)) | Duplicate occurrence of a type variable in an associated family instance default declaration.

#### Instances

Instances details

Generic AssocDefaultBadArgs # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep AssocDefaultBadArgs |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep AssocDefaultBadArgs = D1 ('MetaData "AssocDefaultBadArgs" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "AssocDefaultNonTyVarArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Type, ForAllTyFlag))) :+: C1 ('MetaCons "AssocDefaultDuplicateTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (TyCoVar, ForAllTyFlag)))))

Methods

from :: AssocDefaultBadArgs -> Rep AssocDefaultBadArgs x #

to :: Rep AssocDefaultBadArgs x -> AssocDefaultBadArgs #

type Rep AssocDefaultBadArgs # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep AssocDefaultBadArgs = D1 ('MetaData "AssocDefaultBadArgs" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "AssocDefaultNonTyVarArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Type, ForAllTyFlag))) :+: C1 ('MetaCons "AssocDefaultDuplicateTyVars" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (NonEmpty (TyCoVar, ForAllTyFlag)))))

# Template Haskell errors

data THError #

Constructors

THSyntaxError !THSyntaxError | A syntax error with Template Haskel quotes & splices. See `THSyntaxError`.
THNameError !THNameError | An error in Template Haskell involving `Name`s. See `THNameError`.
THReifyError !THReifyError | An error in Template Haskell reification. See `THReifyError`.
TypedTHError !TypedTHError | An error due to typing restrictions in Typed Template Haskell. See `TypedTHError`.
THSpliceFailed !SpliceFailReason | An error occurred when trying to run a splice in Template Haskell. See `SpliceFailReason`.
AddTopDeclsError !AddTopDeclsError | An error involving the `addTopDecls` functionality. See `AddTopDeclsError`.
IllegalStaticFormInSplice !(HsExpr GhcPs) | IllegalStaticFormInSplice is an error when a user attempts to define a static pointer in a Template Haskell splice. Example(s): Test cases: th/TH_StaticPointers02
FailedToLookupThInstName !Type !LookupTHInstNameErrReason | FailedToLookupThInstName is a Template Haskell error that occurrs when looking up an instance fails. Example(s): Test cases: showIfaceshould_failTHPutDocNonExistent
AddInvalidCorePlugin | AddInvalidCorePlugin 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

- !String

  Module name

AddDocToNonLocalDefn !DocLoc | AddDocToNonLocalDefn 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
ReportCustomQuasiError | ReportCustomQuasiError is an error or warning thrown using `qReport` from the `Quasi` instance of `TcM`. Example(s): Test cases:

Fields

- !Bool

  True => Error, False => Warning

- !String

  Error body

#### Instances

Instances details

Generic THError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep THError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THError = D1 ('MetaData "THError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "THSyntaxError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THSyntaxError)) :+: C1 ('MetaCons "THNameError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THNameError))) :+: (C1 ('MetaCons "THReifyError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THReifyError)) :+: (C1 ('MetaCons "TypedTHError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypedTHError)) :+: C1 ('MetaCons "THSpliceFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SpliceFailReason))))) :+: ((C1 ('MetaCons "AddTopDeclsError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AddTopDeclsError)) :+: (C1 ('MetaCons "IllegalStaticFormInSplice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "FailedToLookupThInstName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LookupTHInstNameErrReason)))) :+: (C1 ('MetaCons "AddInvalidCorePlugin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "AddDocToNonLocalDefn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DocLoc)) :+: C1 ('MetaCons "ReportCustomQuasiError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))))

Methods

from :: THError -> Rep THError x #

to :: Rep THError x -> THError #

type Rep THError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THError = D1 ('MetaData "THError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "THSyntaxError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THSyntaxError)) :+: C1 ('MetaCons "THNameError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THNameError))) :+: (C1 ('MetaCons "THReifyError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THReifyError)) :+: (C1 ('MetaCons "TypedTHError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypedTHError)) :+: C1 ('MetaCons "THSpliceFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SpliceFailReason))))) :+: ((C1 ('MetaCons "AddTopDeclsError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AddTopDeclsError)) :+: (C1 ('MetaCons "IllegalStaticFormInSplice" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "FailedToLookupThInstName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LookupTHInstNameErrReason)))) :+: (C1 ('MetaCons "AddInvalidCorePlugin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: (C1 ('MetaCons "AddDocToNonLocalDefn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DocLoc)) :+: C1 ('MetaCons "ReportCustomQuasiError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String))))))

data THSyntaxError #

An error involving Template Haskell quotes or splices, e.g. nested quotation brackets or the use of an untyped bracket inside a typed splice.

Constructors

IllegalTHQuotes !(HsExpr GhcPs) | IllegalTHQuotes is an error that occurs when a Template Haskell quote is used without the TemplateHaskell extension enabled. Test case: T18251e
IllegalTHSplice | IllegalTHSplice is an error that occurs when a Template Haskell splice occurs without having enabled the TemplateHaskell extension. Test cases: bkpfail01, bkpfail05, bkpfail09, bkpfail16, bkpfail35, bkpcabal06
NestedTHBrackets | NestedTHBrackets is an error that occurs when Template Haskell brackets are nested without any intervening splices. Example: foo = [| [| `x` |] |] Test cases: TH_NestedSplicesFail{5,6,7,8}
MismatchedSpliceType | MismatchedSpliceType is an error that happens when a typed bracket or splice is used inside a typed splice/bracket, or the other way around. Examples: f1 = [| $$x |] f2 = [|| $y ||] f3 = $$( [| `x` |] ) f4 = $( [|| `y` ||] ) Test cases: TH_NestedSplicesFail{1,2,3,4}

Fields

- SpliceType

  type of the splice

- SpliceOrBracket

  what's nested inside

BadImplicitSplice | BadImplicitSplice is an error thrown when a user uses top-level implicit TH-splice without enabling the TemplateHaskell extension. Example: pure [] -- on top-level Test cases: ghciprog019prog019 ghciscriptsT1914 ghciscriptsT6106 renameshould_failT4042 renameshould_failT12146

#### Instances

Instances details

Generic THSyntaxError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep THSyntaxError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THSyntaxError = D1 ('MetaData "THSyntaxError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "IllegalTHQuotes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "IllegalTHSplice" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NestedTHBrackets" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MismatchedSpliceType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SpliceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SpliceOrBracket)) :+: C1 ('MetaCons "BadImplicitSplice" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: THSyntaxError -> Rep THSyntaxError x #

to :: Rep THSyntaxError x -> THSyntaxError #

type Rep THSyntaxError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THSyntaxError = D1 ('MetaData "THSyntaxError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "IllegalTHQuotes" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsExpr GhcPs))) :+: C1 ('MetaCons "IllegalTHSplice" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NestedTHBrackets" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MismatchedSpliceType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SpliceType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SpliceOrBracket)) :+: C1 ('MetaCons "BadImplicitSplice" 'PrefixI 'False) (U1 :: Type -> Type))))

data THNameError #

Constructors

NonExactName !RdrName | NonExactName is a Template Haskell error that occurs when the user attempts to define a binder with a `RdrName` that is not an exact `Name`. Example(s): Test cases:
QuotedNameWrongStage !(HsQuote GhcPs) | QuotedNameWrongStage is an error that can happen when a (non-top-level) Name is used at a different Template Haskell stage than the stage at which it is bound. Test cases: T16976z

#### Instances

Instances details

Generic THNameError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep THNameError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THNameError = D1 ('MetaData "THNameError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "NonExactName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "QuotedNameWrongStage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsQuote GhcPs))))

Methods

from :: THNameError -> Rep THNameError x #

to :: Rep THNameError x -> THNameError #

type Rep THNameError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THNameError = D1 ('MetaData "THNameError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "NonExactName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RdrName)) :+: C1 ('MetaCons "QuotedNameWrongStage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsQuote GhcPs))))

data THReifyError #

Constructors

CannotReifyInstance !Type | CannotReifyInstance 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:
CannotReifyOutOfScopeThing !Name | CannotReifyOutOfScopeThing 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
CannotReifyThingNotInTypeEnv !Name | CannotReifyThingNotInTypeEnv 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:
NoRolesAssociatedWithThing !TcTyThing | NoRolesAssociatedWithName 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:
CannotRepresentType !UnrepresentableTypeDescr !Type | CannotRepresentThing 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:

#### Instances

Instances details

Generic THReifyError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep THReifyError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THReifyError = D1 ('MetaData "THReifyError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "CannotReifyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "CannotReifyOutOfScopeThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "CannotReifyThingNotInTypeEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: (C1 ('MetaCons "NoRolesAssociatedWithThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyThing)) :+: C1 ('MetaCons "CannotRepresentType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnrepresentableTypeDescr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))))

Methods

from :: THReifyError -> Rep THReifyError x #

to :: Rep THReifyError x -> THReifyError #

type Rep THReifyError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep THReifyError = D1 ('MetaData "THReifyError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "CannotReifyInstance" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "CannotReifyOutOfScopeThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name))) :+: (C1 ('MetaCons "CannotReifyThingNotInTypeEnv" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)) :+: (C1 ('MetaCons "NoRolesAssociatedWithThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcTyThing)) :+: C1 ('MetaCons "CannotRepresentType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnrepresentableTypeDescr) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))))

data TypedTHError #

Constructors

SplicePolymorphicLocalVar !Id | SplicePolymorphicLocalVar is the error that occurs when the expression inside typed Template Haskell brackets is a polymorphic local variable. Example(s): x = (y :: forall a. a -> a) -> [|| y ||] Test cases: quotes/T10384
TypedTHWithPolyType !TcType | TypedTHWithPolyType 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

#### Instances

Instances details

Generic TypedTHError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TypedTHError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypedTHError = D1 ('MetaData "TypedTHError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "SplicePolymorphicLocalVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "TypedTHWithPolyType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcType)))

Methods

from :: TypedTHError -> Rep TypedTHError x #

to :: Rep TypedTHError x -> TypedTHError #

type Rep TypedTHError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypedTHError = D1 ('MetaData "TypedTHError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "SplicePolymorphicLocalVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Id)) :+: C1 ('MetaCons "TypedTHWithPolyType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TcType)))

data SpliceFailReason #

Constructors

SpliceThrewException | SpliceThrewException is an error that occurs 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

- !SplicePhase
- !SomeException
- !String

  Result of showing the exception (cannot be done safely outside IO)

- !(LHsExpr GhcTc)
- !Bool

RunSpliceFailure !RunSpliceFailReason

RunSpliceFailure 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/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

#### Instances

Instances details

Generic SpliceFailReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep SpliceFailReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep SpliceFailReason = D1 ('MetaData "SpliceFailReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "SpliceThrewException" '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 "RunSpliceFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RunSpliceFailReason)))

Methods

from :: SpliceFailReason -> Rep SpliceFailReason x #

to :: Rep SpliceFailReason x -> SpliceFailReason #

type Rep SpliceFailReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep SpliceFailReason = D1 ('MetaData "SpliceFailReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "SpliceThrewException" '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 "RunSpliceFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RunSpliceFailReason)))

data RunSpliceFailReason #

Constructors

ConversionFail !ThingBeingConverted !ConversionFailReason |

#### Instances

Instances details

Generic RunSpliceFailReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep RunSpliceFailReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep RunSpliceFailReason = D1 ('MetaData "RunSpliceFailReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "ConversionFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ThingBeingConverted) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConversionFailReason)))

Methods

from :: RunSpliceFailReason -> Rep RunSpliceFailReason x #

to :: Rep RunSpliceFailReason x -> RunSpliceFailReason #

type Rep RunSpliceFailReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep RunSpliceFailReason = D1 ('MetaData "RunSpliceFailReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "ConversionFail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ThingBeingConverted) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConversionFailReason)))

data AddTopDeclsError #

Constructors

InvalidTopDecl !(HsDecl GhcPs) | InvalidTopDecl is a Template Haskell error occurring when one of the `Dec`s passed to `addTopDecls` is not a function, value, annotation, or foreign import declaration. Example(s): Test cases:
AddTopDeclsUnexpectedDeclarationSplice | UnexpectedDeclarationSplice is an error that occurs when a Template Haskell splice appears inside top-level declarations added with `addTopDecls`. Example(s): none Test cases: none
AddTopDeclsRunSpliceFailure !RunSpliceFailReason |

#### Instances

Instances details

Generic AddTopDeclsError # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep AddTopDeclsError |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep AddTopDeclsError = D1 ('MetaData "AddTopDeclsError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "InvalidTopDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))) :+: (C1 ('MetaCons "AddTopDeclsUnexpectedDeclarationSplice" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AddTopDeclsRunSpliceFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RunSpliceFailReason))))

Methods

from :: AddTopDeclsError -> Rep AddTopDeclsError x #

to :: Rep AddTopDeclsError x -> AddTopDeclsError #

type Rep AddTopDeclsError # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep AddTopDeclsError = D1 ('MetaData "AddTopDeclsError" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "InvalidTopDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HsDecl GhcPs))) :+: (C1 ('MetaCons "AddTopDeclsUnexpectedDeclarationSplice" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AddTopDeclsRunSpliceFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RunSpliceFailReason))))

data ConversionFailReason #

The reason a TH splice could not be converted to a Haskell expression

Constructors

IllegalOccName !NameSpace !String |
SumAltArityExceeded !SumAlt !SumArity |
IllegalSumAlt !SumAlt |
IllegalSumArity !SumArity |
MalformedType !TypeOrKind !Type |
IllegalLastStatement !HsDoFlavour !(LStmt GhcPs (LHsExpr GhcPs)) |
KindSigsOnlyAllowedOnGADTs |
IllegalDeclaration !THDeclDescriptor !IllegalDecls |
CannotMixGADTConsWith98Cons |
EmptyStmtListInDoBlock |
NonVarInInfixExpr |
MultiWayIfWithoutAlts |
CasesExprWithoutAlts |
ImplicitParamsWithOtherBinds |
InvalidCCallImpent !String | Source
RecGadtNoCons |
GadtNoCons |
InvalidTypeInstanceHeader !Type |
InvalidTyFamInstLHS !Type |
InvalidImplicitParamBinding |
DefaultDataInstDecl ![LDataFamInstDecl GhcPs] |
FunBindLacksEquations !Name |

#### Instances

Instances details

Generic ConversionFailReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep ConversionFailReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep ConversionFailReason = D1 ('MetaData "ConversionFailReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((((C1 ('MetaCons "IllegalOccName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NameSpace) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "SumAltArityExceeded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumAlt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumArity))) :+: (C1 ('MetaCons "IllegalSumAlt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumAlt)) :+: (C1 ('MetaCons "IllegalSumArity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumArity)) :+: C1 ('MetaCons "MalformedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeOrKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))) :+: ((C1 ('MetaCons "IllegalLastStatement" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsDoFlavour) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LStmt GhcPs (LHsExpr GhcPs)))) :+: (C1 ('MetaCons "KindSigsOnlyAllowedOnGADTs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IllegalDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THDeclDescriptor) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalDecls)))) :+: (C1 ('MetaCons "CannotMixGADTConsWith98Cons" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EmptyStmtListInDoBlock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonVarInInfixExpr" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MultiWayIfWithoutAlts" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CasesExprWithoutAlts" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ImplicitParamsWithOtherBinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InvalidCCallImpent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "RecGadtNoCons" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GadtNoCons" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InvalidTypeInstanceHeader" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "InvalidTyFamInstLHS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "InvalidImplicitParamBinding" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DefaultDataInstDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [LDataFamInstDecl GhcPs])) :+: C1 ('MetaCons "FunBindLacksEquations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))))))

Methods

from :: ConversionFailReason -> Rep ConversionFailReason x #

to :: Rep ConversionFailReason x -> ConversionFailReason #

type Rep ConversionFailReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep ConversionFailReason = D1 ('MetaData "ConversionFailReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((((C1 ('MetaCons "IllegalOccName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NameSpace) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "SumAltArityExceeded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumAlt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumArity))) :+: (C1 ('MetaCons "IllegalSumAlt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumAlt)) :+: (C1 ('MetaCons "IllegalSumArity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SumArity)) :+: C1 ('MetaCons "MalformedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TypeOrKind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))))) :+: ((C1 ('MetaCons "IllegalLastStatement" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HsDoFlavour) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LStmt GhcPs (LHsExpr GhcPs)))) :+: (C1 ('MetaCons "KindSigsOnlyAllowedOnGADTs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IllegalDeclaration" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 THDeclDescriptor) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IllegalDecls)))) :+: (C1 ('MetaCons "CannotMixGADTConsWith98Cons" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EmptyStmtListInDoBlock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonVarInInfixExpr" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MultiWayIfWithoutAlts" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CasesExprWithoutAlts" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ImplicitParamsWithOtherBinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InvalidCCallImpent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)) :+: C1 ('MetaCons "RecGadtNoCons" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GadtNoCons" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InvalidTypeInstanceHeader" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)) :+: C1 ('MetaCons "InvalidTyFamInstLHS" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type)))) :+: (C1 ('MetaCons "InvalidImplicitParamBinding" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DefaultDataInstDecl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [LDataFamInstDecl GhcPs])) :+: C1 ('MetaCons "FunBindLacksEquations" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))))))

data UnrepresentableTypeDescr #

Constructors

LinearInvisibleArgument |
CoercionsInTypes |

data LookupTHInstNameErrReason #

Constructors

NoMatchesFound |
CouldNotDetermineInstance |

data SplicePhase #

The phase in which an exception was encountered when dealing with a TH splice

Constructors

SplicePhase_Run |
SplicePhase_CompileAndLink |

data THDeclDescriptor #

Label for a TH declaration

Constructors

InstanceDecl |
WhereClause |
LetBinding |
LetExpression |
ClssDecl |

data ThingBeingConverted #

Identifies the TH splice attempting to be converted

Constructors

ConvDec !Dec |
ConvExp !Exp |
ConvPat !Pat |
ConvType !Type |

data IllegalDecls #

Constructors

IllegalDecls !(NonEmpty (LHsDecl GhcPs)) |
IllegalFamDecls !(NonEmpty (LFamilyDecl GhcPs)) |

# Zonker errors

data ZonkerMessage where #

Constructors

ZonkerCannotDefaultConcrete :: !FixedRuntimeRepOrigin -> ZonkerMessage | ZonkerCannotDefaultConcrete is an error occurring when a concrete type variable cannot be defaulted. Test cases: T23153

#### Instances

Instances details

Generic ZonkerMessage # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep ZonkerMessage |
Instance details Defined in GHC.Tc.Errors.Types type Rep ZonkerMessage = D1 ('MetaData "ZonkerMessage" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "ZonkerCannotDefaultConcrete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FixedRuntimeRepOrigin)))

Methods

from :: ZonkerMessage -> Rep ZonkerMessage x #

to :: Rep ZonkerMessage x -> ZonkerMessage #

type Rep ZonkerMessage # |
Instance details Defined in GHC.Tc.Errors.Types type Rep ZonkerMessage = D1 ('MetaData "ZonkerMessage" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (C1 ('MetaCons "ZonkerCannotDefaultConcrete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FixedRuntimeRepOrigin)))

data IllegalForeignTypeReason #

Constructors

TypeCannotBeMarshaled !Type TypeCannotBeMarshaledReason |
ForeignDynNotPtr |

Fields

- !Type

  Expected type

- !Type

  Actual type

SafeHaskellMustBeInIO |
IOResultExpected |
UnexpectedNestedForall |
LinearTypesNotAllowed |
OneArgExpected |
AtLeastOneArgExpected |

#### Instances

Instances details

Generic IllegalForeignTypeReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep IllegalForeignTypeReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalForeignTypeReason = D1 ('MetaData "IllegalForeignTypeReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "TypeCannotBeMarshaled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeCannotBeMarshaledReason)) :+: C1 ('MetaCons "ForeignDynNotPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))) :+: (C1 ('MetaCons "SafeHaskellMustBeInIO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IOResultExpected" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UnexpectedNestedForall" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LinearTypesNotAllowed" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OneArgExpected" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AtLeastOneArgExpected" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: IllegalForeignTypeReason -> Rep IllegalForeignTypeReason x #

to :: Rep IllegalForeignTypeReason x -> IllegalForeignTypeReason #

type Rep IllegalForeignTypeReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep IllegalForeignTypeReason = D1 ('MetaData "IllegalForeignTypeReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) (((C1 ('MetaCons "TypeCannotBeMarshaled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeCannotBeMarshaledReason)) :+: C1 ('MetaCons "ForeignDynNotPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Type))) :+: (C1 ('MetaCons "SafeHaskellMustBeInIO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IOResultExpected" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UnexpectedNestedForall" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LinearTypesNotAllowed" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OneArgExpected" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AtLeastOneArgExpected" 'PrefixI 'False) (U1 :: Type -> Type))))

data TypeCannotBeMarshaledReason #

Reason why a type cannot be marshalled through the FFI.

Constructors

NotADataType |
NewtypeDataConNotInScope !TyCon ![Type] |
UnliftedFFITypesNeeded |
NotABoxedMarshalableTyCon |
ForeignLabelNotAPtr |
NotSimpleUnliftedType |
NotBoxedKindAny |

#### Instances

Instances details

Generic TypeCannotBeMarshaledReason # |

Instance details

Defined in GHC.Tc.Errors.Types

Associated Types

type Rep TypeCannotBeMarshaledReason |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypeCannotBeMarshaledReason = D1 ('MetaData "TypeCannotBeMarshaledReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "NotADataType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NewtypeDataConNotInScope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type])) :+: C1 ('MetaCons "UnliftedFFITypesNeeded" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "NotABoxedMarshalableTyCon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ForeignLabelNotAPtr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NotSimpleUnliftedType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotBoxedKindAny" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: TypeCannotBeMarshaledReason -> Rep TypeCannotBeMarshaledReason x #

to :: Rep TypeCannotBeMarshaledReason x -> TypeCannotBeMarshaledReason #

type Rep TypeCannotBeMarshaledReason # |

Instance details

Defined in GHC.Tc.Errors.Types

type Rep TypeCannotBeMarshaledReason = D1 ('MetaData "TypeCannotBeMarshaledReason" "GHC.Tc.Errors.Types" "ghc-lib-parser-9.10.1.20250103-FaHJOkjTl0Y9STmjhYbIHo" 'False) ((C1 ('MetaCons "NotADataType" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NewtypeDataConNotInScope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TyCon) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Type])) :+: C1 ('MetaCons "UnliftedFFITypesNeeded" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "NotABoxedMarshalableTyCon" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ForeignLabelNotAPtr" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NotSimpleUnliftedType" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotBoxedKindAny" 'PrefixI 'False) (U1 :: Type -> Type))))