Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data TcRnMessage where
- TcRnUnknownMessage :: UnknownDiagnostic -> TcRnMessage
- TcRnMessageWithInfo :: !UnitState -> !TcRnMessageDetailed -> TcRnMessage
- TcRnWithHsDocContext :: !HsDocContext -> !TcRnMessage -> TcRnMessage
- TcRnSolverReport :: SolverReportWithCtxt -> DiagnosticReason -> [GhcHint] -> TcRnMessage
- TcRnRedundantConstraints :: [Id] -> (SkolemInfoAnon, Bool) -> TcRnMessage
- TcRnInaccessibleCode :: Implication -> SolverReportWithCtxt -> TcRnMessage
- TcRnTypeDoesNotHaveFixedRuntimeRep :: !Type -> !FixedRuntimeRepProvenance -> !ErrInfo -> TcRnMessage
- TcRnImplicitLift :: Name -> !ErrInfo -> TcRnMessage
- TcRnUnusedPatternBinds :: HsBind GhcRn -> TcRnMessage
- TcRnDodgyImports :: RdrName -> TcRnMessage
- TcRnDodgyExports :: Name -> TcRnMessage
- TcRnMissingImportList :: IE GhcPs -> TcRnMessage
- TcRnUnsafeDueToPlugin :: TcRnMessage
- TcRnModMissingRealSrcSpan :: Module -> TcRnMessage
- TcRnIdNotExportedFromModuleSig :: Name -> Module -> TcRnMessage
- TcRnIdNotExportedFromLocalSig :: Name -> TcRnMessage
- TcRnShadowedName :: OccName -> ShadowedNameProvenance -> 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
- TcRnDuplicateFieldName :: !RecordFieldPart -> NonEmpty RdrName -> TcRnMessage
- TcRnIllegalViewPattern :: !(Pat GhcPs) -> TcRnMessage
- TcRnCharLiteralOutOfRange :: !Char -> 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
- TcRnIllegalHsBootFileDecl :: TcRnMessage
- TcRnRecursivePatternSynonym :: LHsBinds GhcRn -> TcRnMessage
- TcRnPartialTypeSigTyVarMismatch :: Name -> Name -> Name -> LHsSigWcType GhcRn -> TcRnMessage
- TcRnPartialTypeSigBadQuantifier :: Name -> Name -> Maybe Type -> LHsSigWcType GhcRn -> TcRnMessage
- TcRnMissingSignature :: MissingSignature -> Exported -> Bool -> TcRnMessage
- TcRnPolymorphicBinderMissingSig :: Name -> Type -> TcRnMessage
- TcRnOverloadedSig :: TcIdSigInfo -> TcRnMessage
- TcRnTupleConstraintInst :: !Class -> TcRnMessage
- TcRnAbstractClassInst :: !Class -> TcRnMessage
- TcRnNoClassInstHead :: !Type -> 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
- TcRnIllegalClassInst :: !TyConFlavour -> TcRnMessage
- TcRnOversaturatedVisibleKindArg :: !Type -> TcRnMessage
- TcRnBadAssociatedType :: !Name -> !Name -> TcRnMessage
- TcRnForAllRankErr :: !Rank -> !Type -> TcRnMessage
- TcRnMonomorphicBindings :: [Name] -> TcRnMessage
- TcRnOrphanInstance :: ClsInst -> 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 :: GreName -> IE GhcPs -> IE GhcPs -> TcRnMessage
- TcRnExportedParentChildMismatch :: Name -> TyThing -> GreName -> [Name] -> TcRnMessage
- TcRnConflictingExports :: OccName -> GreName -> GlobalRdrElt -> IE GhcPs -> GreName -> GlobalRdrElt -> IE GhcPs -> TcRnMessage
- TcRnAmbiguousField :: HsExpr GhcRn -> TyCon -> TcRnMessage
- TcRnMissingFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage
- TcRnFieldUpdateInvalidType :: [(FieldLabelString, TcType)] -> TcRnMessage
- TcRnNoConstructorHasAllFields :: [FieldLabelString] -> TcRnMessage
- TcRnMixedSelectors :: Name -> [Id] -> Name -> [Id] -> TcRnMessage
- TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage
- TcRnNoPossibleParentForFields :: [LHsRecUpdField GhcRn] -> TcRnMessage
- TcRnBadOverloadedRecordUpdate :: [LHsRecUpdField GhcRn] -> TcRnMessage
- TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage
- TcRnSpecialClassInst :: !Class -> !Bool -> 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
- TcRnForallIdentifier :: RdrName -> TcRnMessage
- TcRnTypeEqualityOutOfScope :: TcRnMessage
- TcRnTypeEqualityRequiresOperators :: TcRnMessage
- TcRnIllegalTypeOperator :: !SDoc -> !RdrName -> TcRnMessage
- TcRnIllegalTypeOperatorDecl :: !RdrName -> TcRnMessage
- TcRnGADTMonoLocalBinds :: TcRnMessage
- TcRnNotInScope :: NotInScopeError -> RdrName -> [ImportError] -> [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
- TcRnNotARecordSelector :: !Name -> TcRnMessage
- TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage
- TcRnPatSynNotBidirectional :: !Name -> TcRnMessage
- TcRnSplicePolymorphicLocalVar :: !Id -> TcRnMessage
- TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage
- TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage
- TcRnIllegalRecordSyntax :: !(HsType GhcRn) -> TcRnMessage
- TcRnUnexpectedTypeSplice :: !(HsType GhcRn) -> TcRnMessage
- TcRnInvalidVisibleKindArgument :: !(LHsType GhcRn) -> !Type -> TcRnMessage
- TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr () GhcRn] -> TcRnMessage
- TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage
- TcRnInvalidReturnKind :: !DataSort -> !AllowedDataResKind -> !Kind -> !(Maybe SuggestUnliftedTypes) -> TcRnMessage
- TcRnClassKindNotConstraint :: !Kind -> TcRnMessage
- TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage
- TcRnMatchesHaveDiffNumArgs :: !(HsMatchContext GhcTc) -> !MatchArgBadMatches -> 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
- TcRnNameByTemplateHaskellQuote :: !RdrName -> TcRnMessage
- TcRnIllegalBindingOfBuiltIn :: !OccName -> TcRnMessage
- TcRnPragmaWarning :: {..} -> TcRnMessage
- TcRnIllegalHsigDefaultMethods :: !Name -> NonEmpty (LHsBind GhcRn) -> TcRnMessage
- TcRnBadGenericMethod :: !Name -> !Name -> TcRnMessage
- TcRnWarningMinimalDefIncomplete :: ClassMinimalDef -> TcRnMessage
- TcRnDefaultMethodForPragmaLacksBinding :: Id -> Sig GhcRn -> TcRnMessage
- TcRnIgnoreSpecialisePragmaOnDefMethod :: !Name -> TcRnMessage
- TcRnBadMethodErr :: {..} -> TcRnMessage
- TcRnNoExplicitAssocTypeOrDefaultDeclaration :: Name -> TcRnMessage
- TcRnIllegalNewtype :: DataCon -> Bool -> IllegalNewtypeReason -> TcRnMessage
- TcRnIllegalTypeData :: TcRnMessage
- TcRnTypeDataForbids :: !TypeDataForbids -> TcRnMessage
- TcRnTypedTHWithPolyType :: !TcType -> TcRnMessage
- TcRnSpliceThrewException :: !SplicePhase -> !SomeException -> !String -> !(LHsExpr GhcTc) -> !Bool -> TcRnMessage
- TcRnInvalidTopDecl :: !(HsDecl GhcPs) -> TcRnMessage
- TcRnNonExactName :: !RdrName -> TcRnMessage
- TcRnAddInvalidCorePlugin :: !String -> TcRnMessage
- TcRnAddDocToNonLocalDefn :: !DocLoc -> TcRnMessage
- TcRnFailedToLookupThInstName :: !Type -> !LookupTHInstNameErrReason -> TcRnMessage
- TcRnCannotReifyInstance :: !Type -> TcRnMessage
- TcRnCannotReifyOutOfScopeThing :: !Name -> TcRnMessage
- TcRnCannotReifyThingNotInTypeEnv :: !Name -> TcRnMessage
- TcRnNoRolesAssociatedWithThing :: !TcTyThing -> TcRnMessage
- TcRnCannotRepresentType :: !UnrepresentableTypeDescr -> !Type -> TcRnMessage
- TcRnRunSpliceFailure :: !(Maybe String) -> !RunSpliceFailReason -> TcRnMessage
- TcRnReportCustomQuasiError :: !Bool -> !String -> TcRnMessage
- TcRnInterfaceLookupError :: !Name -> !SDoc -> TcRnMessage
- TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage
- TcRnMisplacedInstSig :: Name -> LHsSigType GhcRn -> TcRnMessage
- TcRnBadBootFamInstDecl :: {..} -> TcRnMessage
- TcRnIllegalFamilyInstance :: TyCon -> TcRnMessage
- TcRnMissingClassAssoc :: TyCon -> TcRnMessage
- TcRnBadFamInstDecl :: TyCon -> TcRnMessage
- TcRnNotOpenFamily :: TyCon -> TcRnMessage
- TcRnNoRebindableSyntaxRecordDot :: TcRnMessage
- TcRnNoFieldPunsRecordDot :: TcRnMessage
- TcRnIllegalStaticExpression :: HsExpr GhcPs -> TcRnMessage
- TcRnIllegalStaticFormInSplice :: HsExpr GhcPs -> TcRnMessage
- TcRnListComprehensionDuplicateBinding :: Name -> TcRnMessage
- TcRnEmptyStmtsGroup :: EmptyStatementGroupErrReason -> TcRnMessage
- TcRnLastStmtNotExpr :: HsStmtContext GhcRn -> UnexpectedStatement -> TcRnMessage
- TcRnUnexpectedStatementInContext :: HsStmtContext GhcRn -> UnexpectedStatement -> Maybe Extension -> TcRnMessage
- TcRnIllegalTupleSection :: TcRnMessage
- TcRnIllegalImplicitParameterBindings :: Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs) -> TcRnMessage
- TcRnSectionWithoutParentheses :: HsExpr GhcPs -> TcRnMessage
- TcRnLoopySuperclassSolve :: CtLoc -> PredType -> TcRnMessage
- mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage
- data TcRnMessageDetailed = TcRnMessageDetailed !ErrInfo !TcRnMessage
- data TypeDataForbids
- data ErrInfo = ErrInfo {}
- data FixedRuntimeRepProvenance
- pprFixedRuntimeRepProvenance :: FixedRuntimeRepProvenance -> SDoc
- data ShadowedNameProvenance
- data RecordFieldPart
- data IllegalNewtypeReason
- data InjectivityErrReason
- data HasKinds
- hasKinds :: Bool -> HasKinds
- data SuggestUndecidableInstances
- suggestUndecidableInstances :: Bool -> SuggestUndecidableInstances
- data SuggestUnliftedTypes
- data DataSort
- ppDataSort :: DataSort -> SDoc
- data AllowedDataResKind
- data NotClosedReason
- data SuggestPartialTypeSignatures
- 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
- usingGeneralizedNewtypeDeriving :: Bool -> UsingGeneralizedNewtypeDeriving
- data DeriveAnyClassEnabled
- deriveAnyClassEnabled :: Bool -> DeriveAnyClassEnabled
- data DeriveInstanceBadConstructor
- data HasWildcard
- hasWildcard :: Bool -> HasWildcard
- data BadAnonWildcardContext
- data SoleExtraConstraintWildcardAllowed
- data DeriveGenericsErrReason
- data HasAssociatedDataFamInsts
- hasAssociatedDataFamInsts :: Bool -> HasAssociatedDataFamInsts
- data AssociatedTyLastVarInKind
- associatedTyLastVarInKind :: Maybe TyCon -> AssociatedTyLastVarInKind
- data AssociatedTyNotParamOverLastTyVar
- associatedTyNotParamOverLastTyVar :: Maybe TyCon -> AssociatedTyNotParamOverLastTyVar
- data MissingSignature
- data Exported
- 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 {}
- data ErrorItem = EI {}
- errorItemOrigin :: ErrorItem -> CtOrigin
- errorItemEqRel :: ErrorItem -> EqRel
- errorItemPred :: ErrorItem -> PredType
- errorItemCtLoc :: ErrorItem -> CtLoc
- data SolverReport = SolverReport {}
- data SolverReportSupplementary
- data SolverReportWithCtxt = SolverReportWithCtxt {}
- data SolverReportErrCtxt = CEC {}
- getUserGivens :: SolverReportErrCtxt -> [UserGiven]
- discardProvCtxtGivens :: CtOrigin -> [UserGiven] -> [UserGiven]
- data TcSolverReportMsg
- = BadTelescope TyVarBndrs [TyCoVar]
- | UserTypeError Type
- | ReportHoleError Hole HoleError
- | UntouchableVariable { }
- | CannotUnifyVariable { }
- | Mismatch { }
- | FixedRuntimeRepError [FixedRuntimeRepErrorInfo]
- | BlockedEquality ErrorItem
- | ExpectingMoreArguments Int TypedThing
- | UnboundImplicitParams (NonEmpty ErrorItem)
- | AmbiguityPreventsSolvingCt ErrorItem ([TyVar], [TyVar])
- | CannotResolveInstance { }
- | OverlappingInstances { }
- | UnsafeOverlap { }
- data CannotUnifyVariableReason
- data MismatchMsg
- = BasicMismatch { }
- | KindMismatch { }
- | TypeEqMismatch { }
- | CouldNotDeduce { }
- data MismatchEA
- mkPlainMismatchMsg :: MismatchMsg -> TcSolverReportMsg
- mkBasicMismatchMsg :: MismatchEA -> ErrorItem -> Type -> Type -> MismatchMsg
- data WhenMatching = WhenMatching TcType TcType CtOrigin (Maybe TypeOrKind)
- data ExpectedActualInfo
- data TyVarInfo = TyVarInfo {}
- data SameOccInfo = SameOcc {}
- data AmbiguityInfo
- = Ambiguity {
- lead_with_ambig_msg :: Bool
- ambig_tyvars :: ([TyVar], [TyVar])
- | NonInjectiveTyFam TyCon
- = Ambiguity {
- data CND_Extra = CND_Extra TypeOrKind Type Type
- data FitsMbSuppressed = Fits {
- fits :: [HoleFit]
- fitsSuppressed :: Bool
- data ValidHoleFits = ValidHoleFits {}
- noValidHoleFits :: ValidHoleFits
- data HoleFitDispConfig = HFDC {}
- data RelevantBindings = RelevantBindings {
- relevantBindingNamesAndTys :: [(Name, Type)]
- ranOutOfFuel :: Bool
- pprRelevantBindings :: RelevantBindings -> SDoc
- data PromotionErr
- pprPECategory :: PromotionErr -> SDoc
- peCategory :: PromotionErr -> String
- data NotInScopeError
- mkTcRnNotInScope :: RdrName -> NotInScopeError -> TcRnMessage
- data ImportError
- data HoleError
- = OutOfScopeHole [ImportError]
- | HoleError HoleSort [TcTyVar] [(SkolemInfoAnon, [TcTyVar])]
- data CoercibleMsg
- data PotentialInstances = PotentialInstances {}
- data UnsupportedCallConvention
- type ExpectedBackends = [Backend]
- data ArgOrResult
- data MatchArgsContext
- data MatchArgBadMatches where
- MatchArgMatches :: {..} -> MatchArgBadMatches
- 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
- data LookupTHInstNameErrReason
- data SplicePhase
- data THDeclDescriptor
- data RunSpliceFailReason = ConversionFail !ThingBeingConverted !ConversionFailReason
- data ThingBeingConverted
- data IllegalDecls
- = IllegalDecls !(NonEmpty (LHsDecl GhcPs))
- | IllegalFamDecls !(NonEmpty (LFamilyDecl GhcPs))
- data EmptyStatementGroupErrReason
- data UnexpectedStatement where
- UnexpectedStatement :: Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement
Main types
data TcRnMessage where Source #
An error which might arise during typechecking/renaming.
TcRnUnknownMessage :: UnknownDiagnostic -> TcRnMessage | Simply wraps an unknown |
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 |
| |
TcRnWithHsDocContext :: !HsDocContext -> !TcRnMessage -> TcRnMessage | TcRnWithHsDocContext annotates an error message with the context in which it originated. |
TcRnSolverReport :: SolverReportWithCtxt -> DiagnosticReason -> [GhcHint] -> TcRnMessage | TcRnSolverReport is the constructor used to report unsolved constraints after constraint solving, as well as other errors such as hole fit errors. See the documentation of the |
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. |
| |
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. |
| |
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 Example: warning1 :: Lift t => t -> Q Exp warning1 x = [| x |] Test cases: th/T17804 |
TcRnUnusedPatternBinds :: HsBind GhcRn -> TcRnMessage | TcRnUnusedPatternBinds is a warning (controlled with -Wunused-pattern-binds) that occurs if a pattern binding binds no variables at all, unless it is a lone wild-card pattern, or a banged pattern. Example: Just _ = rhs3 -- Warning: unused pattern binding (_, _) = rhs4 -- Warning: unused pattern binding _ = rhs3 -- No warning: lone wild-card pattern !() = rhs4 -- No warning: banged pattern; behaves like seq Test cases: rename/{T13646,T17c,T17e,T7085} |
TcRnDodgyImports :: RdrName -> TcRnMessage | TcRnDodgyImports is a warning (controlled with -Wdodgy-imports) that occurs when
a datatype Test cases: renameshould_compileT7167 |
TcRnDodgyExports :: Name -> TcRnMessage | TcRnDodgyExports is a warning (controlled by -Wdodgy-exports) that occurs when a datatype
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 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, Test cases: typecheckshould_compileT10971a renameshould_compilern039 renameshould_compilern064 renameshould_compileT1972 renameshould_failT2723 renameshould_compileT3262 driver/werror |
TcRnDuplicateWarningDecls :: !(LocatedN RdrName) -> !RdrName -> TcRnMessage | TcRnDuplicateWarningDecls is an error that occurs whenever a warning is declared twice. Examples(s): None. Test cases: None. |
TcRnSimplifierTooManyIterations | TcRnDuplicateWarningDecls is an error that occurs whenever the constraint solver in the simplifier hits the iterations' limit. Examples(s): None. Test cases: None. |
| |
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 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 |
| |
TcRnDuplicateFieldName :: !RecordFieldPart -> NonEmpty RdrName -> TcRnMessage | TcRnDuplicateFieldName is an error that occurs whenever there are duplicate field names in a record. Examples(s): None. Test cases: None. |
TcRnIllegalViewPattern :: !(Pat GhcPs) -> TcRnMessage | TcRnIllegalViewPattern is an error that occurs whenever the ViewPatterns syntax is used but the ViewPatterns language extension is not enabled. Examples(s): data Foo = Foo { a :: Int } foo :: Foo -> Int
foo (a -> l) = l -- not OK, the Test cases: parsershould_failViewPatternsFail |
TcRnCharLiteralOutOfRange :: !Char -> TcRnMessage | TcRnCharLiteralOutOfRange is an error that occurs whenever a character is out of range. Examples(s): None Test cases: None |
TcRnIllegalWildcardsInConstructor :: !Name -> TcRnMessage | TcRnIllegalWildcardsInConstructor is an error that occurs whenever the record wildcards '..' are used inside a constructor without labeled fields. Examples(s): None Test cases: None |
TcRnIgnoringAnnotations :: [LAnnDecl GhcRn] -> TcRnMessage | TcRnIgnoringAnnotations is a warning that occurs when the source code contains annotation pragmas but the platform in use does not support an external interpreter such as GHCi and therefore the annotations are ignored. Example(s): None Test cases: None |
TcRnAnnotationInSafeHaskell :: TcRnMessage | TcRnAnnotationInSafeHaskell is an error that occurs if annotation pragmas are used in conjunction with Safe Haskell. Example(s): None Test cases: annotationsshould_failT10826 |
TcRnInvalidTypeApplication :: Type -> LHsWcType GhcRn -> TcRnMessage | TcRnInvalidTypeApplication is an error that occurs when a visible type application is used with an expression that does not accept "specified" type arguments. Example(s): foo :: forall {a}. a -> a foo x = x bar :: () bar = let x = foo @Int 42 in () Test cases: overloadedrecfldsshould_failoverloadedlabelsfail03 typecheckshould_failExplicitSpecificity1 typecheckshould_failExplicitSpecificity10 typecheckshould_failExplicitSpecificity2 typecheckshould_failT17173 typecheckshould_failVtaFail |
TcRnTagToEnumMissingValArg :: TcRnMessage | TcRnTagToEnumMissingValArg is an error that occurs when the 'tagToEnum#' function is not applied to a single value argument. Example(s): tagToEnum# 1 2 Test cases: None |
TcRnTagToEnumUnspecifiedResTy :: Type -> TcRnMessage | TcRnTagToEnumUnspecifiedResTy is an error that occurs when the 'tagToEnum#' function is not given a concrete result type. Example(s): foo :: forall a. a foo = tagToEnum# 0# Test cases: typecheckshould_failtcfail164 |
TcRnTagToEnumResTyNotAnEnum :: Type -> TcRnMessage | TcRnTagToEnumResTyNotAnEnum is an error that occurs when the 'tagToEnum#' function is given a result type that is not an enumeration type. Example(s): foo :: Int -- not an enumeration TyCon foo = tagToEnum# 0# Test cases: typecheckshould_failtcfail164 |
TcRnTagToEnumResTyTypeData :: Type -> TcRnMessage | TcRnTagToEnumResTyTypeData is an error that occurs when the 'tagToEnum#'
function is given a result type that is headed by a Example(s): type data Letter = A | B | C foo :: Letter foo = tagToEnum# 0# Test cases: type-datashould_failTDTagToEnum.hs |
TcRnArrowIfThenElsePredDependsOnResultTy :: TcRnMessage | TcRnArrowIfThenElsePredDependsOnResultTy is an error that occurs when the predicate type of an ifThenElse expression in arrow notation depends on the type of the result. Example(s): None Test cases: None |
TcRnIllegalHsBootFileDecl :: TcRnMessage | TcRnIllegalHsBootFileDecl is an error that occurs when an hs-boot file contains declarations that are not allowed, such as bindings. Example(s): None Test cases: None |
TcRnRecursivePatternSynonym :: LHsBinds GhcRn -> TcRnMessage | TcRnRecursivePatternSynonym is an error that occurs when a pattern synonym is defined in terms of itself, either directly or indirectly. Example(s): pattern A = B pattern B = A Test cases: patsynshould_failT16900 |
TcRnPartialTypeSigTyVarMismatch | TcRnPartialTypeSigTyVarMismatch is an error that occurs when a partial type signature attempts to unify two different types. Example(s): f :: a -> b -> _ f x y = [x, y] Test cases: partial-sigsshould_failT14449 |
| |
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 |
| |
TcRnMissingSignature | TcRnMissingSignature is a warning that occurs when a top-level binding or a pattern synonym does not have a type signature. Controlled by the flags: -Wmissing-signatures -Wmissing-exported-signatures -Wmissing-pattern-synonym-signatures -Wmissing-exported-pattern-synonym-signatures -Wmissing-kind-signatures Test cases: T11077 (top-level bindings) T12484 (pattern synonyms) T19564 (kind signatures) |
| |
TcRnPolymorphicBinderMissingSig :: Name -> Type -> TcRnMessage | TcRnPolymorphicBinderMissingSig is a warning controlled by -Wmissing-local-signatures that occurs when a local polymorphic binding lacks a type signature. Example(s): id a = a Test cases: warningsshould_compileT12574 |
TcRnOverloadedSig :: TcIdSigInfo -> TcRnMessage | TcRnOverloadedSig is an error that occurs when a binding group conflicts with the monomorphism restriction. Example(s): data T a = T a mono = ... where x :: Applicative f => f a T x = ... Test cases: typecheckshould_compileT11339 |
TcRnTupleConstraintInst :: !Class -> TcRnMessage | TcRnTupleConstraintInst is an error that occurs whenever an instance for a tuple constraint is specified. Examples(s): class C m a class D m a f :: (forall a. Eq a => (C m a, D m a)) => m a f = undefined Test cases: quantified-constraints/T15334 |
TcRnAbstractClassInst :: !Class -> TcRnMessage | TcRnAbstractClassInst is an error that occurs whenever an instance of an abstract class is specified. Examples(s): -- A.hs-boot module A where class C a
Test cases: typecheckshould_failT13068 |
TcRnNoClassInstHead :: !Type -> TcRnMessage | TcRnNoClassInstHead is an error that occurs whenever an instance head is not headed by a class. Examples(s): instance c Test cases: typecheckrenameT5513 typecheckrenameT16385 |
TcRnUserTypeError :: !Type -> TcRnMessage | TcRnUserTypeError is an error that occurs due to a user's custom type error,
which can be triggered by adding a 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
Test cases: derivingshould_failT15073.hs derivingshould_failT15073a.hs typecheckshould_failT16059d |
| |
TcRnLinearFuncInKind :: !Type -> TcRnMessage | TcRnLinearFuncInKind is an error that occurs whenever a linear function is specified in a kind. Examples(s): data A :: * %1 -> * Test cases: linearshould_failLinearKind linearshould_failLinearKind2 linearshould_failLinearKind3 |
TcRnForAllEscapeError :: !Type -> !Kind -> TcRnMessage | TcRnForAllEscapeError is an error that occurs whenever a quantified type's kind mentions quantified type variable. Examples(s): type T :: TYPE (BoxedRep l) data T = MkT Test cases: unlifted-datatypesshould_failUnlDataNullaryPoly |
TcRnVDQInTermType :: !(Maybe Type) -> TcRnMessage | TcRnVDQInTermType is an error that occurs whenever a visible dependent quantification is specified in the type of a term. Examples(s): a = (undefined :: forall k -> k -> Type) @Int Test cases: dependentshould_failT15859 dependentshould_failT16326_Fail1 dependentshould_failT16326_Fail2 dependentshould_failT16326_Fail3 dependentshould_failT16326_Fail4 dependentshould_failT16326_Fail5 dependentshould_failT16326_Fail6 dependentshould_failT16326_Fail7 dependentshould_failT16326_Fail8 dependentshould_failT16326_Fail9 dependentshould_failT16326_Fail10 dependentshould_failT16326_Fail11 dependentshould_failT16326_Fail12 dependentshould_failT17687 dependentshould_failT18271 |
TcRnBadQuantPredHead :: !Type -> TcRnMessage | TcRnBadQuantPredHead is an error that occurs whenever a quantified predicate lacks a class or type variable head. Examples(s): class (forall a. A t a => A t [a]) => B t where type A t a :: Constraint Test cases: quantified-constraints/T16474 |
TcRnIllegalTupleConstraint :: !Type -> TcRnMessage | TcRnIllegalTupleConstraint is an error that occurs whenever an illegal tuple constraint is specified. Examples(s): g :: ((Show a, Num a), Eq a) => a -> a g = undefined Test cases: typecheckshould_failtcfail209a |
TcRnNonTypeVarArgInConstraint :: !Type -> TcRnMessage | TcRnNonTypeVarArgInConstraint is an error that occurs whenever a non type-variable argument is specified in a constraint. Examples(s): data T instance Eq Int => Eq T Test cases: ghciscriptsT13202 ghciscriptsT13202a polykinds/T12055a typecheckshould_failT10351 typecheckshould_failT19187 typecheckshould_failT6022 typecheckshould_failT8883 |
TcRnIllegalImplicitParam :: !Type -> TcRnMessage | TcRnIllegalImplicitParam is an error that occurs whenever an illegal implicit parameter is specified. Examples(s): type Bla = ?x::Int data T = T instance Bla => Eq T Test cases: polykinds/T11466 typecheckshould_failT8912 typecheckshould_failtcfail041 typecheckshould_failtcfail211 typecheckshould_failtcrun045 |
TcRnIllegalConstraintSynonymOfKind :: !Type -> TcRnMessage | TcRnIllegalConstraintSynonymOfKind is an error that occurs whenever an illegal constraint synonym of kind is specified. Examples(s): type Showish = Show f :: (Showish a) => a -> a f = undefined Test cases: typecheckshould_failtcfail209 |
TcRnIllegalClassInst :: !TyConFlavour -> TcRnMessage | TcRnIllegalClassInst is an error that occurs whenever a class instance is specified for a non-class. Examples(s): type C1 a = (Show (a -> Bool)) instance C1 Int where Test cases: polykinds/T13267 |
TcRnOversaturatedVisibleKindArg :: !Type -> TcRnMessage | TcRnOversaturatedVisibleKindArg is an error that occurs whenever an illegal oversaturated visible kind argument is specified. Examples(s): type family F2 :: forall (a :: Type). Type where F2 @a = Maybe a Test cases: typecheckshould_failT15793 typecheckshould_failT16255 |
TcRnBadAssociatedType :: !Name -> !Name -> TcRnMessage | TcRnBadAssociatedType is an error that occurs whenever a class doesn't have an associated type. Examples(s):
$(do d <- instanceD (cxt []) (conT ''Eq Test cases: th/T12387a |
TcRnForAllRankErr :: !Rank -> !Type -> TcRnMessage | TcRnForAllRankErr is an error that occurs whenever an illegal ranked type is specified. Examples(s): foo :: (a,b) -> (a~b => t) -> (a,b) foo p x = p Test cases: - ghcishould_runT15806 - indexed-typesshould_failSimpleFail15 - typecheckshould_failT11355 - typecheckshould_failT12083a - typecheckshould_failT12083b - typecheckshould_failT16059c - typecheckshould_failT16059e - typecheckshould_failT17213 - typecheckshould_failT18939_Fail - typecheckshould_failT2538 - typecheckshould_failT5957 - typecheckshould_failT7019 - typecheckshould_failT7019a - typecheckshould_failT7809 - typecheckshould_failT9196 - typecheckshould_failtcfail127 - typecheckshould_failtcfail184 - typecheckshould_failtcfail196 - typecheckshould_failtcfail197 |
TcRnMonomorphicBindings :: [Name] -> TcRnMessage | TcRnMonomorphicBindings is a warning (controlled by -Wmonomorphism-restriction) that arise when the monomorphism restriction applies to the given bindings. Examples(s): {-# OPTIONS_GHC -Wmonomorphism-restriction #-} bar = 10 foo :: Int foo = bar main :: IO () main = print foo The example above emits the warning (for Test cases: typecheckshould_compileT13785 |
TcRnOrphanInstance :: ClsInst -> TcRnMessage | TcRnOrphanInstance is a warning (controlled by -Wwarn-orphans) that arises when a typeclass instance is an "orphan", i.e. if it appears in a module in which neither the class nor the type being instanced are declared in the same module. Examples(s): None Test cases: warningsshould_compileT9178 typecheckshould_compileT4912 |
TcRnFunDepConflict :: !UnitState -> NonEmpty ClsInst -> TcRnMessage | TcRnFunDepConflict is an error that occurs when there are functional dependencies conflicts between instance declarations. Examples(s): None Test cases: typecheckshould_failT2307 typecheckshould_failtcfail096 typecheckshould_failtcfail202 |
TcRnDupInstanceDecls :: !UnitState -> NonEmpty ClsInst -> TcRnMessage | TcRnDupInstanceDecls is an error that occurs when there are duplicate instance declarations. Examples(s): class Foo a where foo :: a -> Int instance Foo Int where foo = id instance Foo Int where foo = const 42 Test cases: cabalT12733T12733 typecheckshould_failtcfail035 typecheckshould_failtcfail023 backpackshould_failbkpfail18 typecheckshould_failTcNullaryTCFail typecheckshould_failtcfail036 typecheckshould_failtcfail073 module/mod51 module/mod52 module/mod44 |
TcRnConflictingFamInstDecls :: NonEmpty FamInst -> TcRnMessage | TcRnConflictingFamInstDecls is an error that occurs when there are conflicting family instance declarations. Examples(s): None. Test cases: indexed-typesshould_failExplicitForAllFams4b indexed-typesshould_failNoGood indexed-typesshould_failOver indexed-typesshould_failOverDirectThisMod indexed-typesshould_failOverIndirectThisMod indexed-typesshould_failSimpleFail11a indexed-typesshould_failSimpleFail11b indexed-typesshould_failSimpleFail11c indexed-typesshould_failSimpleFail11d indexed-typesshould_failSimpleFail2a indexed-typesshould_failSimpleFail2b indexed-typesshould_failT13092/T13092 indexed-typesshould_failT13092c/T13092c indexed-typesshould_failT14179 indexed-typesshould_failT2334A indexed-typesshould_failT2677 indexed-typesshould_failT3330b indexed-typesshould_failT4246 indexed-typesshould_failT7102a indexed-typesshould_failT9371 polykinds/T7524 typecheckshould_failUnliftedNewtypesOverlap |
TcRnFamInstNotInjective :: InjectivityErrReason -> TyCon -> NonEmpty CoAxBranch -> TcRnMessage | |
TcRnBangOnUnliftedType :: !Type -> TcRnMessage | TcRnBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that occurs when a strictness annotation is applied to an unlifted type. Example(s): data T = MkT !Int# -- Strictness flag has no effect on unlifted types Test cases: typecheckshould_compileT20187a typecheckshould_compileT20187b |
TcRnLazyBangOnUnliftedType :: !Type -> TcRnMessage | TcRnLazyBangOnUnliftedType is a warning (controlled by -Wredundant-strictness-flags) that occurs when a lazy annotation is applied to an unlifted type. Example(s): data T = MkT ~Int# -- Lazy flag has no effect on unlifted types Test cases: typecheckshould_compileT21951a typecheckshould_compileT21951b |
TcRnMultipleDefaultDeclarations :: [LDefaultDecl GhcRn] -> TcRnMessage | TcRnMultipleDefaultDeclarations is an error that occurs when a module has more than one default declaration. Example: default (Integer, Int) default (Double, Float) -- 2nd default declaration not allowed Text cases: module/mod58 |
TcRnBadDefaultType :: Type -> [Class] -> TcRnMessage | TcRnBadDefaultType is an error that occurs when a type used in a default declaration does not have an instance for any of the applicable classes. Example(s): data Foo default (Foo) Test cases: typecheckshould_failT11974b |
TcRnPatSynBundledWithNonDataCon :: TcRnMessage | TcRnPatSynBundledWithNonDataCon is an error that occurs when a module's export list bundles a pattern synonym with a type that is not a proper `data` or `newtype` construction. Example(s): module Foo (MyClass(.., P)) where pattern P = Nothing class MyClass a where foo :: a -> Int Test cases: patsynshould_failexport-class |
TcRnPatSynBundledWithWrongType :: Type -> Type -> TcRnMessage | TcRnPatSynBundledWithWrongType is an error that occurs when the export list of a module has a pattern synonym bundled with a type that does not match the type of the pattern synonym. Example(s): module Foo (R(P,x)) where data Q = Q Int data R = R pattern P{x} = Q x Text cases: patsynshould_failexport-ps-rec-sel patsynshould_failexport-type-synonym patsynshould_failexport-type |
TcRnDupeModuleExport :: ModuleName -> TcRnMessage | TcRnDupeModuleExport is a warning controlled by Example(s): module Foo (module Bar, module Bar) import Bar Text cases: None |
TcRnExportedModNotImported :: ModuleName -> TcRnMessage | TcRnExportedModNotImported is an error that occurs when an export list contains a module that is not imported. Example(s): None Text cases: module/mod135 module/mod8 renameshould_failrnfail028 backpackshould_failbkpfail48 |
TcRnNullExportedModule :: ModuleName -> TcRnMessage | TcRnNullExportedModule is a warning controlled by -Wdodgy-exports that occurs when an export list contains a module that has no exports. Example(s): module Foo (module Bar) where import Bar () Test cases: None |
TcRnMissingExportList :: ModuleName -> TcRnMessage | TcRnMissingExportList is a warning controlled by -Wmissing-export-lists that occurs when a module does not have an explicit export list. Example(s): None Test cases: typecheckshould_failMissingExportList03 |
TcRnExportHiddenComponents :: IE GhcPs -> TcRnMessage | TcRnExportHiddenComponents is an error that occurs when an export contains constructor or class methods that are not visible. Example(s): None Test cases: None |
TcRnDuplicateExport :: GreName -> IE GhcPs -> IE GhcPs -> TcRnMessage | TcRnDuplicateExport is a warning (controlled by -Wduplicate-exports) that occurs when an identifier appears in an export list more than once. Example(s): None Test cases: module/MultiExport module/mod128 module/mod14 module/mod5 overloadedrecfldsshould_failDuplicateExports patsynshould_compileT11959 |
TcRnExportedParentChildMismatch :: Name -> TyThing -> GreName -> [Name] -> TcRnMessage | TcRnExportedParentChildMismatch is an error that occurs when an export is bundled with a parent that it does not belong to Example(s): module Foo (T(a)) where data T a = True Test cases: module/T11970 module/T11970B module/mod17 module/mod3 overloadedrecfldsshould_failNoParent |
TcRnConflictingExports | TcRnConflictingExports is an error that occurs when different identifiers that have the same name are being exported by a module. Example(s): module Foo (Bar.f, module Baz) where import qualified Bar (f) import Baz (f) Test cases: module/mod131 module/mod142 module/mod143 module/mod144 module/mod145 module/mod146 module/mod150 module/mod155 overloadedrecfldsshould_failT14953 overloadedrecfldsshould_failoverloadedrecfldsfail10 renameshould_failrnfail029 renameshould_failrnfail040 typecheckshould_failT16453E2 typecheckshould_failtcfail025 typecheckshould_failtcfail026 |
| |
TcRnAmbiguousField | TcRnAmbiguousField is a warning controlled by -Wambiguous-fields occurring when a record update's type cannot be precisely determined. This will not be supported by -XDuplicateRecordFields in future releases. Example(s): data Person = MkPerson { personId :: Int, name :: String } data Address = MkAddress { personId :: Int, address :: String } bad1 x = x { personId = 4 } :: Person -- ambiguous bad2 (x :: Person) = x { personId = 4 } -- ambiguous good x = (x :: Person) { personId = 4 } -- not ambiguous Test cases: overloadedrecfldsshould_failoverloadedrecfldsfail06 |
| |
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 Test cases: deSugarshould_compileT13870 deSugarshould_compileds041 patsynshould_compileT11283 renameshould_compileT5334 renameshould_compileT12229 renameshould_compileT5892a warningsshould_failWerrorFail2 |
TcRnFieldUpdateInvalidType :: [(FieldLabelString, TcType)] -> TcRnMessage | TcRnFieldUpdateInvalidType is an error occurring when an updated field's type mentions something that is outside the universally quantified variables of the data constructor, such as an existentially quantified type. Example(s): data X = forall a. MkX { f :: a } x = (MkX ()) { f = False } Test cases: patsynshould_failrecords-exquant typecheckshould_failT3323 |
TcRnNoConstructorHasAllFields :: [FieldLabelString] -> TcRnMessage | TcRnNoConstructorHasAllFields is an error that occurs when a record update has fields that no single constructor encompasses. Example(s): data Foo = A { x :: Bool } | B { y :: Int } foo = (A False) { x = True, y = 5 } Test cases: overloadedrecfldsshould_failoverloadedrecfldsfail08 patsynshould_failmixed-pat-syn-record-sels typecheckshould_failT7989 |
TcRnMixedSelectors | |
| |
TcRnMissingStrictFields :: ConLike -> [(FieldLabelString, TcType)] -> TcRnMessage | |
TcRnNoPossibleParentForFields :: [LHsRecUpdField GhcRn] -> TcRnMessage | |
TcRnBadOverloadedRecordUpdate :: [LHsRecUpdField GhcRn] -> TcRnMessage | |
TcRnStaticFormNotClosed :: Name -> NotClosedReason -> TcRnMessage | |
TcRnSpecialClassInst | TcRnSpecialClassInst is an error that occurs when a user
attempts to define an instance for a built-in typeclass such as
Test cases: derivingshould_failT9687 derivingshould_failT14916 polykinds/T8132 typecheckshould_failTcCoercibleFail2 typecheckshould_failT12837 typecheckshould_failT14390 |
| |
TcRnUselessTypeable :: TcRnMessage | TcRnUselessTypeable is a warning (controlled by -Wderiving-typeable) that
occurs when trying to derive an instance of the Example(s): None. Test cases: warningsshould_compileDerivingTypeable |
TcRnDerivingDefaults :: !Class -> TcRnMessage | TcRnDerivingDefaults is a warning (controlled by -Wderiving-defaults) that
occurs when both 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 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 |
| |
TcRnLazyGADTPattern :: TcRnMessage | TcRnLazyGADTPattern is an error that occurs when a user writes a nested GADT pattern match inside a lazy (~) pattern. Test case: gadt/lazypat |
TcRnArrowProcGADTPattern :: TcRnMessage | TcRnArrowProcGADTPattern is an error that occurs when a user writes a GADT pattern inside arrow proc notation. Test case: arrowsshould_failarrowfail004. |
TcRnForallIdentifier :: RdrName -> TcRnMessage | TcRnForallIdentifier is a warning (controlled with -Wforall-identifier) that occurs
when a definition uses Example: forall x = () g forall = () Test cases: T20609 T20609a T20609b T20609c T20609d |
TcRnTypeEqualityOutOfScope :: TcRnMessage | TcRnTypeEqualityOutOfScope is a warning (controlled by -Wtype-equality-out-of-scope) that occurs when the type equality (a ~ b) is not in scope. Test case: T18862b |
TcRnTypeEqualityRequiresOperators :: TcRnMessage | TcRnTypeEqualityRequiresOperators is a warning (controlled by -Wtype-equality-requires-operators) that occurs when the type equality (a ~ b) is used without the TypeOperators extension. Example: {-# LANGUAGE NoTypeOperators #-} f :: (a ~ b) => a -> b Test case: T18862a |
TcRnIllegalTypeOperator :: !SDoc -> !RdrName -> TcRnMessage | TcRnIllegalTypeOperator is an error that occurs when a type operator is used without the TypeOperators extension. Example: {-# LANGUAGE NoTypeOperators #-} f :: Vec a n -> Vec a m -> Vec a (n + m) Test case: T12811 |
TcRnIllegalTypeOperatorDecl :: !RdrName -> TcRnMessage | TcRnIllegalTypeOperatorDecl is an error that occurs when a type or class operator is declared without the TypeOperators extension. See Note [Type and class operator definitions] Example: {-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MultiParamTypeClasses #-} module T3265 where data a :+: b = Left a | Right b class a :*: b where {} Test cases: T3265, tcfail173 |
TcRnGADTMonoLocalBinds :: TcRnMessage | TcRnGADTMonoLocalBinds is a warning controlled by -Wgadt-mono-local-binds that occurs when pattern matching on a GADT when -XMonoLocalBinds is off. Example(s): None Test cases: T20485, T20485a |
TcRnNotInScope | The TcRnNotInScope constructor is used for various not-in-scope errors.
See |
| |
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. |
| |
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. |
| |
TcRnIncorrectNameSpace | TcRnIncorrectNameSpace is an error that occurs when a Example: f x = Int Test cases: T18740a, T20884. |
| |
TcRnForeignImportPrimExtNotSet :: ForeignImport GhcRn -> TcRnMessage | |
TcRnForeignImportPrimSafeAnn :: ForeignImport GhcRn -> TcRnMessage | |
TcRnForeignFunctionImportAsValue :: ForeignImport GhcRn -> TcRnMessage | |
TcRnFunPtrImportWithoutAmpersand :: ForeignImport GhcRn -> TcRnMessage | |
TcRnIllegalForeignDeclBackend :: Either (ForeignExport GhcRn) (ForeignImport GhcRn) -> Backend -> ExpectedBackends -> TcRnMessage | |
TcRnUnsupportedCallConv :: Either (ForeignExport GhcRn) (ForeignImport GhcRn) -> UnsupportedCallConvention -> TcRnMessage | |
TcRnIllegalForeignType :: !(Maybe ArgOrResult) -> !IllegalForeignTypeReason -> TcRnMessage | |
TcRnInvalidCIdentifier :: !CLabelString -> TcRnMessage | |
TcRnExpectedValueId :: !TcTyThing -> TcRnMessage | |
TcRnNotARecordSelector :: !Name -> TcRnMessage | |
TcRnRecSelectorEscapedTyVar :: !OccName -> TcRnMessage | |
TcRnPatSynNotBidirectional :: !Name -> TcRnMessage | |
TcRnSplicePolymorphicLocalVar :: !Id -> TcRnMessage | |
TcRnIllegalDerivingItem :: !(LHsSigType GhcRn) -> TcRnMessage | |
TcRnUnexpectedAnnotation :: !(HsType GhcRn) -> !HsSrcBang -> TcRnMessage | |
TcRnIllegalRecordSyntax :: !(HsType GhcRn) -> TcRnMessage | |
TcRnUnexpectedTypeSplice :: !(HsType GhcRn) -> TcRnMessage | |
TcRnInvalidVisibleKindArgument | |
| |
TcRnTooManyBinders :: !Kind -> ![LHsTyVarBndr () GhcRn] -> TcRnMessage | |
TcRnDifferentNamesForTyVar :: !Name -> !Name -> TcRnMessage | |
TcRnInvalidReturnKind | |
| |
TcRnClassKindNotConstraint :: !Kind -> TcRnMessage | |
TcRnUnpromotableThing :: !Name -> !PromotionErr -> TcRnMessage | |
TcRnMatchesHaveDiffNumArgs | |
| |
TcRnCannotBindScopedTyVarInPatSig :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage | |
TcRnCannotBindTyVarsInPatBind :: !(NonEmpty (Name, TcTyVar)) -> TcRnMessage | |
TcRnTooManyTyArgsInConPattern | |
| |
TcRnMultipleInlinePragmas | |
| |
TcRnUnexpectedPragmas :: !Id -> !(NonEmpty (LSig GhcRn)) -> TcRnMessage | |
TcRnNonOverloadedSpecialisePragma :: !(LIdP GhcRn) -> TcRnMessage | |
TcRnSpecialiseNotVisible :: !Name -> TcRnMessage | |
TcRnNameByTemplateHaskellQuote :: !RdrName -> TcRnMessage | |
TcRnIllegalBindingOfBuiltIn :: !OccName -> TcRnMessage | |
TcRnPragmaWarning | |
| |
TcRnIllegalHsigDefaultMethods | TcRnIllegalHsigDefaultMethods is an error that occurs when a binding for a class default method is provided in a Backpack signature file. Test case: bkpfail40 |
TcRnBadGenericMethod | TcRnBadGenericMethod This test ensures that if you provide a "more specific" type signatures for the default method, you must also provide a binding. Example: {-# LANGUAGE DefaultSignatures #-} class C a where meth :: a default meth :: Num a => a meth = 0 Test case: testsuiteteststypecheckshould_failMissingDefaultMethodBinding.hs |
| |
TcRnWarningMinimalDefIncomplete :: ClassMinimalDef -> TcRnMessage | TcRnWarningMinimalDefIncomplete is a warning that one must specify which methods must be implemented by all instances. Example: class Cheater a where -- WARNING LINE cheater :: a {-# MINIMAL #-} -- warning! Test case: testsuitetestswarningsminimalWarnMinimal.hs: |
TcRnDefaultMethodForPragmaLacksBinding | TcRnDefaultMethodForPragmaLacksBinding is an error that occurs when a default method pragma is missing an accompanying binding. Test cases: testsuiteteststypecheckshould_failT5084.hs testsuiteteststypecheckshould_failT2354.hs |
| |
TcRnIgnoreSpecialisePragmaOnDefMethod :: !Name -> TcRnMessage | TcRnIgnoreSpecialisePragmaOnDefMethod is a warning that occurs when a specialise pragma is put on a default method. Test cases: none |
TcRnBadMethodErr | TcRnBadMethodErr is an error that happens when one attempts to provide a method in a class instance, when the class doesn't have a method by that name. Test case: testsuiteteststh/T12387 |
| |
TcRnNoExplicitAssocTypeOrDefaultDeclaration :: Name -> TcRnMessage | TcRnNoExplicitAssocTypeOrDefaultDeclaration is an error that occurs when a class instance does not provide an expected associated type or default declaration. Test cases: testsuitetestsderivingshould_compileT14094 testsuitetestsindexed-typesshould_compileSimple2 testsuiteteststypecheckshould_compiletc254 |
TcRnIllegalNewtype | TcRnIllegalNewtype is an error that occurs when a newtype:
Test cases: testsuitetestsgadt/T14719 testsuitetestsindexed-typesshould_failT14033 testsuitetestsindexed-typesshould_failT2334A testsuitetestslinearshould_failLinearGADTNewtype testsuitetestsparsershould_failreadFail008 testsuitetestspolykinds/T11459 testsuiteteststypecheckshould_failT15523 testsuiteteststypecheckshould_failT15796 testsuiteteststypecheckshould_failT17955 testsuiteteststypecheckshould_failT18891a testsuiteteststypecheckshould_failT21447 testsuiteteststypecheckshould_failtcfail156 |
| |
TcRnIllegalTypeData :: TcRnMessage | TcRnIllegalTypeData is an error that occurs when a See Note [Type data declarations] Test case: testsuiteteststype-datashould_failTDNoPragma |
TcRnTypeDataForbids :: !TypeDataForbids -> TcRnMessage | TcRnTypeDataForbids is an error that occurs when a See Note [Type data declarations] Test cases: testsuiteteststype-datashould_failTDDeriving testsuiteteststype-datashould_failTDRecordsGADT testsuiteteststype-datashould_failTDRecordsH98 testsuiteteststype-datashould_failTDStrictnessGADT testsuiteteststype-datashould_failTDStrictnessH98 |
TcRnTypedTHWithPolyType :: !TcType -> TcRnMessage | TcRnTypedTHWithPolyType is an error that signifies the illegal use of a polytype in a typed template haskell expression. Example(s): bad :: (forall a. a -> a) -> () bad = $$( [|| _ -> () ||] ) Test cases: th/T11452 |
TcRnSpliceThrewException | TcRnSpliceThrewException is an error that occurrs when running a template haskell splice throws an exception. Example(s): Test cases: annotationsshould_failannfail12 perfcompilerMultiLayerModulesTH_Make perfcompilerMultiLayerModulesTH_OneShot th/T10796b th/T19470 th/T19709d th/T5358 th/T5976 th/T7276a th/T8987 th/TH_exn1 th/TH_exn2 th/TH_runIO |
| |
TcRnInvalidTopDecl :: !(HsDecl GhcPs) -> TcRnMessage | TcRnInvalidTopDecl is a template haskell error occurring when one of the Example(s): Test cases: |
TcRnNonExactName :: !RdrName -> TcRnMessage | TcRnNonExactName is a template haskell error for when a declaration being added is bound to a name that is not fully known. Example(s): Test cases: |
TcRnAddInvalidCorePlugin | TcRnAddInvalidCorePlugin is a template haskell error indicating that a core plugin being added has an invalid module due to being in the current package. Example(s): Test cases: |
| |
TcRnAddDocToNonLocalDefn :: !DocLoc -> TcRnMessage | TcRnAddDocToNonLocalDefn is a template haskell error for documentation being added to a definition which is not in the current module. Example(s): Test cases: showIfaceshould_failTHPutDocExternal |
TcRnFailedToLookupThInstName :: !Type -> !LookupTHInstNameErrReason -> TcRnMessage | TcRnFailedToLookupThInstName is a template haskell error that occurrs when looking up an instance fails. Example(s): Test cases: showIfaceshould_failTHPutDocNonExistent |
TcRnCannotReifyInstance :: !Type -> TcRnMessage | TcRnCannotReifyInstance is a template haskell error for when an instance being reified
via Example(s): Test cases: |
TcRnCannotReifyOutOfScopeThing :: !Name -> TcRnMessage | TcRnCannotReifyOutOfScopeThing is a template haskell error indicating that the given name is not in scope and therefore cannot be reified. Example(s): Test cases: th/T16976f |
TcRnCannotReifyThingNotInTypeEnv :: !Name -> TcRnMessage | TcRnCannotReifyThingNotInTypeEnv is a template haskell error occurring when the given name is not in the type environment and therefore cannot be reified. Example(s): Test cases: |
TcRnNoRolesAssociatedWithThing :: !TcTyThing -> TcRnMessage | TcRnNoRolesAssociatedWithName is a template haskell error for when the user tries to reify the roles of a given name but it is not something that has roles associated with it. Example(s): Test cases: |
TcRnCannotRepresentType :: !UnrepresentableTypeDescr -> !Type -> TcRnMessage | TcRnCannotRepresentThing is a template haskell error indicating that a type cannot be reified because it does not have a representation in template haskell. Example(s): Test cases: |
TcRnRunSpliceFailure | TcRnRunSpliceFailure is an error indicating that a template haskell splice failed to be converted into a valid expression. Example(s): Test cases: th/T10828a th/T10828b th/T12478_4 th/T15270A th/T15270B th/T16895a th/T16895b th/T16895c th/T16895d th/T16895e th/T17379a th/T17379b th/T18740d th/T2597b th/T2674 th/T3395 th/T7484 th/T7667a th/TH_implicitParamsErr1 th/TH_implicitParamsErr2 th/TH_implicitParamsErr3 th/TH_invalid_add_top_decl |
| |
TcRnReportCustomQuasiError :: !Bool -> !String -> TcRnMessage | TcRnUserErrReported is an error or warning thrown using Example(s): Test cases: |
TcRnInterfaceLookupError :: !Name -> !SDoc -> TcRnMessage | TcRnInterfaceLookupError is an error resulting from looking up a name in an interface file. Example(s): Test cases: |
TcRnUnsatisfiedMinimalDef :: ClassMinimalDef -> TcRnMessage | TcRnUnsatisfiedMinimalDef is a warning that occurs when a class instance is missing methods that are required by the minimal definition. Example: class C a where foo :: a -> a instance C () -- | foo needs to be defined here Test cases: testsuiteteststypecheckprog001typecheck.prog001 testsuiteteststypecheckshould_compiletc126 testsuiteteststypecheckshould_compileT7903 testsuiteteststypecheckshould_compiletc116 testsuiteteststypecheckshould_compiletc175 testsuiteteststypecheckshould_compileHasKey testsuiteteststypecheckshould_compiletc125 testsuiteteststypecheckshould_compiletc078 testsuiteteststypecheckshould_compiletc161 testsuiteteststypecheckshould_failT5051 testsuiteteststypecheckshould_compileT21583 testsuitetestsbackpackshould_compilebkp47 testsuitetestsbackpackshould_failbkpfail25 testsuitetestsparsershould_compileT2245 testsuitetestsparsershould_compileread014 testsuitetestsindexed-typesshould_compileClass3 testsuitetestsindexed-typesshould_compileSimple2 testsuitetestsindexed-typesshould_failT7862 testsuitetestsderivingshould_compilederiving-1935 testsuitetestsderivingshould_compileT9968a testsuitetestsderivingshould_compiledrv003 testsuitetestsderivingshould_compileT4966 testsuitetestsderivingshould_compileT14094 testsuitetestsperfcompilerT15304 testsuitetestswarningsminimalWarnMinimal testsuitetestssimplCoreshould_compilesimpl020 testsuitetestsdeSugarshould_compileT14546d testsuitetestsghciscriptsT5820 testsuitetestsghciscriptsghci019 |
TcRnMisplacedInstSig :: Name -> LHsSigType GhcRn -> TcRnMessage |
Test case: testsuitetestsmodule/mod45 |
TcRnBadBootFamInstDecl |
Test case: testsuitetestsindexed-typesshould_failHsBootFam |
| |
TcRnIllegalFamilyInstance :: TyCon -> TcRnMessage |
Test case: testsuitetestsindexed-typesshould_failT3092 |
TcRnMissingClassAssoc :: TyCon -> TcRnMessage |
Test case: testsuitetestsindexed-typesshould_failSimpleFail7 |
TcRnBadFamInstDecl :: TyCon -> TcRnMessage |
Test case: testsuitetestsindexed-typesshould_failBadFamInstDecl |
TcRnNotOpenFamily :: TyCon -> TcRnMessage |
Test cases: testsuitetestsindexed-typesshould_failOverlap7 testsuitetestsindexed-typesshould_failOverlap3 |
TcRnNoRebindableSyntaxRecordDot :: TcRnMessage | TcRnNoRebindableSyntaxRecordDot is an error triggered by an overloaded record update without RebindableSyntax enabled. Example(s): Test cases: parsershould_failRecordDotSyntaxFail5 |
TcRnNoFieldPunsRecordDot :: TcRnMessage | TcRnNoFieldPunsRecordDot is an error triggered by the use of record field puns in an overloaded record update without enabling NamedFieldPuns. Example(s): print $ a{ foo.bar.baz.quux } Test cases: parsershould_failRecordDotSyntaxFail12 |
TcRnIllegalStaticExpression :: HsExpr GhcPs -> TcRnMessage | TcRnIllegalStaticExpression is an error thrown when user creates a static pointer via TemplateHaskell without enabling the StaticPointers extension. Example(s): Test cases: th/T14204 |
TcRnIllegalStaticFormInSplice :: HsExpr GhcPs -> TcRnMessage | TcRnIllegalStaticFormInSplice is an error when a user attempts to define a static pointer in a Template Haskell splice. Example(s): Test cases: th/TH_StaticPointers02 |
TcRnListComprehensionDuplicateBinding :: Name -> TcRnMessage | TcRnListComprehensionDuplicateBinding is an error triggered by duplicate let-bindings in a list comprehension. Example(s): [ () | let a = 13 | let a = 17 ] Test cases: typecheckshould_failtcfail092 |
TcRnEmptyStmtsGroup :: EmptyStatementGroupErrReason -> TcRnMessage | TcRnEmptyStmtsGroup is an error triggered by an empty list of statements
in a statement block. For more information, see Example(s):
do proc () -> do Test cases: renameshould_failRnEmptyStatementGroup1 |
TcRnLastStmtNotExpr :: HsStmtContext GhcRn -> UnexpectedStatement -> TcRnMessage | TcRnLastStmtNotExpr is an error caused by the last statement in a statement block not being an expression. Example(s): do x <- pure () do let x = 5 Test cases: renameshould_failT6060 parsershould_failT3811g parsershould_failreadFail028 |
TcRnUnexpectedStatementInContext :: HsStmtContext GhcRn -> UnexpectedStatement -> Maybe Extension -> TcRnMessage | TcRnUnexpectedStatementInContext is an error when a statement appears in an unexpected context (e.g. an arrow statement appears in a list comprehension). Example(s): Test cases: parsershould_failreadFail042 parsershould_failreadFail038 parsershould_failreadFail043 |
TcRnIllegalTupleSection :: TcRnMessage | TcRnIllegalTupleSection is an error triggered by usage of a tuple section without enabling the TupleSections extension. Example(s): (5,) Test cases: renameshould_failrnfail056 |
TcRnIllegalImplicitParameterBindings :: Either (HsLocalBindsLR GhcPs GhcPs) (HsLocalBindsLR GhcRn GhcPs) -> TcRnMessage | TcRnIllegalImplicitParameterBindings is an error triggered by binding an implicit parameter in an mdo block. Example(s): mdo { let { ?x = 5 }; () } Test cases: renameshould_failRnImplicitBindInMdoNotation |
TcRnSectionWithoutParentheses :: HsExpr GhcPs -> TcRnMessage | TcRnSectionWithoutParentheses is an error triggered by attempting to use an operator section without parentheses. Example(s):
( Test cases: renameshould_failT2490 renameshould_failT5657 |
TcRnLoopySuperclassSolve | TcRnLoopySuperclassSolve is a warning, controlled by Example: class Foo f class Foo f => Bar f g instance Bar f f => Bar f (h k) Test cases: T20666, T20666{a,b}, T22891, T22912. |
|
Instances
mkTcRnUnknownMessage :: (Diagnostic a, Typeable a, DiagnosticOpts a ~ NoDiagnosticOpts) => a -> TcRnMessage Source #
data TcRnMessageDetailed Source #
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.
TcRnMessageDetailed | |
|
Instances
Generic TcRnMessageDetailed Source # | |
Defined in GHC.Tc.Errors.Types from :: TcRnMessageDetailed -> Rep TcRnMessageDetailed x Source # to :: Rep TcRnMessageDetailed x -> TcRnMessageDetailed Source # | |
type Rep TcRnMessageDetailed Source # | |
Defined in GHC.Tc.Errors.Types type Rep TcRnMessageDetailed = D1 ('MetaData "TcRnMessageDetailed" "GHC.Tc.Errors.Types" "ghc" '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 Source #
Things forbidden in type data
declarations.
See Note [Type data declarations]
TypeDataForbidsDatatypeContexts | |
TypeDataForbidsLabelledFields | |
TypeDataForbidsStrictnessAnnotations | |
TypeDataForbidsDerivingClauses |
Instances
Generic TypeDataForbids Source # | |
Defined in GHC.Tc.Errors.Types from :: TypeDataForbids -> Rep TypeDataForbids x Source # to :: Rep TypeDataForbids x -> TypeDataForbids Source # | |
Outputable TypeDataForbids Source # | |
Defined in GHC.Tc.Errors.Types ppr :: TypeDataForbids -> SDoc Source # | |
type Rep TypeDataForbids Source # | |
Defined in GHC.Tc.Errors.Types type Rep TypeDataForbids = D1 ('MetaData "TypeDataForbids" "GHC.Tc.Errors.Types" "ghc" '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))) |
ErrInfo | |
|
data FixedRuntimeRepProvenance Source #
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
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. |
data ShadowedNameProvenance Source #
Where a shadowed name comes from
ShadowedNameProvenanceLocal !SrcLoc | The shadowed name is local to the module |
ShadowedNameProvenanceGlobal [GlobalRdrElt] | The shadowed name is global, typically imported from elsewhere. |
data RecordFieldPart Source #
Which parts of a record field are affected by a particular error or warning.
data IllegalNewtypeReason Source #
Why the particular illegal newtype error arose together with more information, if any.
DoesNotHaveSingleField !Int | |
IsNonLinear | |
IsGADT | |
HasConstructorContext | |
HasExistentialTyVar | |
HasStrictnessAnnotation |
Instances
Generic IllegalNewtypeReason Source # | |
Defined in GHC.Tc.Errors.Types | |
type Rep IllegalNewtypeReason Source # | |
Defined in GHC.Tc.Errors.Types type Rep IllegalNewtypeReason = D1 ('MetaData "IllegalNewtypeReason" "GHC.Tc.Errors.Types" "ghc" '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 InjectivityErrReason Source #
Why the particular injectivity error arose together with more information, if any.
data SuggestUndecidableInstances Source #
Instances
Show SuggestUndecidableInstances Source # | |
Defined in GHC.Tc.Errors.Types | |
Eq SuggestUndecidableInstances Source # | |
Defined in GHC.Tc.Errors.Types |
A description of whether something is a
data
ornewtype
(DataDeclSort
)data instance
ornewtype instance
(DataInstanceSort
)data family
(DataFamilySort
)
At present, this data type is only consumed by checkDataKindSig
.
ppDataSort :: DataSort -> SDoc Source #
data AllowedDataResKind Source #
Helper type used in checkDataKindSig
.
Superficially similar to ContextKind
, but it lacks AnyKind
and AnyBoxedKind
, and instead of
provides TheKind
liftedTypeKindLiftedKind
, which is much simpler to match on and
handle in isAllowedDataResKind
.
data NotClosedReason Source #
A data type to describe why a variable is not closed. See Note [Not-closed error messages] in GHC.Tc.Gen.Expr
data SuggestPartialTypeSignatures Source #
Instances
Show SuggestPartialTypeSignatures Source # | |
Defined in GHC.Tc.Errors.Types | |
Eq SuggestPartialTypeSignatures Source # | |
Defined in GHC.Tc.Errors.Types |
data DeriveInstanceErrReason Source #
Why a particular typeclass instance couldn't be derived.
DerivErrNotWellKinded | The typeclass instance is not well-kinded. |
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 | |
| |
DerivErrNotDeriveable !DeriveAnyClassEnabled | |
DerivErrNotAClass !PredType | The given |
DerivErrNoConstructors !TyCon | The given (representation of the) |
DerivErrLangExtRequired !Extension | |
DerivErrDunnoHowToDeriveForType !Type | GHC simply doesn't how to how derive the input |
DerivErrMustBeEnumType !TyCon | The given |
DerivErrMustHaveExactlyOneConstructor !TyCon | The given |
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 |
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
data UsingGeneralizedNewtypeDeriving Source #
Instances
data DeriveAnyClassEnabled Source #
Instances
Eq DeriveAnyClassEnabled Source # | |
Defined in GHC.Tc.Errors.Types (==) :: DeriveAnyClassEnabled -> DeriveAnyClassEnabled -> Bool # (/=) :: DeriveAnyClassEnabled -> DeriveAnyClassEnabled -> Bool # |
data DeriveInstanceBadConstructor Source #
DerivErrBadConExistential !DataCon | The given |
DerivErrBadConCovariant !DataCon | The given |
DerivErrBadConFunTypes !DataCon | The given |
DerivErrBadConWrongArg !DataCon | The given |
DerivErrBadConIsGADT !DataCon | The given |
DerivErrBadConHasExistentials !DataCon | The given |
DerivErrBadConHasConstraints !DataCon | The given |
DerivErrBadConHasHigherRankType !DataCon | The given |
data HasWildcard Source #
Instances
Eq HasWildcard Source # | |
Defined in GHC.Tc.Errors.Types (==) :: HasWildcard -> HasWildcard -> Bool # (/=) :: HasWildcard -> HasWildcard -> Bool # |
hasWildcard :: Bool -> HasWildcard Source #
data BadAnonWildcardContext Source #
A context in which we don't allow anonymous wildcards.
data SoleExtraConstraintWildcardAllowed Source #
Whether a sole extra-constraint wildcard is allowed,
e.g. _ => ..
as opposed to ( .., _ ) => ..
.
data DeriveGenericsErrReason Source #
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 Source #
A type representing whether or not the input type has associated data family instances.
Instances
data AssociatedTyLastVarInKind Source #
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.
YesAssocTyLastVarInKind !TyCon | The associated type family of the class |
NoAssocTyLastVarInKind |
Instances
data AssociatedTyNotParamOverLastTyVar Source #
If NoAssociatedTyNotParamOverLastTyVar
, the associated type of a
typeclass is not parameterized over the last type variable of the class
YesAssociatedTyNotParamOverLastTyVar !TyCon | The associated type family of the class |
NoAssociatedTyNotParamOverLastTyVar |
data MissingSignature Source #
What kind of thing is missing a type signature?
Used for reporting "missing signature"
warnings, see
tcRnMissingSignature
.
MissingTopLevelBindingSig Name Type | |
MissingPatSynSig PatSyn | |
MissingTyConKindSig TyCon Bool | whether -XCUSKs is enabled |
Is the object we are dealing with exported or not?
Used for reporting "missing signature"
warnings, see
TcRnMissingSignature
.
Instances
data HsDocContext Source #
data FixedRuntimeRepErrorInfo Source #
Stores the information to be reported in a representation-polymorphism error message.
FRR_Info | |
|
A predicate with its arising location; used to encapsulate a constraint that will give rise to a diagnostic.
EI | |
|
Instances
errorItemOrigin :: ErrorItem -> CtOrigin Source #
errorItemEqRel :: ErrorItem -> EqRel Source #
errorItemPred :: ErrorItem -> PredType Source #
errorItemCtLoc :: ErrorItem -> CtLoc Source #
data SolverReport Source #
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.
data SolverReportSupplementary Source #
Additional information to print in a SolverReport
, after the
important messages and after the error context.
See Note [Error report].
data SolverReportWithCtxt Source #
A TcSolverReportMsg
, together with context (e.g. enclosing implication constraints)
that are needed in order to report it.
SolverReportWithCtxt | |
|
Instances
Generic SolverReportWithCtxt Source # | |
Defined in GHC.Tc.Errors.Types | |
type Rep SolverReportWithCtxt Source # | |
Defined in GHC.Tc.Errors.Types type Rep SolverReportWithCtxt = D1 ('MetaData "SolverReportWithCtxt" "GHC.Tc.Errors.Types" "ghc" '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 Source #
Context needed when reporting a TcSolverReportMsg
, such as
the enclosing implication constraints or whether we are deferring type errors.
CEC | |
|
Instances
Outputable SolverReportErrCtxt Source # | |
Defined in GHC.Tc.Errors.Ppr ppr :: SolverReportErrCtxt -> SDoc Source # |
getUserGivens :: SolverReportErrCtxt -> [UserGiven] Source #
data TcSolverReportMsg Source #
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.
BadTelescope TyVarBndrs [TyCoVar] | Quantified variables appear out of dependency order. Example: forall (a :: k) k. ... Test cases: BadTelescope2, T16418, T16247, T16726, T18451. |
UserTypeError Type | 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. |
ReportHoleError Hole HoleError | We want to report an out of scope variable or a typed hole.
See |
UntouchableVariable | Trying to unify an untouchable variable, e.g. a variable from an outer scope. Test case: Simple14 |
CannotUnifyVariable | Cannot unify a variable, because of a type mismatch. |
Mismatch | A mismatch between two types. |
FixedRuntimeRepError [FixedRuntimeRepErrorInfo] | A violation of the representation-polymorphism invariants. See |
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. |
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. |
OverlappingInstances | Could not solve a constraint using available instances because the instances overlap. Test cases: tcfail118, tcfail121, tcfail218. |
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}. |
Instances
data CannotUnifyVariableReason Source #
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. |
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 |
RepresentationalEq TyVarInfo (Maybe CoercibleMsg) |
Instances
data MismatchMsg Source #
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, ... |
| |
KindMismatch | A type has an unexpected kind. Test cases: T2994, T7609, ... |
| |
TypeEqMismatch | A mismatch between two types, which arose from a type equality. Test cases: T1470, tcfail212. |
| |
CouldNotDeduce | Couldn't solve some Wanted constraints using the Givens.
Used for messages such as |
|
Instances
data MismatchEA Source #
Whether to use expected/actual in a type mismatch message.
NoEA | Don't use expected/actual. |
EA | Use expected/actual. |
|
mkPlainMismatchMsg :: MismatchMsg -> TcSolverReportMsg Source #
Report a mismatch error without any extra information.
mkBasicMismatchMsg :: MismatchEA -> ErrorItem -> Type -> Type -> MismatchMsg Source #
Construct a basic mismatch message between two types.
See pprMismatchMsg
for how such a message is displayed to users.
data WhenMatching Source #
Explain how a kind equality originated.
Instances
Generic WhenMatching Source # | |
Defined in GHC.Tc.Errors.Types from :: WhenMatching -> Rep WhenMatching x Source # to :: Rep WhenMatching x -> WhenMatching Source # | |
type Rep WhenMatching Source # | |
Defined in GHC.Tc.Errors.Types type Rep WhenMatching = D1 ('MetaData "WhenMatching" "GHC.Tc.Errors.Types" "ghc" '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 Source #
Expected/actual information.
ExpectedActual | Display the expected and actual types. |
| |
ExpectedActualAfterTySynExpansion | Display the expected and actual types, after expanding type synonyms. |
A cue to print out information about type variables,
e.g. where they were bound, when there is a mismatch tv1 ~ ty2
.
data SameOccInfo Source #
Add some information to disambiguate errors in which
two Names
would otherwise appear to be identical.
See Note [Disambiguating (X ~ X) errors].
SameOcc | |
|
data AmbiguityInfo Source #
Add some information about ambiguity
Ambiguity | Some type variables remained ambiguous: print them to the user. |
| |
NonInjectiveTyFam TyCon | Remind the user that a particular type family is not injective. |
Additional information to be given in a CouldNotDeduce
message,
which is then passed on to mk_supplementary_ea_msg
.
data FitsMbSuppressed Source #
A collection of valid hole fits or refinement fits, in which some fits might have been suppressed.
Fits | |
|
data ValidHoleFits Source #
A collection of hole fits and refinement fits.
data HoleFitDispConfig Source #
Configuration for pretty-printing valid hole fits.
data RelevantBindings Source #
RelevantBindings | |
|
pprRelevantBindings :: RelevantBindings -> SDoc Source #
Display some relevant bindings.
data PromotionErr Source #
TyConPE | |
ClassPE | |
FamDataConPE | |
ConstrainedDataConPE PredType | |
PatSynPE | |
RecDataConPE | |
TermVariablePE | |
NoDataKindsDC |
Instances
Outputable PromotionErr Source # | |
Defined in GHC.Tc.Errors.Types ppr :: PromotionErr -> SDoc Source # |
pprPECategory :: PromotionErr -> SDoc Source #
peCategory :: PromotionErr -> String Source #
data NotInScopeError Source #
Some form of "not in scope"
error. See also the OutOfScopeHole
constructor of HoleError
.
NotInScope | A run-of-the-mill |
NoExactName Name | An exact 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. |
Instances
mkTcRnNotInScope :: RdrName -> NotInScopeError -> TcRnMessage Source #
Create a "not in scope"
error message for the given RdrName
.
data ImportError Source #
Explain a problem with an import.
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
Outputable ImportError Source # | |
Defined in GHC.Tc.Errors.Ppr ppr :: ImportError -> SDoc Source # |
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.
OutOfScopeHole [ImportError] | Report an out-of-scope data constructor or variable masquerading as an expression hole. See Note [Insoluble holes] in GHC.Tc.Types.Constraint.
See Test cases: T9177a. |
HoleError HoleSort [TcTyVar] [(SkolemInfoAnon, [TcTyVar])] | Report a typed hole, or wildcard, with additional information. |
data CoercibleMsg Source #
A message that aims to explain why two types couldn't be seen to be representationally equal.
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 Test cases: T8984, TcCoercibleFail. |
TyConIsAbstract TyCon | The fact that a 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 Source #
This datatype collates instances that match or unifier, in order to report an error message for an unsolved typeclass constraint.
data UnsupportedCallConvention Source #
Specifies which calling convention is unsupported on the current platform
Instances
type ExpectedBackends = [Backend] Source #
Specifies which back ends can handle a requested foreign import or export
data MatchArgsContext Source #
Context for a mismatch in the number of arguments
EquationArgs !Name | Name of the function |
PatternArgs !(HsMatchContext GhcTc) | Pattern match specifics |
data MatchArgBadMatches where Source #
The information necessary to report mismatched numbers of arguments in a match group.
MatchArgMatches | |
|
data ConversionFailReason Source #
The reason a TH splice could not be converted to a Haskell expression
Instances
data SplicePhase Source #
The phase in which an exception was encountered when dealing with a TH splice
data THDeclDescriptor Source #
Label for a TH declaration
data RunSpliceFailReason Source #
Instances
Generic RunSpliceFailReason Source # | |
Defined in GHC.Tc.Errors.Types from :: RunSpliceFailReason -> Rep RunSpliceFailReason x Source # to :: Rep RunSpliceFailReason x -> RunSpliceFailReason Source # | |
type Rep RunSpliceFailReason Source # | |
Defined in GHC.Tc.Errors.Types type Rep RunSpliceFailReason = D1 ('MetaData "RunSpliceFailReason" "GHC.Tc.Errors.Types" "ghc" '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 ThingBeingConverted Source #
Identifies the TH splice attempting to be converted
data IllegalDecls Source #
data EmptyStatementGroupErrReason Source #
The context for an "empty statement group" error.
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
Generic EmptyStatementGroupErrReason Source # | |
Defined in GHC.Tc.Errors.Types | |
type Rep EmptyStatementGroupErrReason Source # | |
Defined in GHC.Tc.Errors.Types type Rep EmptyStatementGroupErrReason = D1 ('MetaData "EmptyStatementGroupErrReason" "GHC.Tc.Errors.Types" "ghc" '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 Source #
An existential wrapper around
.StmtLR
GhcPs GhcPs body
UnexpectedStatement :: Outputable (StmtLR GhcPs GhcPs body) => StmtLR GhcPs GhcPs body -> UnexpectedStatement |