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

SupplyChain.Core.VendorAndReferral

Description

 
Synopsis

Types

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)
     

data Referral up down action product Source #

The conclusion of a vendor's handling of a client request

Constructors

Referral 

Fields

  • product :: product

    The requested product

  • next :: Vendor up down action

    A new vendor to handle subsequent requests

Instances

Instances details
Foldable (Referral up down action) Source # 
Instance details

Defined in SupplyChain.Core.VendorAndReferral

Methods

fold :: Monoid m => Referral up down action m -> m #

foldMap :: Monoid m => (a -> m) -> Referral up down action a -> m #

foldMap' :: Monoid m => (a -> m) -> Referral up down action a -> m #

foldr :: (a -> b -> b) -> b -> Referral up down action a -> b #

foldr' :: (a -> b -> b) -> b -> Referral up down action a -> b #

foldl :: (b -> a -> b) -> b -> Referral up down action a -> b #

foldl' :: (b -> a -> b) -> b -> Referral up down action a -> b #

foldr1 :: (a -> a -> a) -> Referral up down action a -> a #

foldl1 :: (a -> a -> a) -> Referral up down action a -> a #

toList :: Referral up down action a -> [a] #

null :: Referral up down action a -> Bool #

length :: Referral up down action a -> Int #

elem :: Eq a => a -> Referral up down action a -> Bool #

maximum :: Ord a => Referral up down action a -> a #

minimum :: Ord a => Referral up down action a -> a #

sum :: Num a => Referral up down action a -> a #

product :: Num a => Referral up down action a -> a #

Traversable (Referral up down action) Source # 
Instance details

Defined in SupplyChain.Core.VendorAndReferral

Methods

traverse :: Applicative f => (a -> f b) -> Referral up down action a -> f (Referral up down action b) #

sequenceA :: Applicative f => Referral up down action (f a) -> f (Referral up down action a) #

mapM :: Monad m => (a -> m b) -> Referral up down action a -> m (Referral up down action b) #

sequence :: Monad m => Referral up down action (m a) -> m (Referral up down action a) #

Functor (Referral up down action) Source # 
Instance details

Defined in SupplyChain.Core.VendorAndReferral

Methods

fmap :: (a -> b) -> Referral up down action a -> Referral up down action b #

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

Alteration

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

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