aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/repository
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/program/aedifex/repository')
-rw-r--r--stdlib/source/program/aedifex/repository/local.lux60
-rw-r--r--stdlib/source/program/aedifex/repository/remote.lux4
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})]