supply-chain-core-0.0.0.0: Composable request-response pipelines
Safe HaskellSafe-Inferred
LanguageGHC2021

SupplyChain.Core.JobAndVendor

Description

 
Synopsis

Types

newtype Job up action product Source #

Monadic context that supports making requests, performing actions, and returning a single result

Constructors

FreeMonad (FreeMonad (Effect up action) product) 

Bundled Patterns

pattern Effect :: Effect up action x -> (x -> product) -> Job up action product 
pattern Request :: up x -> (x -> product) -> Job up action product 
pattern Perform :: action x -> (x -> product) -> Job up action product 
pattern Bind :: Job up action x -> (x -> Job up action a) -> Job up action a 
pattern Pure :: product -> Job up action product 

Instances

Instances details
Applicative (Job up action) Source # 
Instance details

Defined in SupplyChain.Core.Job

Methods

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) Source # 
Instance details

Defined in SupplyChain.Core.Job

Methods

fmap :: (a -> b) -> Job up action a -> Job up action b #

(<$) :: a -> Job up action b -> Job up action a #

Monad (Job up action) Source # 
Instance details

Defined in SupplyChain.Core.Job

Methods

(>>=) :: Job up action a -> (a -> Job up action b) -> Job up action b #

(>>) :: Job up action a -> Job up action b -> Job up action b #

return :: a -> Job up action a #

newtype Vendor up down action Source #

Makes requests, responds to requests, and performs actions

Constructors

Vendor 

Fields

  • handle :: forall product. down product -> Job up action (Referral up down action product)
     

Alteration

alterJob :: (forall x. Effect up action x -> Job up' action' x) -> Job up action product -> Job up' action' product Source #

alterVendor :: (forall x. Effect up action x -> Job up' action' x) -> Vendor up down action -> Vendor up' down action' Source #

Conversion

loop :: Job up action product -> Vendor up (Unit product) action Source #

once :: Vendor up (Unit product) action -> Job up action product Source #