hs-functors-0.1.4.0: Functors from products of Haskell and its dual to Haskell

Safe HaskellNone
LanguageHaskell2010

Control.Monad.Codensity

Documentation

newtype Codensity m a Source #

Constructors

Codensity 

Fields

Instances
MonadTrans (Codensity :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

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

Monad (Codensity m) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

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

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

return :: a -> Codensity m a #

fail :: String -> Codensity m a #

Functor (Codensity m) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

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

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

MonadFail f => MonadFail (Codensity f) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

fail :: String -> Codensity f a #

Applicative (Codensity p) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

pure :: a -> Codensity p a #

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

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

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

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

Alternative p => Alternative (Codensity p) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

empty :: Codensity p a #

(<|>) :: Codensity p a -> Codensity p a -> Codensity p a #

some :: Codensity p a -> Codensity p [a] #

many :: Codensity p a -> Codensity p [a] #

Alternative p => MonadPlus (Codensity p) Source # 
Instance details

Defined in Control.Monad.Codensity

Methods

mzero :: Codensity p a #

mplus :: Codensity p a -> Codensity p a -> Codensity p a #

unlift :: Applicative p => Codensity p a -> p a Source #