TcMType

ghc-7.10.3: 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

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

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

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

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

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.