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

SupplyChain.Core.Vendor

Description

 
Synopsis

Type

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)
     

Running

run Source #

Arguments

:: Monad action 
=> Vendor (Const Void) down action 
-> down product

Request

-> action (Referral (Const Void) down action product) 

An action in which a vendor handles a single request

The action returns a Referral, which contains two things:

  • The response to the request
  • A new version of the vendor

eval Source #

Arguments

:: Vendor (Const Void) down (Const Void) 
-> down product

Request

-> Referral (Const Void) down (Const Void) product 

Alteration

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