ghc-9.8.1: The GHC API
Safe HaskellNone
LanguageHaskell2010

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 #

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

Defined in GHC.Utils.Monad.Codensity

Methods

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

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

Defined in GHC.Utils.Monad.Codensity

Methods

liftIO :: IO a -> Codensity m a Source #

Applicative (Codensity f) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

pure :: a -> Codensity f a Source #

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

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

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

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

Functor (Codensity k) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

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

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

Monad (Codensity f) Source # 
Instance details

Defined in GHC.Utils.Monad.Codensity

Methods

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

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

return :: a -> Codensity f a Source #

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

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