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. --- stdlib/source/program/aedifex/repository/identity.lux | 2 +- stdlib/source/program/aedifex/repository/local.lux | 12 ++++++------ stdlib/source/program/aedifex/repository/remote.lux | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source/program/aedifex/repository') diff --git a/stdlib/source/program/aedifex/repository/identity.lux b/stdlib/source/program/aedifex/repository/identity.lux index eaca93cdb..30814ecee 100644 --- a/stdlib/source/program/aedifex/repository/identity.lux +++ b/stdlib/source/program/aedifex/repository/identity.lux @@ -39,7 +39,7 @@ (def .public (basic_auth user password) (-> User Password Text) - (let [credentials (at utf8.codec encoded (format user ":" password))] + (let [credentials (of utf8.codec encoded (format user ":" password))] (|> (java/util/Base64::getEncoder) (java/util/Base64$Encoder::encodeToString credentials) ffi.of_string diff --git a/stdlib/source/program/aedifex/repository/local.lux b/stdlib/source/program/aedifex/repository/local.lux index dcc604306..4223ddf39 100644 --- a/stdlib/source/program/aedifex/repository/local.lux +++ b/stdlib/source/program/aedifex/repository/local.lux @@ -22,10 +22,10 @@ (def .public (root environment fs) (-> (Environment Async) (file.System Async) file.Path) - (let [/ (at fs separator)] + (let [/ (of fs separator)] (|> ///local.repository (text.replaced uri.separator /) - (format (at environment home) /)))) + (format (of environment home) /)))) (def (path /) (-> Text (-> URI file.Path)) @@ -33,7 +33,7 @@ (def (absolute_path environment fs) (-> (Environment Async) (file.System Async) (-> URI file.Path)) - (let [/ (at fs separator)] + (let [/ (of fs separator)] (|>> ///metadata.local_uri (..path /) (format (..root environment fs) /)))) @@ -46,12 +46,12 @@ (def download (|>> (..absolute_path environment fs) - (at fs read))) + (of fs read))) (def (upload uri content) (do [! async.monad] [.let [absolute_path (..absolute_path environment fs uri)] - ? (at fs file? absolute_path) + ? (of fs file? absolute_path) _ (is (Async (Try Any)) (if ? (in {try.#Success []}) @@ -61,4 +61,4 @@ _ (in {try.#Success []}))))] - (at fs write absolute_path content))))) + (of fs write absolute_path content))))) diff --git a/stdlib/source/program/aedifex/repository/remote.lux b/stdlib/source/program/aedifex/repository/remote.lux index 34488b544..9386c214f 100644 --- a/stdlib/source/program/aedifex/repository/remote.lux +++ b/stdlib/source/program/aedifex/repository/remote.lux @@ -69,12 +69,12 @@ http))] (when status http/status.ok - (at ! each product.right ((the @http.#body message) {.#None})) + (of ! each product.right ((the @http.#body message) {.#None})) _ (do ! [_ ((the @http.#body message) {.#Some 0})] - (at io.monad in (exception.except ..download_failure [(format address uri) status])))))) + (of io.monad in (exception.except ..download_failure [(format address uri) status])))))) (def (upload uri content) (do (try.with io.monad) @@ -95,5 +95,5 @@ (in []) _ - (at io.monad in (exception.except ..upload_failure [(format address uri) status]))))) + (of io.monad in (exception.except ..upload_failure [(format address uri) status]))))) )) -- cgit v1.2.3