transformers-0.6.1.1: 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
LanguageHaskell2010

Control.Applicative.Backwards

Description

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

Synopsis

Documentation

newtype Backwards (f :: k -> Type) (a :: k) Source #

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

Constructors

Backwards 

Fields

Instances

Instances details
Generic1 (Backwards f :: k -> Type) Source # 
Instance details

Defined in Control.Applicative.Backwards

Associated Types

type Rep1 (Backwards f :: k -> Type) 
Instance details

Defined in Control.Applicative.Backwards

type Rep1 (Backwards f :: k -> Type) = D1 ('MetaData "Backwards" "Control.Applicative.Backwards" "transformers-0.6.1.1-02e2" 'True) (C1 ('MetaCons "Backwards" 'PrefixI 'True) (S1 ('MetaSel ('Just "forwards") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))

Methods

from1 :: forall (a :: k). Backwards f a -> Rep1 (Backwards f) a #

to1 :: forall (a :: k). Rep1 (Backwards f) a -> Backwards f a #

Foldable1 f => Foldable1 (Backwards f) Source #

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

fold1 :: Semigroup m => Backwards f m -> m Source #

foldMap1 :: Semigroup m => (a -> m) -> Backwards f a -> m Source #

foldMap1' :: Semigroup m => (a -> m) -> Backwards f a -> m Source #

toNonEmpty :: Backwards f a -> NonEmpty a Source #

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

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

head :: Backwards f a -> a Source #

last :: Backwards f a -> a Source #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Backwards f a -> b Source #

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

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Backwards f a -> b Source #

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

Eq1 f => Eq1 (Backwards f) Source # 
Instance details

Defined in Control.Applicative.Backwards

Methods

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

Ord1 f => Ord1 (Backwards f) Source # 
Instance details

Defined in Control.Applicative.Backwards

Methods

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

Read1 f => Read1 (Backwards f) Source # 
Instance details

Defined in Control.Applicative.Backwards

Show1 f => Show1 (Backwards f) Source # 
Instance details

Defined in Control.Applicative.Backwards

Methods

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

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

Contravariant f => Contravariant (Backwards f) Source #

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

contramap :: (a' -> a) -> Backwards f a -> Backwards f a' Source #

(>$) :: b -> Backwards f b -> Backwards f a Source #

Alternative f => Alternative (Backwards f) Source #

Try alternatives in the same order as f.

Instance details

Defined in Control.Applicative.Backwards

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] #

Applicative f => Applicative (Backwards f) Source #

Apply f-actions in the reverse order.

Instance details

Defined in Control.Applicative.Backwards

Methods

pure :: a -> Backwards f a #

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

liftA2 :: (a -> b -> c) -> Backwards f a -> Backwards f b -> Backwards f c #

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

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

Functor f => Functor (Backwards f) Source #

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

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

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

Foldable f => Foldable (Backwards f) Source #

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

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

foldMap :: Monoid m => (a -> m) -> Backwards f a -> 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.

Instance details

Defined in Control.Applicative.Backwards

Methods

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

sequenceA :: Applicative f0 => Backwards f (f0 a) -> f0 (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) #

Generic (Backwards f a) Source # 
Instance details

Defined in Control.Applicative.Backwards

Associated Types

type Rep (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

type Rep (Backwards f a) = D1 ('MetaData "Backwards" "Control.Applicative.Backwards" "transformers-0.6.1.1-02e2" 'True) (C1 ('MetaCons "Backwards" 'PrefixI 'True) (S1 ('MetaSel ('Just "forwards") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))

Methods

from :: Backwards f a -> Rep (Backwards f a) x #

to :: Rep (Backwards f a) x -> Backwards f a #

(Read1 f, Read a) => Read (Backwards f a) Source # 
Instance details

Defined in Control.Applicative.Backwards

(Show1 f, Show a) => Show (Backwards f a) Source # 
Instance details

Defined in Control.Applicative.Backwards

Methods

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

show :: Backwards f a -> String #

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

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

Defined in Control.Applicative.Backwards

Methods

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

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

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

Defined in Control.Applicative.Backwards

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 #

type Rep1 (Backwards f :: k -> Type) Source # 
Instance details

Defined in Control.Applicative.Backwards

type Rep1 (Backwards f :: k -> Type) = D1 ('MetaData "Backwards" "Control.Applicative.Backwards" "transformers-0.6.1.1-02e2" 'True) (C1 ('MetaCons "Backwards" 'PrefixI 'True) (S1 ('MetaSel ('Just "forwards") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))
type Rep (Backwards f a) Source # 
Instance details

Defined in Control.Applicative.Backwards

type Rep (Backwards f a) = D1 ('MetaData "Backwards" "Control.Applicative.Backwards" "transformers-0.6.1.1-02e2" 'True) (C1 ('MetaCons "Backwards" 'PrefixI 'True) (S1 ('MetaSel ('Just "forwards") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))