ghc-9.12: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Utils.Monad.Codensity

Documentation

newtype Codensity (m :: Type -> Type) a Source #

Constructors

Codensity 

Fields

Instances

Instances details
MonadTrans Codensity Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

lift :: Monad m => m a -> Codensity m a Source #

Applicative (Codensity f) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

pure :: a -> Codensity f a #

(<*>) :: Codensity f (a -> b) -> Codensity f a -> Codensity f b #

liftA2 :: (a -> b -> c) -> Codensity f a -> Codensity f b -> Codensity f c #

(*>) :: Codensity f a -> Codensity f b -> Codensity f b #

(<*) :: Codensity f a -> Codensity f b -> Codensity f a #

Functor (Codensity k) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

fmap :: (a -> b) -> Codensity k a -> Codensity k b #

(<$) :: a -> Codensity k b -> Codensity k a #

Monad (Codensity f) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

(>>=) :: Codensity f a -> (a -> Codensity f b) -> Codensity f b #

(>>) :: Codensity f a -> Codensity f b -> Codensity f b #

return :: a -> Codensity f a #

MonadIO m => MonadFix (Codensity m) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

mfix :: (a -> Codensity m a) -> Codensity m a #

MonadIO m => MonadIO (Codensity m) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

liftIO :: IO a -> Codensity m a #

toCodensity :: Monad m => m a -> Codensity m a Source #

fromCodensity :: Monad m => Codensity m a -> m a Source #