Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Covariant t => Applicative t where
- (<*>) :: t (a -> b) -> t a -> t b
- apply :: t (a -> b) -> t a -> t b
- (*>) :: t a -> t b -> t b
- (<*) :: t a -> t b -> t a
- forever :: t a -> t b
- (<%>) :: t a -> t (a -> b) -> t b
- (<**>) :: Applicative u => ((t :. u) := (a -> b)) -> ((t :. u) := a) -> (t :. u) := b
- (<***>) :: (Applicative u, Applicative v) => ((t :. (u :. v)) := (a -> b)) -> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := b
- (<****>) :: (Applicative u, Applicative v, Applicative w) => ((t :. (u :. (v :. w))) := (a -> b)) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b
- class Bivariant v => Applicative_ t v source target where
- multiply :: source (v a b) r -> target (v (t a) (t b)) (t r)
Documentation
class Covariant t => Applicative t where Source #
When providing a new instance, you should ensure it satisfies: * Interpreted: (.) <$> u <*> v <*> w ≡ u <*> (v <*> w) * Left interchange: x <*> (f <$> y) ≡ (. f) <$> x <*> y * Right interchange: f <$> (x <*> y) ≡ (f .) <$> x <*> y
(<*>) :: t (a -> b) -> t a -> t b infixl 4 Source #
Infix version of apply
apply :: t (a -> b) -> t a -> t b Source #
Prefix version of <*>
(*>) :: t a -> t b -> t b infixl 4 Source #
Sequence actions, discarding the value of the first argument
(<*) :: t a -> t b -> t a infixl 4 Source #
Sequence actions, discarding the value of the second argument
forever :: t a -> t b Source #
Repeat an action indefinitely
(<%>) :: t a -> t (a -> b) -> t b Source #
Flipped version of <*>
(<**>) :: Applicative u => ((t :. u) := (a -> b)) -> ((t :. u) := a) -> (t :. u) := b infixl 3 Source #
Infix versions of apply
with various nesting levels
(<***>) :: (Applicative u, Applicative v) => ((t :. (u :. v)) := (a -> b)) -> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := b infixl 2 Source #
(<****>) :: (Applicative u, Applicative v, Applicative w) => ((t :. (u :. (v :. w))) := (a -> b)) -> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := b infixl 1 Source #
Instances
class Bivariant v => Applicative_ t v source target where Source #
Instances
Applicative_ Maybe (:*:) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Applicative_ Maybe Conclusion ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Maybe multiply :: (Conclusion a b -> r) -> Conclusion (Maybe a) (Maybe b) -> Maybe r Source # | |
Semigroup e => Applicative_ (Validation e) (:*:) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Validation multiply :: ((a :*: b) -> r) -> (Validation e a :*: Validation e b) -> Validation e r Source # | |
Applicative_ (Conclusion e) Conclusion ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Conclusion multiply :: (Conclusion a b -> r) -> Conclusion (Conclusion e a) (Conclusion e b) -> Conclusion e r Source # | |
Applicative_ (Conclusion e) (:*:) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Conclusion multiply :: ((a :*: b) -> r) -> (Conclusion e a :*: Conclusion e b) -> Conclusion e r Source # | |
Applicative_ ((->) e :: Type -> Type) (:*:) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # | |