transformers-0.5.5.0: Concrete functor and monad transformers

Copyright(c) Russell O'Connor 2009
LicenseBSD-style (see the file LICENSE)
MaintainerR.Paterson@city.ac.uk
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Control.Applicative.Backwards

Description

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

Synopsis

Documentation

newtype Backwards f a Source #

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

Constructors

Backwards 

Fields

Instances

Functor f => Functor (Backwards * f) Source #

Derived instance.

Methods

fmap :: (a -> b) -> Backwards * f a -> Backwards * f b #

(<$) :: a -> Backwards * f b -> Backwards * f a #

Applicative f => Applicative (Backwards * f) Source #

Apply f-actions in the reverse order.

Methods

pure :: a -> Backwards * f a #

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

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

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

Foldable f => Foldable (Backwards * f) Source #

Derived instance.

Methods

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

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

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

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

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

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

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

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

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

null :: Backwards * f a -> Bool #

length :: Backwards * f a -> Int #

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

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

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

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

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

Traversable f => Traversable (Backwards * f) Source #

Derived instance.

Methods

traverse :: Applicative f => (a -> f b) -> Backwards * f a -> f (Backwards * f b) #

sequenceA :: Applicative f => Backwards * f (f a) -> f (Backwards * f a) #

mapM :: Monad m => (a -> m b) -> Backwards * f a -> m (Backwards * f b) #

sequence :: Monad m => Backwards * f (m a) -> m (Backwards * f a) #

Eq1 f => Eq1 (Backwards * f) Source # 

Methods

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

Ord1 f => Ord1 (Backwards * f) Source # 

Methods

liftCompare :: (a -> b -> Ordering) -> Backwards * f a -> Backwards * f b -> Ordering #

Read1 f => Read1 (Backwards * f) Source # 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Backwards * f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Backwards * f a] #

Show1 f => Show1 (Backwards * f) Source # 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Backwards * f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Backwards * f a] -> ShowS #

Alternative f => Alternative (Backwards * f) Source #

Try alternatives in the same order as f.

Methods

empty :: Backwards * f a #

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

some :: Backwards * f a -> Backwards * f [a] #

many :: Backwards * f a -> Backwards * f [a] #

(Eq1 f, Eq a) => Eq (Backwards * f a) Source # 

Methods

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

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

(Ord1 f, Ord a) => Ord (Backwards * f a) Source # 

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) Source # 
(Show1 f, Show a) => Show (Backwards * f a) Source # 

Methods

showsPrec :: Int -> Backwards * f a -> ShowS #

show :: Backwards * f a -> String #

showList :: [Backwards * f a] -> ShowS #