diff options
author | Eduardo Julian | 2022-04-07 03:27:59 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-04-07 03:27:59 -0400 |
commit | 9224e54bf175ebe13c3fae42f04b649413c737e7 (patch) | |
tree | dab2b19f79e79020792ee0bfe0fb6abe522639a3 /stdlib/source/program/aedifex/repository | |
parent | 7542b0addd9eaf01dd5f1c4c8a39b67f51a4bd06 (diff) |
De-sigil-ification: &
Diffstat (limited to 'stdlib/source/program/aedifex/repository')
-rw-r--r-- | stdlib/source/program/aedifex/repository/local.lux | 60 | ||||
-rw-r--r-- | stdlib/source/program/aedifex/repository/remote.lux | 4 |
2 files changed, 32 insertions, 32 deletions
diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index b76833c34..ada14650b 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -1,24 +1,24 @@ (.using - [library - [lux "*" - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - [concurrency - ["[0]" async {"+" Async}]]] - [data - ["[0]" text - ["%" format {"+" format}]]] - [world - [program {"+" Program}] - ["[0]" file] - [net - ["[0]" uri {"+" URI}]]]]] - ["[0]" // - ["/[1]" // "_" - ["[1][0]" local] - ["[1][0]" metadata]]]) + [library + [lux "*" + [abstract + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + [concurrency + ["[0]" async {"+" Async}]]] + [data + ["[0]" text + ["%" format {"+" format}]]] + [world + [program {"+" Program}] + ["[0]" file] + [net + ["[0]" uri {"+" URI}]]]]] + ["[0]" // + ["/[1]" // "_" + ["[1][0]" local] + ["[1][0]" metadata]]]) (def: (root program /) (-> (Program Async) Text file.Path) @@ -50,13 +50,13 @@ (do [! async.monad] [.let [absolute_path (..absolute_path program (# fs separator) uri)] ? (# fs file? absolute_path) - _ (if ? - (in []) - (case (file.parent fs absolute_path) - {.#Some parent} - (file.make_directories async.monad fs parent) - - _ - (let [! (try.with async.monad)] - (# ! in []))))] - (# fs write content absolute_path)))) + _ (is (Async (Try Any)) + (if ? + (in {try.#Success []}) + (case (file.parent fs absolute_path) + {.#Some parent} + (file.make_directories async.monad fs parent) + + _ + (in {try.#Success []}))))] + (# fs write absolute_path content)))) diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 782b872f1..313be177b 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -84,8 +84,8 @@ ..base_headers {.#Some [user password]} - (list& ["Authorization" (//identity.basic_auth user password)] - ..base_headers))) + (partial_list ["Authorization" (//identity.basic_auth user password)] + ..base_headers))) {.#Some content} http)) _ ((the @http.#body message) {.#Some 0})] |