Inst

ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

Inst

Synopsis

- deeplySkolemise :: TcSigmaType -> TcM (HsWrapper, [(Name, TyVar)], [EvVar], TcRhoType)
- topInstantiate :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcRhoType)
- topInstantiateInferred :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcSigmaType)
- deeplyInstantiate :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcRhoType)
- instCall :: CtOrigin -> [TcType] -> TcThetaType -> TcM HsWrapper
- instDFunType :: DFunId -> [DFunInstType] -> TcM ([TcType], TcThetaType)
- instStupidTheta :: CtOrigin -> TcThetaType -> TcM ()
- instTyVarsWith :: CtOrigin -> [TyVar] -> [TcType] -> TcM TCvSubst
- newWanted :: CtOrigin -> Maybe TypeOrKind -> PredType -> TcM CtEvidence
- newWanteds :: CtOrigin -> ThetaType -> TcM [CtEvidence]
- tcInstBinders :: [TyBinder] -> TcM (TCvSubst, [TcType])
- tcInstBindersX :: TCvSubst -> Maybe (VarEnv Kind) -> [TyBinder] -> TcM (TCvSubst, [TcType])
- tcInstBinderX :: Maybe (VarEnv Kind) -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)
- newOverloadedLit :: HsOverLit Name -> ExpRhoType -> TcM (HsOverLit TcId)
- mkOverLit :: OverLitVal -> TcM HsLit
- newClsInst :: Maybe OverlapMode -> Name -> [TyVar] -> ThetaType -> Class -> [Type] -> TcM ClsInst
- tcGetInsts :: TcM [ClsInst]
- tcGetInstEnvs :: TcM InstEnvs
- getOverlapFlag :: Maybe OverlapMode -> TcM OverlapFlag
- tcExtendLocalInstEnv :: [ClsInst] -> TcM a -> TcM a
- instCallConstraints :: CtOrigin -> TcThetaType -> TcM HsWrapper
- newMethodFromName :: CtOrigin -> Name -> TcRhoType -> TcM (HsExpr TcId)
- tcSyntaxName :: CtOrigin -> TcType -> (Name, HsExpr Name) -> TcM (Name, HsExpr TcId)
- tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet
- tyCoVarsOfCt :: Ct -> TcTyCoVarSet
- tyCoVarsOfCts :: Cts -> TcTyCoVarSet

# Documentation

deeplySkolemise :: TcSigmaType -> TcM (HsWrapper, [(Name, TyVar)], [EvVar], TcRhoType) Source #

topInstantiate :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcRhoType) Source #

Instantiate all outer type variables and any context. Never looks through arrows.

topInstantiateInferred :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcSigmaType) Source #

Instantiate all outer `Inferred` binders and any context. Never looks through arrows or specified type variables. Used for visible type application.

deeplyInstantiate :: CtOrigin -> TcSigmaType -> TcM (HsWrapper, TcRhoType) Source #

instCall :: CtOrigin -> [TcType] -> TcThetaType -> TcM HsWrapper Source #

instDFunType :: DFunId -> [DFunInstType] -> TcM ([TcType], TcThetaType) Source #

instStupidTheta :: CtOrigin -> TcThetaType -> TcM () Source #

instTyVarsWith :: CtOrigin -> [TyVar] -> [TcType] -> TcM TCvSubst Source #

newWanted :: CtOrigin -> Maybe TypeOrKind -> PredType -> TcM CtEvidence Source #

newWanteds :: CtOrigin -> ThetaType -> TcM [CtEvidence] Source #

tcInstBinders :: [TyBinder] -> TcM (TCvSubst, [TcType]) Source #

This is used to instantiate binders when type-checking *types* only. See also Note [Bidirectional type checking]

tcInstBindersX :: TCvSubst -> Maybe (VarEnv Kind) -> [TyBinder] -> TcM (TCvSubst, [TcType]) Source #

This is used to instantiate binders when type-checking *types* only. The `VarEnv Kind` gives some known instantiations. See also Note [Bidirectional type checking]

tcInstBinderX :: Maybe (VarEnv Kind) -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType) Source #

Used only in *types*

newOverloadedLit :: HsOverLit Name -> ExpRhoType -> TcM (HsOverLit TcId) Source #

mkOverLit :: OverLitVal -> TcM HsLit Source #

newClsInst :: Maybe OverlapMode -> Name -> [TyVar] -> ThetaType -> Class -> [Type] -> TcM ClsInst Source #

tcGetInsts :: TcM [ClsInst] Source #

tcGetInstEnvs :: TcM InstEnvs Source #

getOverlapFlag :: Maybe OverlapMode -> TcM OverlapFlag Source #

tcExtendLocalInstEnv :: [ClsInst] -> TcM a -> TcM a Source #

instCallConstraints :: CtOrigin -> TcThetaType -> TcM HsWrapper Source #

newMethodFromName :: CtOrigin -> Name -> TcRhoType -> TcM (HsExpr TcId) Source #

tcSyntaxName :: CtOrigin -> TcType -> (Name, HsExpr Name) -> TcM (Name, HsExpr TcId) Source #

tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet Source #

Returns free variables of WantedConstraints as a non-deterministic set. See Note [Deterministic FV] in FV.

tyCoVarsOfCt :: Ct -> TcTyCoVarSet Source #

Returns free variables of constraints as a non-deterministic set

tyCoVarsOfCts :: Cts -> TcTyCoVarSet Source #

Returns free variables of a bag of constraints as a non-deterministic set. See Note [Deterministic FV] in FV.