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

Data.Functor.Reverse

Description

Making functors whose elements are notionally in the reverse order from the original functor.

Synopsis

Documentation

newtype Reverse f a Source

The same functor, but with Foldable and Traversable instances that process the elements in the reverse order.

Constructors

Reverse 

Fields

Instances

Functor f => Functor (Reverse (TYPE Lifted) f)

Derived instance.

Methods

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

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

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

Derived instance.

Methods

pure :: a -> Reverse (TYPE Lifted) f a Source

(<*>) :: Reverse (TYPE Lifted) f (a -> b) -> Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f b Source

(*>) :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f b -> Reverse (TYPE Lifted) f b Source

(<*) :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f b -> Reverse (TYPE Lifted) f a Source

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

Fold from right to left.

Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Traverse from right to left.

Methods

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

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

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

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

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

Methods

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

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

Methods

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

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

Methods

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

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

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

Methods

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

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

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

Derived instance.

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

Methods

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

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

(Ord1 f, Ord a) => Ord (Reverse (TYPE Lifted) f a) 

Methods

compare :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a -> Ordering

(<) :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a -> Bool

(<=) :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a -> Bool

(>) :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a -> Bool

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

max :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a

min :: Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a -> Reverse (TYPE Lifted) f a

(Read1 f, Read a) => Read (Reverse (TYPE Lifted) f a) 
(Show1 f, Show a) => Show (Reverse (TYPE Lifted) f a)