| Copyright | (c) Aaron Friel |
|---|---|
| License | BSD-3 |
| Maintainer | Aaron Friel <mayreply@aaronfriel.com> |
| Stability | unstable |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Control.Applicative.Graph
Description
- class (GFunctor f, GPointed f) => GApplicative f where
- type Apply f (i :: p) (j :: p) :: p
- type ApplyInv f (i :: p) (j :: p) :: Constraint
- type Then f (i :: p) (j :: p) :: p
- type ThenInv f (i :: p) (j :: p) :: Constraint
- type But f (i :: p) (j :: p) :: p
- type ButInv f (i :: p) (j :: p) :: Constraint
Documentation
class (GFunctor f, GPointed f) => GApplicative f where Source #
Graph indexed applicative functor.
Minimal complete definition
Associated Types
type Apply f (i :: p) (j :: p) :: p Source #
type ApplyInv f (i :: p) (j :: p) :: Constraint Source #
type Then f (i :: p) (j :: p) :: p Source #
type ThenInv f (i :: p) (j :: p) :: Constraint Source #
type But f (i :: p) (j :: p) :: p Source #
The but operation (<*) on the graph index.
Default instance: But f i j = Apply f (Apply f (Pure f) i) j
type ButInv f (i :: p) (j :: p) :: Constraint Source #
Methods
gap :: ApplyInv f i j => f i (a -> b) -> f j a -> f (Apply f i j) b Source #
Sequential application (<*>).
gthen :: ThenInv f i j => f i a -> f j b -> f (Then f i j) b Source #
Sequence actions, discarding the value of the first argument (*>).
Default implementation requires the default instance of Then.
gthen :: (Apply f (Fconst f i) j ~ Then f i j, ApplyInv f (Fconst f i) j, ThenInv f (Fconst f i) j) => f i a -> f j b -> f (Then f i j) b Source #
Sequence actions, discarding the value of the first argument (*>).
Default implementation requires the default instance of Then.
gbut :: ButInv f i j => f i a -> f j b -> f (But f i j) a Source #
Sequence actions, discarding values of the second argument (<*).
Default implementation requires the default instance of But.
gbut :: (Apply f (Apply f (Pure f) i) j ~ But f i j, ApplyInv f (Pure f) i, ApplyInv f (Apply f (Pure f) i) j, ButInv f (Apply f (Pure f) i) j) => f i a -> f j b -> f (But f i j) a Source #
Instances
| Applicative f => GApplicative * (GWrapped f) Source # | |
| IxApplicative * f => GApplicative (*, *) (WrappedIx f) Source # | |