Safe Haskell | Ignore |
---|---|
Language | GHC2021 |
Zonking types within the typechecker.
Distinct from the final zonking pass in GHC.Tc.Zonk.Type; see Note [Module structure for zonking] in GHC.Tc.Zonk.Type.
Synopsis
- module GHC.Tc.Zonk.Monad
- zonkTcType :: TcType -> ZonkM TcType
- zonkTcTypes :: [TcType] -> ZonkM [TcType]
- zonkTcTyVar :: TcTyVar -> ZonkM TcType
- zonkTcTyVars :: [TcTyVar] -> ZonkM [TcType]
- zonkTcTyVarToTcTyVar :: HasDebugCallStack => TcTyVar -> ZonkM TcTyVar
- zonkTcTyVarsToTcTyVars :: HasDebugCallStack => [TcTyVar] -> ZonkM [TcTyVar]
- zonkInvisTVBinder :: VarBndr TcTyVar spec -> ZonkM (VarBndr TcTyVar spec)
- zonkCo :: Coercion -> ZonkM Coercion
- zonkTcTyCon :: TcTyCon -> ZonkM TcTyCon
- zonkTcTypeAndFV :: TcType -> ZonkM DTyCoVarSet
- zonkTyCoVarsAndFV :: TyCoVarSet -> ZonkM TyCoVarSet
- zonkTyCoVarsAndFVList :: [TyCoVar] -> ZonkM [TyCoVar]
- zonkDTyCoVarSetAndFV :: DTyCoVarSet -> ZonkM DTyCoVarSet
- zonkId :: TcId -> ZonkM TcId
- zonkCoVar :: CoVar -> ZonkM CoVar
- zonkTyCoVar :: TyCoVar -> ZonkM TcType
- zonkTyCoVarKind :: TyCoVar -> ZonkM TyCoVar
- zonkTyCoVarBndrKind :: VarBndr TyCoVar flag -> ZonkM (VarBndr TyCoVar flag)
- zonkSkolemInfo :: SkolemInfo -> ZonkM SkolemInfo
- zonkSkolemInfoAnon :: SkolemInfoAnon -> ZonkM SkolemInfoAnon
- zonkCt :: Ct -> ZonkM Ct
- zonkWC :: WantedConstraints -> ZonkM WantedConstraints
- zonkSimples :: Cts -> ZonkM Cts
- zonkImplication :: Implication -> ZonkM Implication
- tcInitTidyEnv :: ZonkM TidyEnv
- tcInitOpenTidyEnv :: [TyCoVar] -> ZonkM TidyEnv
- tidyCt :: TidyEnv -> Ct -> Ct
- tidyEvVar :: TidyEnv -> EvVar -> EvVar
- tidyDelayedError :: TidyEnv -> DelayedError -> DelayedError
- zonkTidyTcType :: TidyEnv -> TcType -> ZonkM (TidyEnv, TcType)
- zonkTidyTcTypes :: TidyEnv -> [TcType] -> ZonkM (TidyEnv, [TcType])
- zonkTidyOrigin :: TidyEnv -> CtOrigin -> ZonkM (TidyEnv, CtOrigin)
- zonkTidyOrigins :: TidyEnv -> [CtOrigin] -> ZonkM (TidyEnv, [CtOrigin])
- zonkTidyFRRInfos :: TidyEnv -> [FixedRuntimeRepErrorInfo] -> ZonkM (TidyEnv, [FixedRuntimeRepErrorInfo])
- writeMetaTyVar :: HasDebugCallStack => TcTyVar -> TcType -> ZonkM ()
- writeMetaTyVarRef :: HasDebugCallStack => TcTyVar -> TcRef MetaDetails -> TcType -> ZonkM ()
- checkCoercionHole :: CoVar -> Coercion -> ZonkM Coercion
Zonking (within the typechecker)
The ZonkM
monad and ZonkGblEnv
module GHC.Tc.Zonk.Monad
Zonking types
zonkTcTyVarsToTcTyVars :: HasDebugCallStack => [TcTyVar] -> ZonkM [TcTyVar] Source #
Zonking TyCon
s
FreeVars
zonkTcTypeAndFV :: TcType -> ZonkM DTyCoVarSet Source #
Zonking CoVar
s and Id
s
zonkId :: TcId -> ZonkM TcId Source #
zonkId is used *during* typechecking just to zonk the Id'
s type
Zonking skolem info
Zonking constraints
Tidying
tcInitOpenTidyEnv :: [TyCoVar] -> ZonkM TidyEnv Source #
Get a TidyEnv
that includes mappings for all vars free in the given
type. Useful when tidying open types.
tidyDelayedError :: TidyEnv -> DelayedError -> DelayedError Source #
Zonk & tidy
zonkTidyFRRInfos :: TidyEnv -> [FixedRuntimeRepErrorInfo] -> ZonkM (TidyEnv, [FixedRuntimeRepErrorInfo]) Source #
Writing to metavariables
:: HasDebugCallStack | |
=> TcTyVar | the type varfiable to write to |
-> TcType | the type to write into the mutable reference |
-> ZonkM () |
Write into a currently-empty MetaTyVar.
Works with both type and kind variables.
:: HasDebugCallStack | |
=> TcTyVar | for debug assertions only; |
-> TcRef MetaDetails | ref cell must be for the same tyvar |
-> TcType | the type to write to the mutable reference |
-> ZonkM () |
Write into the MetaDetails
mutable references of a MetaTv
.
Handling coercion holes
checkCoercionHole :: CoVar -> Coercion -> ZonkM Coercion Source #
Check that a coercion is appropriate for filling a hole. (The hole itself is needed only for printing.) Always returns the checked coercion, but this return value is necessary so that the input coercion is forced only when the output is forced.