transformers-0.5.5.0: Concrete functor and monad transformers

Copyright(c) 2007 Magnus Therning
LicenseBSD-style (see the file LICENSE)
MaintainerR.Paterson@city.ac.uk
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Control.Monad.Trans.Identity

Contents

Description

The identity monad transformer.

This is useful for functions parameterized by a monad transformer.

Synopsis

The identity monad transformer

newtype IdentityT f a Source #

The trivial monad transformer, which maps a monad to an equivalent monad.

Constructors

IdentityT 

Fields

Instances
MonadTrans (IdentityT :: (* -> *) -> * -> *) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

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

Monad m => Monad (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b Source #

(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b Source #

return :: a -> IdentityT m a Source #

fail :: String -> IdentityT m a Source #

Functor m => Functor (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fmap :: (a -> b) -> IdentityT m a -> IdentityT m b Source #

(<$) :: a -> IdentityT m b -> IdentityT m a Source #

MonadFix m => MonadFix (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

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

MonadFail m => MonadFail (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fail :: String -> IdentityT m a Source #

Applicative m => Applicative (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a Source #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b Source #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c Source #

(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b Source #

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a Source #

Foldable f => Foldable (IdentityT f) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fold :: Monoid m => IdentityT f m -> m Source #

foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m Source #

foldr :: (a -> b -> b) -> b -> IdentityT f a -> b Source #

foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b Source #

foldl :: (b -> a -> b) -> b -> IdentityT f a -> b Source #

foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b Source #

foldr1 :: (a -> a -> a) -> IdentityT f a -> a Source #

foldl1 :: (a -> a -> a) -> IdentityT f a -> a Source #

toList :: IdentityT f a -> [a] Source #

null :: IdentityT f a -> Bool Source #

length :: IdentityT f a -> Int Source #

elem :: Eq a => a -> IdentityT f a -> Bool Source #

maximum :: Ord a => IdentityT f a -> a Source #

minimum :: Ord a => IdentityT f a -> a Source #

sum :: Num a => IdentityT f a -> a Source #

product :: Num a => IdentityT f a -> a Source #

Traversable f => Traversable (IdentityT f) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

traverse :: Applicative f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) Source #

sequenceA :: Applicative f0 => IdentityT f (f0 a) -> f0 (IdentityT f a) Source #

mapM :: Monad m => (a -> m b) -> IdentityT f a -> m (IdentityT f b) Source #

sequence :: Monad m => IdentityT f (m a) -> m (IdentityT f a) Source #

Eq1 f => Eq1 (IdentityT f) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftEq :: (a -> b -> Bool) -> IdentityT f a -> IdentityT f b -> Bool Source #

Ord1 f => Ord1 (IdentityT f) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftCompare :: (a -> b -> Ordering) -> IdentityT f a -> IdentityT f b -> Ordering Source #

Read1 f => Read1 (IdentityT f) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Show1 f => Show1 (IdentityT f) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IdentityT f a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IdentityT f a] -> ShowS Source #

MonadZip m => MonadZip (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzip :: IdentityT m a -> IdentityT m b -> IdentityT m (a, b) Source #

mzipWith :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c Source #

munzip :: IdentityT m (a, b) -> (IdentityT m a, IdentityT m b) Source #

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

Defined in Control.Monad.Trans.Identity

Methods

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

Alternative m => Alternative (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a Source #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a Source #

some :: IdentityT m a -> IdentityT m [a] Source #

many :: IdentityT m a -> IdentityT m [a] Source #

MonadPlus m => MonadPlus (IdentityT m) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a Source #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a Source #

(Eq1 f, Eq a) => Eq (IdentityT f a) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(==) :: IdentityT f a -> IdentityT f a -> Bool #

(/=) :: IdentityT f a -> IdentityT f a -> Bool #

(Ord1 f, Ord a) => Ord (IdentityT f a) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

compare :: IdentityT f a -> IdentityT f a -> Ordering #

(<) :: IdentityT f a -> IdentityT f a -> Bool #

(<=) :: IdentityT f a -> IdentityT f a -> Bool #

(>) :: IdentityT f a -> IdentityT f a -> Bool #

(>=) :: IdentityT f a -> IdentityT f a -> Bool #

max :: IdentityT f a -> IdentityT f a -> IdentityT f a #

min :: IdentityT f a -> IdentityT f a -> IdentityT f a #

(Read1 f, Read a) => Read (IdentityT f a) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

(Show1 f, Show a) => Show (IdentityT f a) Source # 
Instance details

Defined in Control.Monad.Trans.Identity

mapIdentityT :: (m a -> n b) -> IdentityT m a -> IdentityT n b Source #

Lift a unary operation to the new monad.

Lifting other operations

liftCatch :: Catch e m a -> Catch e (IdentityT m) a Source #

Lift a catchE operation to the new monad.

liftCallCC :: CallCC m a b -> CallCC (IdentityT m) a b Source #

Lift a callCC operation to the new monad.