transformers-0.5.1.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 (TYPE Lifted) f)

Derived instance.

Methods

fmap :: (a -> b) -> Backwards (TYPE Lifted) f a -> Backwards (TYPE Lifted) f b Source

(<$) :: a -> Backwards (TYPE Lifted) f b -> Backwards (TYPE Lifted) f a Source

Applicative f => Applicative (Backwards (TYPE Lifted) f)

Apply f-actions in the reverse order.

Foldable f => Foldable (Backwards (TYPE Lifted) f)

Derived instance.

Methods

fold :: Monoid m => Backwards (TYPE Lifted) f m -> m Source

foldMap :: Monoid m => (a -> m) -> Backwards (TYPE Lifted) f a -> m Source

foldr :: (a -> b -> b) -> b -> Backwards (TYPE Lifted) f a -> b Source

foldr' :: (a -> b -> b) -> b -> Backwards (TYPE Lifted) f a -> b Source

foldl :: (b -> a -> b) -> b -> Backwards (TYPE Lifted) f a -> b Source

foldl' :: (b -> a -> b) -> b -> Backwards (TYPE Lifted) f a -> b Source

foldr1 :: (a -> a -> a) -> Backwards (TYPE Lifted) f a -> a Source

foldl1 :: (a -> a -> a) -> Backwards (TYPE Lifted) f a -> a Source

toList :: Backwards (TYPE Lifted) f a -> [a] Source

null :: Backwards (TYPE Lifted) f a -> Bool Source

length :: Backwards (TYPE Lifted) f a -> Int Source

elem :: Eq a => a -> Backwards (TYPE Lifted) f a -> Bool Source

maximum :: Ord a => Backwards (TYPE Lifted) f a -> a Source

minimum :: Ord a => Backwards (TYPE Lifted) f a -> a Source

sum :: Num a => Backwards (TYPE Lifted) f a -> a Source

product :: Num a => Backwards (TYPE Lifted) f a -> a Source

Traversable f => Traversable (Backwards (TYPE Lifted) f)

Derived instance.

Methods

traverse :: Applicative f => (a -> f b) -> Backwards (TYPE Lifted) f a -> f (Backwards (TYPE Lifted) f b) Source

sequenceA :: Applicative f => Backwards (TYPE Lifted) f (f a) -> f (Backwards (TYPE Lifted) f a) Source

mapM :: Monad m => (a -> m b) -> Backwards (TYPE Lifted) f a -> m (Backwards (TYPE Lifted) f b) Source

sequence :: Monad m => Backwards (TYPE Lifted) f (m a) -> m (Backwards (TYPE Lifted) f a) Source

Eq1 f => Eq1 (Backwards (TYPE Lifted) f) 

Methods

liftEq :: (a -> b -> Bool) -> Backwards (TYPE Lifted) f a -> Backwards (TYPE Lifted) f b -> Bool Source

Ord1 f => Ord1 (Backwards (TYPE Lifted) f) 

Methods

liftCompare :: (a -> b -> Ordering) -> Backwards (TYPE Lifted) f a -> Backwards (TYPE Lifted) f b -> Ordering Source

Read1 f => Read1 (Backwards (TYPE Lifted) f) 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Backwards (TYPE Lifted) f a) Source

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Backwards (TYPE Lifted) f a] Source

Show1 f => Show1 (Backwards (TYPE Lifted) f) 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Backwards (TYPE Lifted) f a -> ShowS Source

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Backwards (TYPE Lifted) f a] -> ShowS Source

Alternative f => Alternative (Backwards (TYPE Lifted) f)

Try alternatives in the same order as f.

(Eq1 f, Eq a) => Eq (Backwards (TYPE Lifted) f a) 

Methods

(==) :: Backwards (TYPE Lifted) f a -> Backwards (TYPE Lifted) f a -> Bool

(/=) :: Backwards (TYPE Lifted) f a -> Backwards (TYPE Lifted) f a -> Bool

(Ord1 f, Ord a) => Ord (Backwards (TYPE Lifted) f a) 
(Read1 f, Read a) => Read (Backwards (TYPE Lifted) f a) 
(Show1 f, Show a) => Show (Backwards (TYPE Lifted) f a)