comonad-5.0.2: 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 k f a :: forall k. (k -> *) -> k -> * = IdentityT {
  - runIdentityT :: f a
  }

# Documentation

newtype IdentityT k f a :: forall k. (k -> *) -> k -> * #

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

Constructors

IdentityT |

Fields

- runIdentityT :: f a

Instances

ComonadEnv e w => ComonadEnv e (IdentityT * w) Source # |
Methods ask :: IdentityT * w a -> e Source #
ComonadStore s w => ComonadStore s (IdentityT * w) Source # |
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 # |
Methods trace :: m -> IdentityT * w a -> a Source #
MonadTrans (IdentityT *) |
Methods lift :: Monad m => m a -> IdentityT * m a #
ComonadHoist (IdentityT *) Source # |
Methods cohoist :: (Comonad w, Comonad v) => (forall x. w x -> v x) -> IdentityT * w a -> IdentityT * v a Source #
ComonadTrans (IdentityT *) Source # |
Methods lower :: Comonad w => IdentityT * w a -> w a Source #
Monad m => Monad (IdentityT * m) |
Methods (>>=) :: IdentityT * m a -> (a -> IdentityT * m b) -> IdentityT * m b # (>>) :: IdentityT * m a -> IdentityT * m b -> IdentityT * m b # return :: a -> IdentityT * m a # fail :: String -> IdentityT * m a #
Functor m => Functor (IdentityT * m) |
Methods fmap :: (a -> b) -> IdentityT * m a -> IdentityT * m b # (<$) :: a -> IdentityT * m b -> IdentityT * m a #
MonadFix m => MonadFix (IdentityT * m) |
Methods mfix :: (a -> IdentityT * m a) -> IdentityT * m a #
MonadFail m => MonadFail (IdentityT * m) |
Methods fail :: String -> IdentityT * m a #
Applicative m => Applicative (IdentityT * m) |
Methods pure :: a -> IdentityT * m a # (<*>) :: IdentityT * m (a -> b) -> IdentityT * m a -> IdentityT * m b # (*>) :: IdentityT * m a -> IdentityT * m b -> IdentityT * m b # (<*) :: IdentityT * m a -> IdentityT * m b -> IdentityT * m a #
Foldable f => Foldable (IdentityT * f) |

Methods

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

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

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

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

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

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

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

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

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

null :: IdentityT * f a -> Bool #

length :: IdentityT * f a -> Int #

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

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

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

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

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

Traversable f => Traversable (IdentityT * f) |
Methods traverse :: Applicative f => (a -> f b) -> IdentityT * f a -> f (IdentityT * f b) # sequenceA :: Applicative f => IdentityT * f (f a) -> f (IdentityT * f a) # mapM :: Monad m => (a -> m b) -> IdentityT * f a -> m (IdentityT * f b) # sequence :: Monad m => IdentityT * f (m a) -> m (IdentityT * f a) #
Eq1 f => Eq1 (IdentityT * f) |
Methods liftEq :: (a -> b -> Bool) -> IdentityT * f a -> IdentityT * f b -> Bool #
Ord1 f => Ord1 (IdentityT * f) |
Methods liftCompare :: (a -> b -> Ordering) -> IdentityT * f a -> IdentityT * f b -> Ordering #
Read1 f => Read1 (IdentityT * f) |
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IdentityT * f a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IdentityT * f a] #
Show1 f => Show1 (IdentityT * f) |
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IdentityT * f a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IdentityT * f a] -> ShowS #
MonadZip m => MonadZip (IdentityT * m) |
Methods mzip :: IdentityT * m a -> IdentityT * m b -> IdentityT * m (a, b) # mzipWith :: (a -> b -> c) -> IdentityT * m a -> IdentityT * m b -> IdentityT * m c # munzip :: IdentityT * m (a, b) -> (IdentityT * m a, IdentityT * m b) #
MonadIO m => MonadIO (IdentityT * m) |
Methods liftIO :: IO a -> IdentityT * m a #
Alternative m => Alternative (IdentityT * m) |
Methods empty :: IdentityT * m a # (<|>) :: IdentityT * m a -> IdentityT * m a -> IdentityT * m a # some :: IdentityT * m a -> IdentityT * m [a] # many :: IdentityT * m a -> IdentityT * m [a] #
MonadPlus m => MonadPlus (IdentityT * m) |
Methods mzero :: IdentityT * m a # mplus :: IdentityT * m a -> IdentityT * m a -> IdentityT * m a #
Distributive g => Distributive (IdentityT * g) |
Methods distribute :: Functor f => f (IdentityT * g a) -> IdentityT * g (f a) # collect :: Functor f => (a -> IdentityT * g b) -> f a -> IdentityT * g (f b) # distributeM :: Monad m => m (IdentityT * g a) -> IdentityT * g (m a) # collectM :: Monad m => (a -> IdentityT * g b) -> m a -> IdentityT * g (m b) #
ComonadApply w => ComonadApply (IdentityT * w) Source # |
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 #
Comonad w => Comonad (IdentityT * w) Source # |
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 #
(Eq1 f, Eq a) => Eq (IdentityT * f a) |
Methods (==) :: IdentityT * f a -> IdentityT * f a -> Bool # (/=) :: IdentityT * f a -> IdentityT * f a -> Bool #
(Ord1 f, Ord a) => Ord (IdentityT * f a) |

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) |
Methods readsPrec :: Int -> ReadS (IdentityT * f a) # readList :: ReadS [IdentityT * f a] # readPrec :: ReadPrec (IdentityT * f a) # readListPrec :: ReadPrec [IdentityT * f a] #
(Show1 f, Show a) => Show (IdentityT * f a) |
Methods showsPrec :: Int -> IdentityT * f a -> ShowS # show :: IdentityT * f a -> String # showList :: [IdentityT * f a] -> ShowS #