See Note [The ZonkEnv]
Instances1Outputable
Outputable ZonkEnvDefined in ghc-9.10.3 · GHC.Tc.Zonk.Env
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Moduleghc-9.10.3GHC2021
The ZonkEnv zonking environment, and the ZonkT and ZonkBndrT monad transformers, for the final zonking to type in GHC.Tc.Zonk.Type.
See Note [Module structure for zonking] in GHC.Tc.Zonk.Type.
See Note [The ZonkEnv]
Outputable ZonkEnvDefined in ghc-9.10.3 · GHC.Tc.Zonk.EnvHow should we handle unfilled unification variables in the zonker?
See Note [Un-unified unification variables]
DefaultFlexiDefault unbound unification variables to Any
SkolemiseFlexiSkolemise unbound unification variables See Note [Zonking the LHS of a RULE]
RuntimeUnkFlexiUsed in the GHCi debugger
NoFlexiPanic on unfilled meta-variables See Note [Error on unconstrained meta-variables] in GHC.Tc.Utils.TcMType
MonadTrans ZonkTDefined in ghc-9.10.3 · GHC.Tc.Zonk.EnvMonad m => Monad (ZonkT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvFunctor m => Functor (ZonkT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvMonadFix m => MonadFix (ZonkT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvApplicative m => Applicative (ZonkT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvMonadIO m => MonadIO (ZonkT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvZonk binders, bringing them into scope in the inner computation.
Can be thought of as a state monad transformer StateT ZonkEnv m a,
but written in continuation-passing style.
See Note [Continuation-passing style for zonking].
ZonkBndrTrunZonkBndrT' :: forall r. (a -> ZonkT m r) -> ZonkT m rMonad (ZonkBndrT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvFunctor (ZonkBndrT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvMonadIO m => MonadFix (ZonkBndrT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvApplicative (ZonkBndrT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvMonadIO m => MonadIO (ZonkBndrT m)Defined in ghc-9.10.3 · GHC.Tc.Zonk.EnvZonk some binders and run the continuation.
Example:
zonk (ForAllTy (Bndr tv vis) body_ty)
= runZonkBndrT (zonkTyBndrX tv) $ \ tv' ->
do { body_ty' <- zonkTcTypeToTypeX body_ty
; return (ForAllTy (Bndr tv' vis) body_ty') }See Note [Continuation-passing style for zonking].
Run a nested computation that modifies the ZonkEnv, without affecting the outer environment.
Extend the knot-tied environment.