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.

  1. class Functor f => Applicative (f :: Type -> Type)

    base Prelude

    A functor with application, providing operations to

    • embed pure expressions (pure), and
    • sequence computations and combine their results (<*> and liftA2).
    A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:
    (<*>) = liftA2 id
    
    liftA2 f x y = f <$> x <*> y
    
    Further, any definition must satisfy the following: The other methods have the following default definitions, which may be overridden with equivalent specialized implementations: As a consequence of these laws, the Functor instance for f will satisfy It may be useful to note that supposing
    forall x y. p (q x y) = f x . g y
    
    it follows from the above that
    liftA2 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).

  2. module Control.Applicative

    This module describes a structure intermediate between a functor and a monad (technically, a strong lax monoidal functor). Compared with monads, this interface lacks the full power of the binding operation >>=, but

    • it has more instances.
    • it is sufficient for many uses, e.g. context-free parsing, or the Traversable class.
    • instances can perform analysis of computations before they are executed, and thus produce shared optimizations.
    This interface was introduced for parsers by Niklas Röjemo, because it admits more sharing than the monadic interface. The names here are mostly based on parsing work by Doaitse Swierstra. For more details, see Applicative Programming with Effects, by Conor McBride and Ross Paterson.

  3. class Functor f => Applicative (f :: Type -> Type)

    base Control.Applicative

    A functor with application, providing operations to

    • embed pure expressions (pure), and
    • sequence computations and combine their results (<*> and liftA2).
    A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:
    (<*>) = liftA2 id
    
    liftA2 f x y = f <$> x <*> y
    
    Further, any definition must satisfy the following: The other methods have the following default definitions, which may be overridden with equivalent specialized implementations: As a consequence of these laws, the Functor instance for f will satisfy It may be useful to note that supposing
    forall x y. p (q x y) = f x . g y
    
    it follows from the above that
    liftA2 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).

  4. class Functor f => Applicative (f :: Type -> Type)

    base GHC.Base

    A functor with application, providing operations to

    • embed pure expressions (pure), and
    • sequence computations and combine their results (<*> and liftA2).
    A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:
    (<*>) = liftA2 id
    
    liftA2 f x y = f <$> x <*> y
    
    Further, any definition must satisfy the following: The other methods have the following default definitions, which may be overridden with equivalent specialized implementations: As a consequence of these laws, the Functor instance for f will satisfy It may be useful to note that supposing
    forall x y. p (q x y) = f x . g y
    
    it follows from the above that
    liftA2 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).

  5. module Options.Applicative

    No documentation available.

  6. class Functor f => Applicative (f :: Type -> Type)

    hedgehog Hedgehog.Internal.Prelude

    A functor with application, providing operations to

    • embed pure expressions (pure), and
    • sequence computations and combine their results (<*> and liftA2).
    A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:
    (<*>) = liftA2 id
    
    liftA2 f x y = f <$> x <*> y
    
    Further, any definition must satisfy the following: The other methods have the following default definitions, which may be overridden with equivalent specialized implementations: As a consequence of these laws, the Functor instance for f will satisfy It may be useful to note that supposing
    forall x y. p (q x y) = f x . g y
    
    it follows from the above that
    liftA2 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).

  7. class Functor f => Applicative (f :: Type -> Type)

    ghc GHC.HsToCore.Monad

    No documentation available.

  8. class Functor f => Applicative (f :: Type -> Type)

    ghc GHC.Prelude.Basic

    No documentation available.

  9. class Functor f => Applicative (f :: Type -> Type)

    ghc GHC.Utils.Monad

    No documentation available.

  10. module Control.Applicative

    No documentation available.

Page 1 of many | Next