Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines useful and alternative applicative functions and constructs.
Synopsis
- (<:>) :: forall f a b. Applicative f => f a -> f b -> f (a, b)
- (<::>) :: forall f a b. Applicative f => f a -> f b -> f (a, b)
- (<<>>) :: forall f a. (Applicative f, Monoid a) => f a -> f a -> f a
- unit :: forall f. Applicative f => f ()
- (<.>) :: forall f b c a. Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c)
- mkApp :: forall f a b. Functor f => (forall x y. f x -> f y -> f (x, y)) -> f (a -> b) -> f a -> f b
- mkPure :: forall f a. Functor f => f () -> a -> f a
- class Monoidal f where
- mkNilA :: forall f. Functor f => (forall x. x -> f x) -> f ()
- mkZipA :: forall f a b. Functor f => (forall x y. f (x -> y) -> f x -> f y) -> f a -> f b -> f (a, b)
Documentation
(<:>) :: forall f a b. Applicative f => f a -> f b -> f (a, b) infixl 5 Source #
Pairs up all elements in two applicative functors. One of the operations/values of the monoidal presentation of functors
(<::>) :: forall f a b. Applicative f => f a -> f b -> f (a, b) infixl 4 Source #
Just (<:>), but with lower precedence
(<<>>) :: forall f a. (Applicative f, Monoid a) => f a -> f a -> f a infixl 6 Source #
Adds up values in two applicative functors.
unit :: forall f. Applicative f => f () Source #
Applicative functor with () in it One of the operations/values of the monoidal presentation of functors
(<.>) :: forall f b c a. Applicative f => f (b -> c) -> f (a -> b) -> f (a -> c) Source #
Composes two applicative functions.
mkApp :: forall f a b. Functor f => (forall x y. f x -> f y -> f (x, y)) -> f (a -> b) -> f a -> f b Source #
Creates a (<*>) definition from a definition of (<:>). mkApp (<:>) = (<*>)