Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class Covariant t => Applicative t where
Documentation
class Covariant t => Applicative t where Source #
When providing a new instance, you should ensure it satisfies the three laws: * Composition: (.) <$> 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