ghc-9.10.0.20240426: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Tc.Zonk.Monad

Description

The ZonkM monad, a stripped down TcM, used when zonking within the typechecker in GHC.Tc.Zonk.TcType.

See Note [Module structure for zonking] in GHC.Tc.Zonk.Type.

Synopsis

The ZonkM monad, a stripped down TcM for zonking

data ZonkM a where Source #

A stripped down version of TcM which is sufficient for zonking types.

Bundled Patterns

pattern ZonkM :: (ZonkGblEnv -> IO a) -> ZonkM a 

Instances

Instances details
MonadIO ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

liftIO :: IO a -> ZonkM a Source #

Applicative ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

pure :: a -> ZonkM a #

(<*>) :: ZonkM (a -> b) -> ZonkM a -> ZonkM b #

liftA2 :: (a -> b -> c) -> ZonkM a -> ZonkM b -> ZonkM c #

(*>) :: ZonkM a -> ZonkM b -> ZonkM b #

(<*) :: ZonkM a -> ZonkM b -> ZonkM a #

Functor ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

fmap :: (a -> b) -> ZonkM a -> ZonkM b #

(<$) :: a -> ZonkM b -> ZonkM a #

Monad ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

(>>=) :: ZonkM a -> (a -> ZonkM b) -> ZonkM b #

(>>) :: ZonkM a -> ZonkM b -> ZonkM b #

return :: a -> ZonkM a #

data ZonkGblEnv Source #

Information needed by the ZonkM monad, which is a slimmed down version of TcM with just enough information for zonking.

Logging within ZonkM

traceZonk :: String -> SDoc -> ZonkM () Source #

Same as traceTc, but for the ZonkM monad.