ghc-7.10.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcMType

Synopsis

- type TcTyVar = TyVar
- type TcKind = Kind
- type TcType = Type
- type TcTauType = TcType
- type TcThetaType = ThetaType
- type TcTyVarSet = TyVarSet
- newFlexiTyVar :: Kind -> TcM TcTyVar
- newFlexiTyVarTy :: Kind -> TcM TcType
- newFlexiTyVarTys :: Int -> Kind -> TcM [TcType]
- newReturnTyVar :: Kind -> TcM TcTyVar
- newReturnTyVarTy :: Kind -> TcM TcType
- newMetaKindVar :: TcM TcKind
- newMetaKindVars :: Int -> TcM [TcKind]
- mkTcTyVarName :: Unique -> FastString -> Name
- cloneMetaTyVar :: TcTyVar -> TcM TcTyVar
- newMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar
- readMetaTyVar :: TyVar -> TcM MetaDetails
- writeMetaTyVar :: TcTyVar -> TcType -> TcM ()
- writeMetaTyVarRef :: TcTyVar -> TcRef MetaDetails -> TcType -> TcM ()
- newMetaDetails :: MetaInfo -> TcM TcTyVarDetails
- isFilledMetaTyVar :: TyVar -> TcM Bool
- isUnfilledMetaTyVar :: TyVar -> TcM Bool
- newEvVar :: TcPredType -> TcM EvVar
- newEvVars :: TcThetaType -> TcM [EvVar]
- newEq :: TcType -> TcType -> TcM EvVar
- newDict :: Class -> [TcType] -> TcM DictId
- newTcEvBinds :: TcM EvBindsVar
- addTcEvBind :: EvBindsVar -> EvVar -> EvTerm -> TcM ()
- newSimpleWanted :: CtOrigin -> PredType -> TcM Ct
- newSimpleWanteds :: CtOrigin -> ThetaType -> TcM [Ct]
- tcInstTyVars :: [TKVar] -> TcM (TvSubst, [TcTyVar])
- newSigTyVar :: Name -> Kind -> TcM TcTyVar
- tcInstType :: ([TyVar] -> TcM (TvSubst, [TcTyVar])) -> TcType -> TcM ([TcTyVar], TcThetaType, TcType)
- tcInstSkolTyVars :: [TyVar] -> TcM (TvSubst, [TcTyVar])
- tcInstSuperSkolTyVarsX :: TvSubst -> [TyVar] -> TcM (TvSubst, [TcTyVar])
- tcInstSigTyVarsLoc :: SrcSpan -> [TyVar] -> TcRnIf gbl lcl (TvSubst, [TcTyVar])
- tcInstSigTyVars :: [TyVar] -> TcRnIf gbl lcl (TvSubst, [TcTyVar])
- tcInstSkolType :: TcType -> TcM ([TcTyVar], TcThetaType, TcType)
- tcSkolDFunType :: Type -> TcM ([TcTyVar], TcThetaType, TcType)
- tcSuperSkolTyVars :: [TyVar] -> (TvSubst, [TcTyVar])
- instSkolTyVars :: (Unique -> Name -> Kind -> TyVar) -> [TyVar] -> TcRnIf gbl lcl (TvSubst, [TyVar])
- freshenTyVarBndrs :: [TyVar] -> TcRnIf gbl lcl (TvSubst, [TyVar])
- zonkTcPredType :: TcPredType -> TcM TcPredType
- zonkTidyTcType :: TidyEnv -> TcType -> TcM (TidyEnv, TcType)
- zonkTidyOrigin :: TidyEnv -> CtOrigin -> TcM (TidyEnv, CtOrigin)
- tidyEvVar :: TidyEnv -> EvVar -> EvVar
- tidyCt :: TidyEnv -> Ct -> Ct
- tidySkolemInfo :: TidyEnv -> SkolemInfo -> (TidyEnv, SkolemInfo)
- skolemiseUnboundMetaTyVar :: TcTyVar -> TcTyVarDetails -> TcM TyVar
- zonkTcTyVar :: TcTyVar -> TcM TcType
- zonkTcTyVars :: [TcTyVar] -> TcM [TcType]
- zonkTyVarsAndFV :: TyVarSet -> TcM TyVarSet
- zonkTcTypeAndFV :: TcType -> TcM TyVarSet
- zonkQuantifiedTyVar :: TcTyVar -> TcM TcTyVar
- quantifyTyVars :: TcTyVarSet -> TcTyVarSet -> TcM [TcTyVar]
- zonkTcTyVarBndr :: TcTyVar -> TcM TcTyVar
- zonkTcType :: TcType -> TcM TcType
- zonkTcTypes :: [TcType] -> TcM [TcType]
- zonkTcThetaType :: TcThetaType -> TcM TcThetaType
- zonkTcKind :: TcKind -> TcM TcKind
- defaultKindVarToStar :: TcTyVar -> TcM Kind
- zonkEvVar :: EvVar -> TcM EvVar
- zonkWC :: WantedConstraints -> TcM WantedConstraints
- zonkSimples :: Cts -> TcM Cts
- zonkId :: TcId -> TcM TcId
- zonkCt :: Ct -> TcM Ct
- zonkSkolemInfo :: SkolemInfo -> TcM SkolemInfo
- tcGetGlobalTyVars :: TcM TcTyVarSet
- newWildcardVar :: Name -> Kind -> TcM TcTyVar
- newWildcardVarMetaKind :: Name -> TcM TcTyVar

# Documentation

type TcTyVar = TyVar Source

type TcKind = Kind Source

type TcType = Type Source

type TcTauType = TcType Source

type TcThetaType = ThetaType Source

type TcTyVarSet = TyVarSet Source

newFlexiTyVar :: Kind -> TcM TcTyVar Source

newFlexiTyVarTy :: Kind -> TcM TcType Source

newFlexiTyVarTys :: Int -> Kind -> TcM [TcType] Source

newReturnTyVar :: Kind -> TcM TcTyVar Source

newReturnTyVarTy :: Kind -> TcM TcType Source

newMetaKindVar :: TcM TcKind Source

newMetaKindVars :: Int -> TcM [TcKind] Source

mkTcTyVarName :: Unique -> FastString -> Name Source

cloneMetaTyVar :: TcTyVar -> TcM TcTyVar Source

newMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar Source

readMetaTyVar :: TyVar -> TcM MetaDetails Source

writeMetaTyVar :: TcTyVar -> TcType -> TcM () Source

writeMetaTyVarRef :: TcTyVar -> TcRef MetaDetails -> TcType -> TcM () Source

newMetaDetails :: MetaInfo -> TcM TcTyVarDetails Source

isFilledMetaTyVar :: TyVar -> TcM Bool Source

isUnfilledMetaTyVar :: TyVar -> TcM Bool Source

newEvVar :: TcPredType -> TcM EvVar Source

newEvVars :: TcThetaType -> TcM [EvVar] Source

newEq :: TcType -> TcType -> TcM EvVar Source

newDict :: Class -> [TcType] -> TcM DictId Source

newTcEvBinds :: TcM EvBindsVar Source

addTcEvBind :: EvBindsVar -> EvVar -> EvTerm -> TcM () Source

newSimpleWanted :: CtOrigin -> PredType -> TcM Ct Source

newSimpleWanteds :: CtOrigin -> ThetaType -> TcM [Ct] Source

tcInstTyVars :: [TKVar] -> TcM (TvSubst, [TcTyVar]) Source

newSigTyVar :: Name -> Kind -> TcM TcTyVar Source

tcInstType :: ([TyVar] -> TcM (TvSubst, [TcTyVar])) -> TcType -> TcM ([TcTyVar], TcThetaType, TcType) Source

tcInstSkolTyVars :: [TyVar] -> TcM (TvSubst, [TcTyVar]) Source

tcInstSuperSkolTyVarsX :: TvSubst -> [TyVar] -> TcM (TvSubst, [TcTyVar]) Source

tcInstSigTyVarsLoc :: SrcSpan -> [TyVar] -> TcRnIf gbl lcl (TvSubst, [TcTyVar]) Source

tcInstSigTyVars :: [TyVar] -> TcRnIf gbl lcl (TvSubst, [TcTyVar]) Source

tcInstSkolType :: TcType -> TcM ([TcTyVar], TcThetaType, TcType) Source

tcSkolDFunType :: Type -> TcM ([TcTyVar], TcThetaType, TcType) Source

tcSuperSkolTyVars :: [TyVar] -> (TvSubst, [TcTyVar]) Source

instSkolTyVars :: (Unique -> Name -> Kind -> TyVar) -> [TyVar] -> TcRnIf gbl lcl (TvSubst, [TyVar]) Source

freshenTyVarBndrs :: [TyVar] -> TcRnIf gbl lcl (TvSubst, [TyVar]) Source

Give fresh uniques to a bunch of TyVars, but they stay as TyVars, rather than becoming TcTyVars Used in FamInst.newFamInst, and Inst.newClsInst

zonkTcPredType :: TcPredType -> TcM TcPredType Source

zonkTidyTcType :: TidyEnv -> TcType -> TcM (TidyEnv, TcType) Source

zonkTidyOrigin :: TidyEnv -> CtOrigin -> TcM (TidyEnv, CtOrigin) Source

tidyEvVar :: TidyEnv -> EvVar -> EvVar Source

tidyCt :: TidyEnv -> Ct -> Ct Source

tidySkolemInfo :: TidyEnv -> SkolemInfo -> (TidyEnv, SkolemInfo) Source

skolemiseUnboundMetaTyVar :: TcTyVar -> TcTyVarDetails -> TcM TyVar Source

zonkTcTyVar :: TcTyVar -> TcM TcType Source

zonkTcTyVars :: [TcTyVar] -> TcM [TcType] Source

zonkTyVarsAndFV :: TyVarSet -> TcM TyVarSet Source

zonkTcTypeAndFV :: TcType -> TcM TyVarSet Source

zonkQuantifiedTyVar :: TcTyVar -> TcM TcTyVar Source

quantifyTyVars :: TcTyVarSet -> TcTyVarSet -> TcM [TcTyVar] Source

zonkTcTyVarBndr :: TcTyVar -> TcM TcTyVar Source

zonkTcType :: TcType -> TcM TcType Source

zonkTcTypes :: [TcType] -> TcM [TcType] Source

zonkTcThetaType :: TcThetaType -> TcM TcThetaType Source

zonkTcKind :: TcKind -> TcM TcKind Source

defaultKindVarToStar :: TcTyVar -> TcM Kind Source

zonkEvVar :: EvVar -> TcM EvVar Source

zonkWC :: WantedConstraints -> TcM WantedConstraints Source

zonkSimples :: Cts -> TcM Cts Source

zonkId :: TcId -> TcM TcId Source

zonkCt :: Ct -> TcM Ct Source

zonkSkolemInfo :: SkolemInfo -> TcM SkolemInfo Source

tcGetGlobalTyVars :: TcM TcTyVarSet Source

newWildcardVar :: Name -> Kind -> TcM TcTyVar Source

Create a new meta var with the given kind. This meta var should be used to replace a wildcard in a type. Such a wildcard meta var can be distinguished from other meta vars with the `isWildcardVar` function.

newWildcardVarMetaKind :: Name -> TcM TcTyVar Source

Create a new meta var (which can unify with a type of any kind). This meta var should be used to replace a wildcard in a type. Such a wildcard meta var can be distinguished from other meta vars with the `isWildcardVar` function.