Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
A job makes requests, performs actions, and returns
Synopsis
- data Job (up :: Type -> Type) (action :: Type -> Type) product
- perform :: action product -> Job up action product
- order :: up product -> Job up action product
- effect :: Effect up action product -> Job up action product
- run :: Monad action => Job (Const Void) action product -> action product
- eval :: Job (Const Void) (Const Void) product -> product
- alter :: (forall x. Effect up action x -> Job up' action' x) -> Job up action product -> Job up' action' product
- alter' :: (forall x. Effect up action x -> Effect up' action' x) -> Job up action product -> Job up' action' product
Type
data Job (up :: Type -> Type) (action :: Type -> Type) product #
Monadic context that supports making requests, performing actions, and returning a single result
Instances
Applicative (Job up action) | |
Defined in SupplyChain.Core.Job pure :: a -> Job up action a # (<*>) :: Job up action (a -> b) -> Job up action a -> Job up action b # liftA2 :: (a -> b -> c) -> Job up action a -> Job up action b -> Job up action c # (*>) :: Job up action a -> Job up action b -> Job up action b # (<*) :: Job up action a -> Job up action b -> Job up action a # | |
Functor (Job up action) | |
Monad (Job up action) | |
Construction
Running
Run a job in its action context
The job must not make requests, so its upstream interface
is Const Void
.
Evaluate a job with no context
The job must evokes neither request nor actions, so both
its upstream and action contexts are Const Void
.