Hoogle Search
Within LTS Haskell 24.13 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
class Functor f =>
Applicative (f :: Type -> Type)protolude Protolude A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).-
No documentation available.
module TextShow.Control.
Applicative class Functor f =>
Applicative (f :: Type -> Type)graphviz Data.GraphViz.Parsing A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).class Functor f =>
Applicative (f :: Type -> Type)numhask NumHask.Prelude A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).class Functor f =>
Applicative (f :: Type -> Type)basic-prelude CorePrelude A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).class Functor f =>
Applicative (f :: Type -> Type)classy-prelude ClassyPrelude A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).class Functor f =>
Applicative (f :: Type -> Type)ghc-lib-parser GHC.Prelude.Basic A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).class Functor f =>
Applicative (f :: Type -> Type)ghc-lib-parser GHC.Utils.Monad A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).class Functor f =>
Applicative (f :: Type -> Type)foundation Foundation A functor with application, providing operations to
- embed pure expressions (pure), and
- sequence computations and combine their results (<*> and liftA2).
(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y
Further, any definition must satisfy the following:- Identity
pure id <*> v = v
- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
- Homomorphism
pure f <*> pure x = pure (f x)
- Interchange
u <*> pure y = pure ($ y) <*> u
forall x y. p (q x y) = f x . g y
it follows from the above thatliftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v
If f is also a Monad, it should satisfy (which implies that pure and <*> satisfy the applicative functor laws).