aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/repository
diff options
context:
space:
mode:
authorEduardo Julian2022-03-16 08:37:23 -0400
committerEduardo Julian2022-03-16 08:37:23 -0400
commitbf53ee92fc3c33a4885aa227e55d24f7ba3cb2c4 (patch)
tree49683a62ae8e110c62b42a9a6386bb2ddb3c47c6 /stdlib/source/program/aedifex/repository
parentd710d9f4fc098e7c243c8a5f23cd42683f13e07f (diff)
De-sigil-ification: prefix :
Diffstat (limited to '')
-rw-r--r--stdlib/source/program/aedifex/repository.lux54
-rw-r--r--stdlib/source/program/aedifex/repository/remote.lux32
2 files changed, 43 insertions, 43 deletions
diff --git a/stdlib/source/program/aedifex/repository.lux b/stdlib/source/program/aedifex/repository.lux
index b373db4f8..b44be720f 100644
--- a/stdlib/source/program/aedifex/repository.lux
+++ b/stdlib/source/program/aedifex/repository.lux
@@ -1,28 +1,28 @@
(.using
- [library
- [lux "*"
- [abstract
- [monad {"+" do}]]
- [control
- [io {"+" IO}]
- ["[0]" try {"+" Try}]
- [concurrency
- ["[0]" async {"+" Async}]
- ["[0]" stm]]]
- [data
- [binary {"+" Binary}]]
- [world
- [net
- [uri {"+" URI}]]]]])
+ [library
+ [lux "*"
+ [abstract
+ [monad {"+" do}]]
+ [control
+ [io {"+" IO}]
+ ["[0]" try {"+" Try}]
+ [concurrency
+ ["[0]" async {"+" Async}]
+ ["[0]" stm]]]
+ [data
+ [binary {"+" Binary}]]
+ [world
+ [net
+ [uri {"+" URI}]]]]])
(type: .public (Repository !)
(Interface
- (: Text
- description)
- (: (-> URI (! (Try Binary)))
- download)
- (: (-> URI Binary (! (Try Any)))
- upload)))
+ (is Text
+ description)
+ (is (-> URI (! (Try Binary)))
+ download)
+ (is (-> URI Binary (! (Try Any)))
+ upload)))
(def: .public (async repository)
(-> (Repository IO) (Repository Async))
@@ -38,12 +38,12 @@
(type: .public (Mock s)
(Interface
- (: Text
- the_description)
- (: (-> URI s (Try [s Binary]))
- on_download)
- (: (-> URI Binary s (Try s))
- on_upload)))
+ (is Text
+ the_description)
+ (is (-> URI s (Try [s Binary]))
+ on_download)
+ (is (-> URI Binary s (Try s))
+ on_upload)))
(def: .public (mock mock init)
(All (_ s) (-> (Mock s) s (Repository Async)))
diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux
index efe3263a4..782b872f1 100644
--- a/stdlib/source/program/aedifex/repository/remote.lux
+++ b/stdlib/source/program/aedifex/repository/remote.lux
@@ -61,11 +61,11 @@
address)
(def: (download uri)
(do [! (try.with io.monad)]
- [[status message] (: (IO (Try (@http.Response IO)))
- (http.get (format address uri)
- (http.headers ..base_headers)
- {.#None}
- http))]
+ [[status message] (is (IO (Try (@http.Response IO)))
+ (http.get (format address uri)
+ (http.headers ..base_headers)
+ {.#None}
+ http))]
(case status
(pattern (static http/status.ok))
(# ! each product.right ((the @http.#body message) {.#None}))
@@ -77,17 +77,17 @@
(def: (upload uri content)
(do (try.with io.monad)
- [[status message] (: (IO (Try (@http.Response IO)))
- (http.put (format address uri)
- (http.headers (case identity
- {.#None}
- ..base_headers
-
- {.#Some [user password]}
- (list& ["Authorization" (//identity.basic_auth user password)]
- ..base_headers)))
- {.#Some content}
- http))
+ [[status message] (is (IO (Try (@http.Response IO)))
+ (http.put (format address uri)
+ (http.headers (case identity
+ {.#None}
+ ..base_headers
+
+ {.#Some [user password]}
+ (list& ["Authorization" (//identity.basic_auth user password)]
+ ..base_headers)))
+ {.#Some content}
+ http))
_ ((the @http.#body message) {.#Some 0})]
(case status
(pattern (static http/status.created))