Safe Haskell | None |
---|
A module describing applicative functors
- module Algebra.Functor
- class (Unit f, Functor f) => Applicative f where
- (<*>) :: f (a -> b) -> f a -> f b
- newtype Zip f a = Zip {
- deZip :: f a
- newtype Backwards f a = Backwards {
- forwards :: f a
- c'zip :: Constraint (f a) -> Constraint (Zip f a)
- c'backwards :: Constraint (f a) -> Constraint (Backwards f a)
- (*>) :: Applicative f => f b -> f a -> f a
- (<*) :: Applicative f => f a -> f b -> f a
- (<**>) :: Applicative f => f (a -> b) -> f a -> f b
- ap :: Applicative f => f (a -> b) -> f a -> f b
- between :: Applicative f => f b -> f c -> f a -> f a
- liftA :: Functor f => (a -> b) -> f a -> f b
- liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f e
- forever :: Applicative f => f a -> f b
- plusA :: (Applicative f, Semigroup a) => f a -> f a -> f a
- zeroA :: (Unit f, Monoid a) => f a
Documentation
module Algebra.Functor
class (Unit f, Functor f) => Applicative f whereSource
A wrapper type for lists with zipping Applicative instances, such that
Zip [f1,...,fn]
<*>
Zip [x1,...,xn] == Zip [f1 x1,...,fn xn]
Unit (Zip []) | |
Unit (Zip Tree) | |
Traversable f => Traversable (Zip f) | |
Foldable f => Foldable (Zip f) | |
Applicative (Zip []) | |
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) |
A wrapper for applicative functors with actions executed in the reverse order
ConcreteMonad Backwards | |
MonadTrans Backwards | |
MonadFuture m (Backwards m) | |
Unit f => Unit (Backwards f) | |
MonadFix m => MonadFix (Backwards m) | |
MonadFix m => Monad (Backwards m) | |
Applicative f => Applicative (Backwards f) | |
Functor f => Functor (Backwards f) | |
Ring (f a) => Ring (Backwards f a) | |
Semiring (f a) => Semiring (Backwards f a) | |
Monoid (f a) => Monoid (Backwards f a) | |
Semigroup (f a) => Semigroup (Backwards f a) |
c'zip :: Constraint (f a) -> Constraint (Zip f a)Source
c'backwards :: Constraint (f a) -> Constraint (Backwards f a)Source
(*>) :: Applicative f => f b -> f a -> f aSource
(<*) :: Applicative f => f a -> f b -> f aSource
(<**>) :: Applicative f => f (a -> b) -> f a -> f bSource
ap :: Applicative f => f (a -> b) -> f a -> f bSource
between :: Applicative f => f b -> f c -> f a -> f aSource
liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f cSource
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f dSource
liftA4 :: Applicative f => (a -> b -> c -> d -> e) -> f a -> f b -> f c -> f d -> f eSource
forever :: Applicative f => f a -> f bSource
plusA :: (Applicative f, Semigroup a) => f a -> f a -> f aSource