diff options
author | Eduardo Julian | 2020-10-31 02:59:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-10-31 02:59:48 -0400 |
commit | eea741e9b4a47ae09832311d6d61f0bd6024f673 (patch) | |
tree | 9d503f609c322c235811856ffa05232991b9c653 /stdlib/source/program/aedifex/dependency | |
parent | cb8f2b36352948108446c7e3b270faa97589bf7a (diff) |
Easy to use Rev constants.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/dependency/resolution.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 57df92d2a..46d32a4f7 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -56,21 +56,21 @@ (def: (download url) (-> URL (IO (Try Binary))) - (do {@ (try.with io.monad)} + (do {! (try.with io.monad)} [input (|> (java/net/URL::new url) java/net/URL::openStream - (:: @ map (|>> java/io/BufferedInputStream::new))) + (:: ! map (|>> java/io/BufferedInputStream::new))) #let [buffer (binary.create ..buffer-size)]] (loop [output (:: binary.monoid identity)] - (do @ + (do ! [bytes-read (java/io/BufferedInputStream::read buffer +0 (.int ..buffer-size) input)] (case bytes-read - -1 (do @ + -1 (do ! [_ (java/lang/AutoCloseable::close input)] (wrap output)) _ (if (n.= ..buffer-size bytes-read) (recur (:: binary.monoid compose output buffer)) - (do @ + (do ! [chunk (:: io.monad wrap (binary.slice 0 (.nat bytes-read) buffer))] (recur (:: binary.monoid compose output chunk))))))))) @@ -116,7 +116,7 @@ (def: #export (resolve repository dependency) (-> Repository Dependency (IO (Try Package))) (let [[artifact type] dependency - prefix (format repository uri.separator (///artifact.path artifact))] + prefix (format repository uri.separator (///artifact.uri artifact))] (do (try.with io.monad) [library (..download (format prefix (///artifact/extension.extension type))) sha1 (..verified-hash dependency library (format prefix ///artifact/extension.sha1) ///hash.sha1 ///hash.sha1-codec ..sha1-does-not-match) |