comonad-5.0.8: Comonads

Copyright | (C) 2008-2011 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Control.Comonad.Trans.Identity

Description

Synopsis

- newtype IdentityT (f :: k -> Type) (a :: k) = IdentityT {
  - runIdentityT :: f a
  }

# Documentation

newtype IdentityT (f :: k -> Type) (a :: k) Source #

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

Constructors

IdentityT |

Fields

- runIdentityT :: f a

#### Instances

Instances details

ComonadEnv e w => ComonadEnv e (IdentityT w) Source # |
Instance details Defined in Control.Comonad.Env.Class Methods ask :: IdentityT w a -> e Source #
ComonadStore s w => ComonadStore s (IdentityT w) Source # |
Instance details Defined in Control.Comonad.Store.Class Methods pos :: IdentityT w a -> s Source # peek :: s -> IdentityT w a -> a Source # peeks :: (s -> s) -> IdentityT w a -> a Source # seek :: s -> IdentityT w a -> IdentityT w a Source # seeks :: (s -> s) -> IdentityT w a -> IdentityT w a Source # experiment :: Functor f => (s -> f s) -> IdentityT w a -> f a Source #
ComonadTraced m w => ComonadTraced m (IdentityT w) Source # |
Instance details Defined in Control.Comonad.Traced.Class Methods trace :: m -> IdentityT w a -> a Source #
FoldableWithIndex i m => FoldableWithIndex i (IdentityT m) |

Instance details

Defined in WithIndex

Methods

ifoldMap :: Monoid m0 => (i -> a -> m0) -> IdentityT m a -> m0 Source #

ifoldMap' :: Monoid m0 => (i -> a -> m0) -> IdentityT m a -> m0 Source #

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

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

ifoldr' :: (i -> a -> b -> b) -> b -> IdentityT m a -> b Source #

ifoldl' :: (i -> b -> a -> b) -> b -> IdentityT m a -> b Source #

FunctorWithIndex i m => FunctorWithIndex i (IdentityT m) |
Instance details Defined in WithIndex Methods imap :: (i -> a -> b) -> IdentityT m a -> IdentityT m b Source #
TraversableWithIndex i m => TraversableWithIndex i (IdentityT m) |
Instance details Defined in WithIndex Methods itraverse :: Applicative f => (i -> a -> f b) -> IdentityT m a -> f (IdentityT m b) Source #
ComonadHoist (IdentityT :: (Type -> Type) -> Type -> Type) Source # |
Instance details Defined in Control.Comonad.Hoist.Class Methods cohoist :: (Comonad w, Comonad v) => (forall x. w x -> v x) -> IdentityT w a -> IdentityT v a Source #
ComonadTrans (IdentityT :: (Type -> Type) -> Type -> Type) Source # |
Instance details Defined in Control.Comonad.Trans.Class Methods lower :: Comonad w => IdentityT w a -> w a Source #
MonadTrans (IdentityT :: (Type -> Type) -> Type -> Type) |
Instance details Defined in Control.Monad.Trans.Identity Methods lift :: Monad m => m a -> IdentityT m a Source #
MonadFail m => MonadFail (IdentityT m) |
Instance details Defined in Control.Monad.Trans.Identity Methods fail :: String -> IdentityT m a Source #
MonadFix m => MonadFix (IdentityT m) |
Instance details Defined in Control.Monad.Trans.Identity Methods mfix :: (a -> IdentityT m a) -> IdentityT m a Source #
MonadIO m => MonadIO (IdentityT m) |
Instance details Defined in Control.Monad.Trans.Identity Methods liftIO :: IO a -> IdentityT m a Source #
MonadZip m => MonadZip (IdentityT m) |
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 #
Foldable f => Foldable (IdentityT f) |

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 #

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 #

Eq1 f => Eq1 (IdentityT f) |
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) |
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) |
Instance details Defined in Control.Monad.Trans.Identity Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IdentityT f a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IdentityT f a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (IdentityT f a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [IdentityT f a] Source #
Show1 f => Show1 (IdentityT f) |
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 #
Contravariant f => Contravariant (IdentityT f) |
Instance details Defined in Control.Monad.Trans.Identity Methods contramap :: (a' -> a) -> IdentityT f a -> IdentityT f a' Source # (>$) :: b -> IdentityT f b -> IdentityT f a Source #
Traversable f => Traversable (IdentityT f) |
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 #
Alternative m => Alternative (IdentityT m) |
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 #
Applicative m => Applicative (IdentityT m) |
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 #
Functor m => Functor (IdentityT m) |
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 #
Monad m => Monad (IdentityT m) |
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 #
MonadPlus m => MonadPlus (IdentityT m) |
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 #
Comonad w => Comonad (IdentityT w) Source # |
Instance details Defined in Control.Comonad Methods extract :: IdentityT w a -> a Source # duplicate :: IdentityT w a -> IdentityT w (IdentityT w a) Source # extend :: (IdentityT w a -> b) -> IdentityT w a -> IdentityT w b Source #
ComonadApply w => ComonadApply (IdentityT w) Source # |
Instance details Defined in Control.Comonad Methods (<@>) :: IdentityT w (a -> b) -> IdentityT w a -> IdentityT w b Source # (@>) :: IdentityT w a -> IdentityT w b -> IdentityT w b Source # (<@) :: IdentityT w a -> IdentityT w b -> IdentityT w a Source #
Distributive g => Distributive (IdentityT g) |
Instance details Defined in Data.Distributive Methods distribute :: Functor f => f (IdentityT g a) -> IdentityT g (f a) Source # collect :: Functor f => (a -> IdentityT g b) -> f a -> IdentityT g (f b) Source # distributeM :: Monad m => m (IdentityT g a) -> IdentityT g (m a) Source # collectM :: Monad m => (a -> IdentityT g b) -> m a -> IdentityT g (m b) Source #
(Read1 f, Read a) => Read (IdentityT f a) |
Instance details Defined in Control.Monad.Trans.Identity Methods readsPrec :: Int -> ReadS (IdentityT f a) Source # readList :: ReadS [IdentityT f a] Source # readPrec :: ReadPrec (IdentityT f a) Source # readListPrec :: ReadPrec [IdentityT f a] Source #
(Show1 f, Show a) => Show (IdentityT f a) |
Instance details Defined in Control.Monad.Trans.Identity Methods showsPrec :: Int -> IdentityT f a -> ShowS Source # show :: IdentityT f a -> String Source # showList :: [IdentityT f a] -> ShowS Source #
(Eq1 f, Eq a) => Eq (IdentityT f a) |
Instance details Defined in Control.Monad.Trans.Identity Methods (==) :: IdentityT f a -> IdentityT f a -> Bool Source # (/=) :: IdentityT f a -> IdentityT f a -> Bool Source #
(Ord1 f, Ord a) => Ord (IdentityT f a) |

Instance details

Defined in Control.Monad.Trans.Identity

Methods

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

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

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

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

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

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

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