ghc-9.8.0.20230929: The GHC API
Safe HaskellNone
LanguageHaskell2010

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 Source #

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

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

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

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

Functor ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

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

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

Monad ZonkM Source # 
Instance details

Defined in GHC.Tc.Zonk.Monad

Methods

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

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

return :: a -> ZonkM a Source #

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.