transformers-0.5.2.0: Concrete functor and monad transformers

Copyright | (c) Russell O'Connor 2009
License | BSD-style (see the file LICENSE)
Maintainer | R.Paterson@city.ac.uk
Stability | experimental
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Control.Applicative.Backwards

Description

Making functors with an `Applicative` instance that performs actions in the reverse order.

Synopsis

- newtype Backwards f a = Backwards {
  - forwards :: f a
  }

# Documentation

newtype Backwards f a #

The same functor, but with an `Applicative` instance that performs actions in the reverse order.

Constructors

Backwards |

Fields

- forwards :: f a

Instances

Functor f => Functor (Backwards * f) # | Derived instance.
Methods fmap :: (a -> b) -> Backwards * f a -> Backwards * f b Source # (<$) :: a -> Backwards * f b -> Backwards * f a Source #
Applicative f => Applicative (Backwards * f) # | Apply `f`-actions in the reverse order.
Methods pure :: a -> Backwards * f a Source # (<*>) :: Backwards * f (a -> b) -> Backwards * f a -> Backwards * f b Source # liftA2 :: (a -> b -> c) -> Backwards * f a -> Backwards * f b -> Backwards * f c Source # (*>) :: Backwards * f a -> Backwards * f b -> Backwards * f b Source # (<*) :: Backwards * f a -> Backwards * f b -> Backwards * f a Source #
Foldable f => Foldable (Backwards * f) # | Derived instance.

Methods

fold :: Monoid m => Backwards * f m -> m Source #

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

foldr :: (a -> b -> b) -> b -> Backwards * f a -> b Source #

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

foldl :: (b -> a -> b) -> b -> Backwards * f a -> b Source #

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

foldr1 :: (a -> a -> a) -> Backwards * f a -> a Source #

foldl1 :: (a -> a -> a) -> Backwards * f a -> a Source #

toList :: Backwards * f a -> [a] Source #

null :: Backwards * f a -> Bool Source #

length :: Backwards * f a -> Int Source #

elem :: Eq a => a -> Backwards * f a -> Bool Source #

maximum :: Ord a => Backwards * f a -> a Source #

minimum :: Ord a => Backwards * f a -> a Source #

sum :: Num a => Backwards * f a -> a Source #

product :: Num a => Backwards * f a -> a Source #

Traversable f => Traversable (Backwards * f) # | Derived instance.
Methods traverse :: Applicative f => (a -> f b) -> Backwards * f a -> f (Backwards * f b) Source # sequenceA :: Applicative f => Backwards * f (f a) -> f (Backwards * f a) Source # mapM :: Monad m => (a -> m b) -> Backwards * f a -> m (Backwards * f b) Source # sequence :: Monad m => Backwards * f (m a) -> m (Backwards * f a) Source #
Eq1 f => Eq1 (Backwards * f) # |
Methods liftEq :: (a -> b -> Bool) -> Backwards * f a -> Backwards * f b -> Bool Source #
Ord1 f => Ord1 (Backwards * f) # |
Methods liftCompare :: (a -> b -> Ordering) -> Backwards * f a -> Backwards * f b -> Ordering Source #
Read1 f => Read1 (Backwards * f) # |
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Backwards * f a) Source # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Backwards * f a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Backwards * f a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Backwards * f a] Source #
Show1 f => Show1 (Backwards * f) # |
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Backwards * f a -> ShowS Source # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Backwards * f a] -> ShowS Source #
Alternative f => Alternative (Backwards * f) # | Try alternatives in the same order as `f`.
Methods empty :: Backwards * f a Source # (<|>) :: Backwards * f a -> Backwards * f a -> Backwards * f a Source # some :: Backwards * f a -> Backwards * f [a] Source # many :: Backwards * f a -> Backwards * f [a] Source #
(Eq1 f, Eq a) => Eq (Backwards * f a) # |
Methods (==) :: Backwards * f a -> Backwards * f a -> Bool # (/=) :: Backwards * f a -> Backwards * f a -> Bool #
(Ord1 f, Ord a) => Ord (Backwards * f a) # |

Methods

compare :: Backwards * f a -> Backwards * f a -> Ordering #

(<) :: Backwards * f a -> Backwards * f a -> Bool #

(<=) :: Backwards * f a -> Backwards * f a -> Bool #

(>) :: Backwards * f a -> Backwards * f a -> Bool #

(>=) :: Backwards * f a -> Backwards * f a -> Bool #

max :: Backwards * f a -> Backwards * f a -> Backwards * f a #

min :: Backwards * f a -> Backwards * f a -> Backwards * f a #

(Read1 f, Read a) => Read (Backwards * f a) # |
Methods readsPrec :: Int -> ReadS (Backwards * f a) Source # readList :: ReadS [Backwards * f a] Source # readPrec :: ReadPrec (Backwards * f a) Source # readListPrec :: ReadPrec [Backwards * f a] Source #
(Show1 f, Show a) => Show (Backwards * f a) # |
Methods showsPrec :: Int -> Backwards * f a -> ShowS Source # show :: Backwards * f a -> String Source # showList :: [Backwards * f a] -> ShowS Source #