module SupplyChain.Referral
(
Referral (Referral, product, next),
alter, alter',
)
where
import SupplyChain.Core.Effect (Effect)
import SupplyChain.Core.Job (Job, effect)
import SupplyChain.Core.Referral (Referral (Referral, product, next))
import qualified SupplyChain.Core.Referral as Referral
import Data.Function ((.))
alter :: (forall x. Effect up action x -> Job up' action' x)
-> Referral up down action product -> Referral up' down action' product
alter :: forall (up :: * -> *) (action :: * -> *) (up' :: * -> *)
(action' :: * -> *) (down :: * -> *) product.
(forall x. Effect up action x -> Job up' action' x)
-> Referral up down action product
-> Referral up' down action' product
alter = forall (up :: * -> *) (action :: * -> *) (up' :: * -> *)
(action' :: * -> *) (down :: * -> *) product.
(forall x. Effect up action x -> Job up' action' x)
-> Referral up down action product
-> Referral up' down action' product
Referral.alter
alter' :: (forall x. Effect up action x -> Effect up' action' x)
-> Referral up down action product -> Referral up' down action' product
alter' :: forall (up :: * -> *) (action :: * -> *) (up' :: * -> *)
(action' :: * -> *) (down :: * -> *) product.
(forall x. Effect up action x -> Effect up' action' x)
-> Referral up down action product
-> Referral up' down action' product
alter' forall x. Effect up action x -> Effect up' action' x
f = forall (up :: * -> *) (action :: * -> *) (up' :: * -> *)
(action' :: * -> *) (down :: * -> *) product.
(forall x. Effect up action x -> Job up' action' x)
-> Referral up down action product
-> Referral up' down action' product
Referral.alter (forall (up :: * -> *) (action :: * -> *) product.
Effect up action product -> Job up action product
effect forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall x. Effect up action x -> Effect up' action' x
f)