diff options
Diffstat (limited to 'stdlib/source/program/aedifex/repository.lux')
-rw-r--r-- | stdlib/source/program/aedifex/repository.lux | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux index c5f822633..d966c7f82 100644 --- a/stdlib/source/program/aedifex/repository.lux +++ b/stdlib/source/program/aedifex/repository.lux @@ -30,21 +30,21 @@ (promise.future (\ repository upload uri content))) )) -(interface: #export (Simulation s) +(interface: #export (Mock s) (: (-> URI s (Try [s Binary])) on_download) (: (-> URI Binary s (Try s)) on_upload)) -(def: #export (mock simulation init) - (All [s] (-> (Simulation s) s (Repository Promise))) +(def: #export (mock mock init) + (All [s] (-> (Mock s) s (Repository Promise))) (let [state (stm.var init)] (implementation (def: (download uri) (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (\ simulation on_download uri |state|) + (case (\ mock on_download uri |state|) (#try.Success [|state| output]) (do ! [_ (stm.write |state| state)] @@ -57,7 +57,7 @@ (stm.commit (do {! stm.monad} [|state| (stm.read state)] - (case (\ simulation on_upload uri content |state|) + (case (\ mock on_upload uri content |state|) (#try.Success |state|) (do ! [_ (stm.write |state| state)] |