definitive-base-2.3: The base modules of the Definitive framework.

Safe HaskellNone
LanguageHaskell2010

Algebra.Applicative

Description

A module describing applicative functors

Synopsis

Documentation

newtype Zip f a Source

A wrapper type for lists with zipping Applicative instances, such that Zip [f1,...,fn] <*> Zip [x1,...,xn] == Zip [f1 x1,...,fn xn]

Constructors

Zip 

Fields

deZip :: f a
 

Instances

Unit (Zip []) 
Ord k => Unit (Zip (Map k)) 
Unit (Zip Tree) 
Traversable f => Traversable (Zip f) 
Foldable f => Foldable (Zip f) 
Applicative (Zip []) 
Ord k => Applicative (Zip (Map k)) 
Applicative (Zip Tree) 
Functor f => Functor (Zip f) 
(Applicative (Zip f), Monoid a) => Monoid (Zip f a) 
(Applicative (Zip f), Semigroup a) => Semigroup (Zip f a) 

newtype Backwards f a Source

A wrapper for applicative functors with actions executed in the reverse order

Constructors

Backwards 

Fields

forwards :: f a
 

(*>) :: Applicative f => f b -> f a -> f a infixl 3 Source

(<*) :: Applicative f => f a -> f b -> f a infixl 3 Source

(<**>) :: Applicative f => f (a -> b) -> f a -> f b infixl 1 Source

ap :: Applicative f => f (a -> b) -> f a -> f b Source

between :: Applicative f => f b -> f c -> f a -> f a Source

liftA :: Functor f => (a -> b) -> f a -> f b Source

liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c Source

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source

liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e Source

forever :: Applicative f => f a -> f b Source

zipWith :: Applicative (Zip f) => (a -> b -> c) -> f a -> f b -> f c Source

zipWith3 :: Applicative (Zip f) => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source

plusA :: (Applicative f, Semigroup a) => f a -> f a -> f a Source

zeroA :: (Unit f, Monoid a) => f a Source