Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data UserTypeCtxt
- = FunSigCtxt Name Bool
- | InfSigCtxt Name
- | ExprSigCtxt
- | KindSigCtxt
- | StandaloneKindSigCtxt Name
- | TypeAppCtxt
- | ConArgCtxt Name
- | TySynCtxt Name
- | PatSynCtxt Name
- | PatSigCtxt
- | RuleSigCtxt Name
- | ResSigCtxt
- | ForSigCtxt Name
- | DefaultDeclCtxt
- | InstDeclCtxt Bool
- | SpecInstCtxt
- | ThBrackCtxt
- | GenSigCtxt
- | GhciCtxt Bool
- | ClassSCCtxt Name
- | SigmaCtxt
- | DataTyCtxt Name
- | DerivClauseCtxt
- | TyVarBndrKindCtxt Name
- | DataKindCtxt Name
- | TySynKindCtxt Name
- | TyFamResKindCtxt Name
- pprUserTypeCtxt :: UserTypeCtxt -> SDoc
- isSigMaybe :: UserTypeCtxt -> Maybe Name
- data SkolemInfo
- = SigSkol UserTypeCtxt TcType [(Name, TcTyVar)]
- | SigTypeSkol UserTypeCtxt
- | ForAllSkol SDoc
- | DerivSkol Type
- | InstSkol
- | InstSC TypeSize
- | FamInstSkol
- | PatSkol ConLike (HsMatchContext Name)
- | ArrowSkol
- | IPSkol [HsIPName]
- | RuleSkol RuleName
- | InferSkol [(Name, TcType)]
- | BracketSkol
- | UnifyForAllSkol TcType
- | TyConSkol TyConFlavour Name
- | DataConSkol Name
- | ReifySkol
- | QuantCtxtSkol
- | UnkSkol
- pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc
- pprSkolInfo :: SkolemInfo -> SDoc
- data CtOrigin
- = GivenOrigin SkolemInfo
- | OccurrenceOf Name
- | OccurrenceOfRecSel RdrName
- | AppOrigin
- | SpecPragOrigin UserTypeCtxt
- | TypeEqOrigin {
- uo_actual :: TcType
- uo_expected :: TcType
- uo_thing :: Maybe SDoc
- uo_visible :: Bool
- | KindEqOrigin TcType (Maybe TcType) CtOrigin (Maybe TypeOrKind)
- | IPOccOrigin HsIPName
- | OverLabelOrigin FastString
- | LiteralOrigin (HsOverLit GhcRn)
- | NegateOrigin
- | ArithSeqOrigin (ArithSeqInfo GhcRn)
- | AssocFamPatOrigin
- | SectionOrigin
- | TupleOrigin
- | ExprSigOrigin
- | PatSigOrigin
- | PatOrigin
- | ProvCtxtOrigin (PatSynBind GhcRn GhcRn)
- | RecordUpdOrigin
- | ViewPatOrigin
- | ScOrigin TypeSize
- | DerivClauseOrigin
- | DerivOriginDC DataCon Int Bool
- | DerivOriginCoerce Id Type Type Bool
- | StandAloneDerivOrigin
- | DefaultOrigin
- | DoOrigin
- | DoPatOrigin (LPat GhcRn)
- | MCompOrigin
- | MCompPatOrigin (LPat GhcRn)
- | IfOrigin
- | ProcOrigin
- | AnnOrigin
- | FunDepOrigin1 PredType CtOrigin RealSrcSpan PredType CtOrigin RealSrcSpan
- | FunDepOrigin2 PredType CtOrigin PredType SrcSpan
- | HoleOrigin
- | UnboundOccurrenceOf OccName
- | ListOrigin
- | StaticOrigin
- | FailablePattern (LPat GhcTcId)
- | Shouldn'tHappenOrigin String
- | InstProvidedOrigin Module ClsInst
- exprCtOrigin :: HsExpr GhcRn -> CtOrigin
- lexprCtOrigin :: LHsExpr GhcRn -> CtOrigin
- matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin
- grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin
- isVisibleOrigin :: CtOrigin -> Bool
- toInvisibleOrigin :: CtOrigin -> CtOrigin
- pprCtOrigin :: CtOrigin -> SDoc
- isGivenOrigin :: CtOrigin -> Bool
Documentation
data UserTypeCtxt Source #
UserTypeCtxt describes the origin of the polymorphic type in the places where we need an expression to have that type
pprUserTypeCtxt :: UserTypeCtxt -> SDoc Source #
isSigMaybe :: UserTypeCtxt -> Maybe Name Source #
data SkolemInfo Source #
Instances
pprSigSkolInfo :: UserTypeCtxt -> TcType -> SDoc Source #
pprSkolInfo :: SkolemInfo -> SDoc Source #
matchesCtOrigin :: MatchGroup GhcRn (LHsExpr GhcRn) -> CtOrigin Source #
Extract a suitable CtOrigin from a MatchGroup
grhssCtOrigin :: GRHSs GhcRn (LHsExpr GhcRn) -> CtOrigin Source #
Extract a suitable CtOrigin from guarded RHSs
isVisibleOrigin :: CtOrigin -> Bool Source #
toInvisibleOrigin :: CtOrigin -> CtOrigin Source #
pprCtOrigin :: CtOrigin -> SDoc Source #
isGivenOrigin :: CtOrigin -> Bool Source #