From 94e5802f594a73245fce0fbd885103b8bf210d57 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 2 Dec 2022 19:33:00 -0400 Subject: Added some simple time-series handling machinery. --- .../program/aedifex/dependency/deployment.lux | 12 +++++----- .../program/aedifex/dependency/resolution.lux | 28 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'stdlib/source/program/aedifex/dependency') diff --git a/stdlib/source/program/aedifex/dependency/deployment.lux b/stdlib/source/program/aedifex/dependency/deployment.lux index 998298ae3..e98625e8d 100644 --- a/stdlib/source/program/aedifex/dependency/deployment.lux +++ b/stdlib/source/program/aedifex/dependency/deployment.lux @@ -48,11 +48,11 @@ deploy_hash (is (All (_ h) (-> (Codec Text (Hash h)) Extension (Hash h) (Async (Try Any)))) (function (_ codec extension hash) (|> hash - (at codec encoded) - (at utf8.codec encoded) - (at repository upload (format artifact extension)))))] + (of codec encoded) + (of utf8.codec encoded) + (of repository upload (format artifact extension)))))] (do [! (try.with async.monad)] - [_ (at repository upload artifact data)] + [_ (of repository upload artifact data)] (when status {///dependency/status.#Unverified} (in []) @@ -132,7 +132,7 @@ status])) snapshot (///metadata/snapshot.read repository artifact) - snapshot (at ! in (..update_snapshot [artifact type] now snapshot)) + snapshot (of ! in (..update_snapshot [artifact type] now snapshot)) _ (///metadata/snapshot.write repository artifact snapshot) project (///metadata/artifact.read repository artifact) _ (|> project @@ -147,4 +147,4 @@ (|> (dictionary.entries resolution) (monad.each ! (function (_ [dependency package]) (..one repository dependency package))) - (at ! each (set.of_list ///artifact.hash))))) + (of ! each (set.of_list ///artifact.hash))))) diff --git a/stdlib/source/program/aedifex/dependency/resolution.lux b/stdlib/source/program/aedifex/dependency/resolution.lux index 84879b93d..62a85a974 100644 --- a/stdlib/source/program/aedifex/dependency/resolution.lux +++ b/stdlib/source/program/aedifex/dependency/resolution.lux @@ -82,19 +82,19 @@ (Exception [Artifact Extension Text]) (Async (Try (Maybe (Hash h)))))) (do async.monad - [?actual (at repository download (///repository/remote.uri version_template artifact extension))] + [?actual (of repository download (///repository/remote.uri version_template artifact extension))] (when ?actual {try.#Success actual} (in (do [! try.monad] - [output (at ! each (|>> ffi.as_string java/lang/String::trim ffi.of_string) - (at utf8.codec decoded actual)) + [output (of ! each (|>> ffi.as_string java/lang/String::trim ffi.of_string) + (of utf8.codec decoded actual)) actual (|> output (text.all_split_by " ") list.head (maybe.else output) - (at codec decoded)) + (of codec decoded)) _ (exception.assertion exception [artifact extension output] - (at ///hash.equivalence = (hash library) actual))] + (of ///hash.equivalence = (hash library) actual))] (in {.#Some actual}))) {try.#Failure error} @@ -103,7 +103,7 @@ (def (hashed repository version_template artifact extension) (-> (Repository Async) Version Artifact Extension (Async (Try [Binary Status]))) (do (try.with async.monad) - [data (at repository download (///repository/remote.uri version_template artifact extension)) + [data (of repository download (///repository/remote.uri version_template artifact extension)) ?sha1 (..verified_hash data repository version_template artifact (format extension ///artifact/extension.sha1) ///hash.sha1 ///hash.sha1_codec ..sha1_does_not_match) @@ -135,10 +135,10 @@ artifact (has ///artifact.#version artifact_version artifact)] [pom_data pom_status] (..hashed repository version_template artifact ///artifact/extension.pom) library_&_status (..hashed repository version_template artifact extension)] - (at async.monad in + (of async.monad in (do try.monad - [pom (at utf8.codec decoded pom_data) - pom (at xml.codec decoded pom) + [pom (of utf8.codec decoded pom_data) + pom (of xml.codec decoded pom) profile (.result ///pom.parser (list pom))] (in [///package.#origin {///repository/origin.#Remote ""} ///package.#library library_&_status @@ -164,11 +164,11 @@ (with_template [ ] [(def ( console repository artifact) (-> (Console Async) (Repository Async) Artifact (Async (Try Any))) - (at console write (format "[" "]" + (of console write (format "[" "]" " " " " (///artifact.format artifact) " " - " " (%.text (at repository description)) + " " (%.text (of repository description)) text.new_line)))] ["?" announce_fetching "Fetching" "from"] @@ -182,7 +182,7 @@ {.#End} (|> dependency (exception.except ..cannot_resolve) - (at async.monad in)) + (of async.monad in)) {.#Item repository alternatives} (do [! async.monad] @@ -211,7 +211,7 @@ resolution resolution]) (when dependencies {.#End} - (at async.monad in + (of async.monad in [successes failures resolution]) {.#Item head tail} @@ -234,7 +234,7 @@ {try.#Success package} (do ! [.let [redundant? (is (Predicate Dependency) - (predicate.or (at //.equivalence = head) + (predicate.or (of //.equivalence = head) (dictionary.key? resolution))) sub_dependencies (|> package ///package.dependencies -- cgit v1.2.3