morphisms-functors-0.1.7: Functors, theirs compositions and transformations

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Covariant.Applicative

Synopsis

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

Minimal complete definition

(<*>)

Methods

(<*>) :: 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

Instances
Applicative Identity Source # 
Instance details

Defined in Data.Functor.Identity

Methods

(<*>) :: Identity (a -> b) -> Identity a -> Identity b Source #

apply :: Identity (a -> b) -> Identity a -> Identity b Source #

(*>) :: Identity a -> Identity b -> Identity b Source #

(<*) :: Identity a -> Identity b -> Identity a Source #

forever :: Identity a -> Identity b Source #

Applicative (Straight a) Source # 
Instance details

Defined in Data.Functor.Arrow.Straight

Methods

(<*>) :: Straight a (a0 -> b) -> Straight a a0 -> Straight a b Source #

apply :: Straight a (a0 -> b) -> Straight a a0 -> Straight a b Source #

(*>) :: Straight a a0 -> Straight a b -> Straight a b Source #

(<*) :: Straight a a0 -> Straight a b -> Straight a a0 Source #

forever :: Straight a a0 -> Straight a b Source #

Applicative t => Applicative (Yoneda t) Source # 
Instance details

Defined in Data.Functor.Yoneda

Methods

(<*>) :: Yoneda t (a -> b) -> Yoneda t a -> Yoneda t b Source #

apply :: Yoneda t (a -> b) -> Yoneda t a -> Yoneda t b Source #

(*>) :: Yoneda t a -> Yoneda t b -> Yoneda t b Source #

(<*) :: Yoneda t a -> Yoneda t b -> Yoneda t a Source #

forever :: Yoneda t a -> Yoneda t b Source #

(Applicative t, Applicative u) => Applicative (T Co Co t u) Source # 
Instance details

Defined in Data.Functor.Composition.T

Methods

(<*>) :: T Co Co t u (a -> b) -> T Co Co t u a -> T Co Co t u b Source #

apply :: T Co Co t u (a -> b) -> T Co Co t u a -> T Co Co t u b Source #

(*>) :: T Co Co t u a -> T Co Co t u b -> T Co Co t u b Source #

(<*) :: T Co Co t u a -> T Co Co t u b -> T Co Co t u a Source #

forever :: T Co Co t u a -> T Co Co t u b Source #

(Applicative t, Applicative u, Applicative v) => Applicative (TT Co Co Co t u v) Source # 
Instance details

Defined in Data.Functor.Composition.TT

Methods

(<*>) :: TT Co Co Co t u v (a -> b) -> TT Co Co Co t u v a -> TT Co Co Co t u v b Source #

apply :: TT Co Co Co t u v (a -> b) -> TT Co Co Co t u v a -> TT Co Co Co t u v b Source #

(*>) :: TT Co Co Co t u v a -> TT Co Co Co t u v b -> TT Co Co Co t u v b Source #

(<*) :: TT Co Co Co t u v a -> TT Co Co Co t u v b -> TT Co Co Co t u v a Source #

forever :: TT Co Co Co t u v a -> TT Co Co Co t u v b Source #

(Applicative t, Applicative u, Applicative v, Applicative w) => Applicative (TTT Co Co Co Co t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(<*>) :: TTT Co Co Co Co t u v w (a -> b) -> TTT Co Co Co Co t u v w a -> TTT Co Co Co Co t u v w b Source #

apply :: TTT Co Co Co Co t u v w (a -> b) -> TTT Co Co Co Co t u v w a -> TTT Co Co Co Co t u v w b Source #

(*>) :: TTT Co Co Co Co t u v w a -> TTT Co Co Co Co t u v w b -> TTT Co Co Co Co t u v w b Source #

(<*) :: TTT Co Co Co Co t u v w a -> TTT Co Co Co Co t u v w b -> TTT Co Co Co Co t u v w a Source #

forever :: TTT Co Co Co Co t u v w a -> TTT Co Co Co Co t u v w b Source #