Inst

ghc-8.6.3: 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]
- tcInstTyBinders :: TCvSubst -> Maybe (VarEnv Kind) -> [TyBinder] -> TcM (TCvSubst, [TcType])
- tcInstTyBinder :: Maybe (VarEnv Kind) -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)
- newOverloadedLit :: HsOverLit GhcRn -> ExpRhoType -> TcM (HsOverLit GhcTcId)
- mkOverLit :: OverLitVal -> TcM (HsLit GhcTc)
- 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 GhcTcId)
- tcSyntaxName :: CtOrigin -> TcType -> (Name, HsExpr GhcRn) -> TcM (Name, HsExpr GhcTcId)
- tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet
- tyCoVarsOfCt :: Ct -> TcTyCoVarSet
- tyCoVarsOfCts :: Cts -> TcTyCoVarSet

# Documentation

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

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

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

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

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

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

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

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

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

Used only in *types*

newOverloadedLit :: HsOverLit GhcRn -> ExpRhoType -> TcM (HsOverLit GhcTcId) #

mkOverLit :: OverLitVal -> TcM (HsLit GhcTc) #

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 GhcTcId) #

tcSyntaxName #

Arguments

:: CtOrigin |
-> TcType | Type to instantiate it at
-> (Name, HsExpr GhcRn) | (Standard name, user name)
-> TcM (Name, HsExpr GhcTcId) | (Standard name, suitable expression) USED ONLY FOR CmdTop (sigh) *** See Note [CmdSyntaxTable] in HsExpr

tyCoVarsOfWC :: WantedConstraints -> TyCoVarSet #

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

tyCoVarsOfCt :: Ct -> TcTyCoVarSet #

Returns free variables of constraints as a non-deterministic set

tyCoVarsOfCts :: Cts -> TcTyCoVarSet #

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