ghc-9.8.0.20230929: The GHC API
Safe HaskellNone
LanguageHaskell2010

GHC.Tc.Zonk.Type

Description

Final zonking to Type. See Note [Zonking to Type].

Distinct from the intra-typechecker zonking in GHC.Tc.Zonk.TcType; see Note [Module structure for zonking].

Synopsis

Zonking

For a description of "zonking", see Note [What is zonking?].

type ZonkTcM = ZonkT TcM Source #

Zonking monad for a computation that zonks to Type, reading from a ZonkEnv but not extending or modifying it.

See Note [Zonking to Type].

zonkTyVarBindersX :: [VarBndr TcTyVar vis] -> ZonkBndrTcM [VarBndr TyVar vis] Source #

zonkTyVarBinderX :: VarBndr TcTyVar vis -> ZonkBndrTcM (VarBndr TyVar vis) Source #

zonkTyBndrsX :: [TcTyVar] -> ZonkBndrTcM [TcTyVar] Source #

zonkTcTypeToType :: TcType -> TcM Type Source #

Confused by zonking? See Note [What is zonking?] in GHC.Tc.Zonk.Type.

zonkEvBinds :: Bag EvBind -> ZonkBndrTcM (Bag EvBind) Source #

ZonkEnv, and the ZonkT and ZonkBndrT monad transformers

Coercion holes

isFilledCoercionHole :: CoercionHole -> TcM Bool Source #

Is a coercion hole filled in?

unpackCoercionHole :: CoercionHole -> TcM Coercion Source #

Retrieve the contents of a coercion hole. Panics if the hole is unfilled

unpackCoercionHole_maybe :: CoercionHole -> TcM (Maybe Coercion) Source #

Retrieve the contents of a coercion hole, if it is filled

Rewriter sets

zonkRewriterSet :: RewriterSet -> TcM RewriterSet Source #

Check whether any coercion hole in a RewriterSet is still unsolved. Does this by recursively looking through filled coercion holes until one is found that is not yet filled in, at which point this aborts.

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.