From dda05bca0956af5e5b3875c4cc36e61aa04772e4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 12 Sep 2021 00:07:08 -0400 Subject: Made the "#" character great again! --- .../source/test/aedifex/dependency/deployment.lux | 20 +-- .../source/test/aedifex/dependency/resolution.lux | 168 ++++++++++----------- stdlib/source/test/aedifex/dependency/status.lux | 2 +- 3 files changed, 95 insertions(+), 95 deletions(-) (limited to 'stdlib/source/test/aedifex/dependency') diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index 7e137443b..625c7c9f5 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -55,7 +55,7 @@ [#@http.headers (http.headers (list)) #@http.body (function (_ _) (|> [0 (binary.empty 0)] - #try.Success + {try.#Success} io.io))]]) (type: Cache @@ -68,31 +68,31 @@ (do io.monad [_ (: (IO Any) (case [method input] - [#@http.Put {#.Some input}] + [{#@http.Put} {.#Some input}] (atom.update! (dictionary.has url input) cache) _ (in [])))] - (in {#try.Success ..good_upload}))))) + (in {try.#Success ..good_upload}))))) (def: (verify_one expected_deployments address package cache expected_artifact actual_artifact) (-> Nat URL Package (Dictionary URL Binary) Artifact Artifact Bit) (let [url (: (-> URI URL) (|>> (format address))) - library_url (url (format (artifact.uri (value@ #artifact.version expected_artifact) + library_url (url (format (artifact.uri (value@ artifact.#version expected_artifact) expected_artifact) artifact/extension.lux_library)) - pom_url (url (format (artifact.uri (value@ #artifact.version expected_artifact) + pom_url (url (format (artifact.uri (value@ artifact.#version expected_artifact) expected_artifact) artifact/extension.pom)) artifact_metadata_url (url (metadata.remote_artifact_uri expected_artifact)) project_metadata_url (url (metadata.remote_project_uri expected_artifact)) expected_library (|> package - (value@ #package.library) + (value@ package.#library) product.left) expected_pom (|> package - (value@ #package.pom) + (value@ package.#pom) product.right product.left) @@ -136,7 +136,7 @@ (do random.monad [[profile package] $///package.random .let [artifact (|> profile - (value@ #profile.identity) + (value@ profile.#identity) maybe.trusted) dependency (: Dependency [artifact @@ -155,7 +155,7 @@ .let [cache (: Cache (atom.atom (dictionary.empty text.hash))) http (..http cache) - repository (repository.async (remote.repository http #.None address))]] + repository (repository.async (remote.repository http {.#None} address))]] (in (do async.monad [?outcome (/.one repository dependency package) cache (async.future (atom.read! cache))] @@ -178,7 +178,7 @@ cache (: Cache (atom.atom (dictionary.empty text.hash))) http (..http cache) - repository (repository.async (remote.repository http #.None address))]] + repository (repository.async (remote.repository http {.#None} address))]] (in (do async.monad [?outcome (/.all repository resolution) cache (async.future (atom.read! cache))] diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 69867d5f8..b8b50f23d 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -53,8 +53,8 @@ (do [! random.monad] [artifact $///artifact.random [_ package] $///package.random] - (in (dictionary.has [#///dependency.artifact artifact - #///dependency.type ///artifact/type.lux_library] + (in (dictionary.has [///dependency.#artifact artifact + ///dependency.#type ///artifact/type.lux_library] package /.empty)))) @@ -92,13 +92,13 @@ (def: the_description "[0]") (def: (on_download uri state) - {#try.Failure "NOPE"}) + {try.#Failure "NOPE"}) (def: (on_upload uri binary state) - {#try.Failure "NOPE"}))) + {try.#Failure "NOPE"}))) (def: .public (single artifact package) (-> Artifact Package (Mock Any)) - (let [expected (///artifact.uri (value@ #///artifact.version artifact) artifact)] + (let [expected (///artifact.uri (value@ ///artifact.#version artifact) artifact)] (implementation (def: the_description "[1]") @@ -106,37 +106,37 @@ (if (text.contains? expected uri) (let [library (: Binary (|> package - (value@ #///package.library) + (value@ ///package.#library) product.left)) pom (: Binary (|> package - (value@ #///package.pom) + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded)))] (cond (text.ends_with? ///artifact/extension.lux_library uri) - {#try.Success [state library]} + {try.#Success [state library]} (text.ends_with? ..lux_sha-1 uri) - {#try.Success [state (..sha-1 library)]} + {try.#Success [state (..sha-1 library)]} (text.ends_with? ..lux_md5 uri) - {#try.Success [state (..md5 library)]} + {try.#Success [state (..md5 library)]} (text.ends_with? ///artifact/extension.pom uri) - {#try.Success [state pom]} + {try.#Success [state pom]} (text.ends_with? ..pom_sha-1 uri) - {#try.Success [state (..sha-1 pom)]} + {try.#Success [state (..sha-1 pom)]} (text.ends_with? ..pom_md5 uri) - {#try.Success [state (..md5 pom)]} + {try.#Success [state (..md5 pom)]} ... else - {#try.Failure "NOPE"})) - {#try.Failure "NOPE"})) + {try.#Failure "NOPE"})) + {try.#Failure "NOPE"})) (def: (on_upload uri binary state) - {#try.Failure "NOPE"})))) + {try.#Failure "NOPE"})))) (def: (bad_sha-1 expected_artifact expected_package dummy_package) (-> Artifact Package Package (Mock Any)) @@ -144,52 +144,52 @@ (def: the_description "[~SHA-1]") (def: (on_download uri state) - (if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri) + (if (text.contains? (///artifact.uri (value@ ///artifact.#version expected_artifact) expected_artifact) uri) (cond (text.ends_with? ///artifact/extension.lux_library uri) - {#try.Success [state (|> expected_package - (value@ #///package.library) + {try.#Success [state (|> expected_package + (value@ ///package.#library) product.left)]} (text.ends_with? ..lux_sha-1 uri) - {#try.Success [state (|> expected_package - (value@ #///package.library) + {try.#Success [state (|> expected_package + (value@ ///package.#library) product.left ..sha-1)]} (text.ends_with? ..lux_md5 uri) - {#try.Success [state (|> expected_package - (value@ #///package.library) + {try.#Success [state (|> expected_package + (value@ ///package.#library) product.left ..md5)]} (text.ends_with? ///artifact/extension.pom uri) - {#try.Success [state (|> expected_package - (value@ #///package.pom) + {try.#Success [state (|> expected_package + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded))]} (text.ends_with? ..pom_sha-1 uri) - {#try.Success [state (|> dummy_package - (value@ #///package.pom) + {try.#Success [state (|> dummy_package + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded) ..sha-1)]} (text.ends_with? ..pom_md5 uri) - {#try.Success [state (|> expected_package - (value@ #///package.pom) + {try.#Success [state (|> expected_package + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded) ..md5)]} ... else - {#try.Failure "NOPE"}) - {#try.Failure "NOPE"})) + {try.#Failure "NOPE"}) + {try.#Failure "NOPE"})) (def: (on_upload uri binary state) - {#try.Failure "NOPE"}))) + {try.#Failure "NOPE"}))) (def: (bad_md5 expected_artifact expected_package dummy_package) (-> Artifact Package Package (Mock Any)) @@ -197,52 +197,52 @@ (def: the_description "[~MD5]") (def: (on_download uri state) - (if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri) + (if (text.contains? (///artifact.uri (value@ ///artifact.#version expected_artifact) expected_artifact) uri) (cond (text.ends_with? ///artifact/extension.lux_library uri) - {#try.Success [state (|> expected_package - (value@ #///package.library) + {try.#Success [state (|> expected_package + (value@ ///package.#library) product.left)]} (text.ends_with? ..lux_sha-1 uri) - {#try.Success [state (|> expected_package - (value@ #///package.library) + {try.#Success [state (|> expected_package + (value@ ///package.#library) product.left ..sha-1)]} (text.ends_with? ..lux_md5 uri) - {#try.Success [state (|> dummy_package - (value@ #///package.library) + {try.#Success [state (|> dummy_package + (value@ ///package.#library) product.left ..md5)]} (text.ends_with? ///artifact/extension.pom uri) - {#try.Success [state (|> expected_package - (value@ #///package.pom) + {try.#Success [state (|> expected_package + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded))]} (text.ends_with? ..pom_sha-1 uri) - {#try.Success [state (|> expected_package - (value@ #///package.pom) + {try.#Success [state (|> expected_package + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded) ..sha-1)]} (text.ends_with? ..pom_md5 uri) - {#try.Success [state (|> dummy_package - (value@ #///package.pom) + {try.#Success [state (|> dummy_package + (value@ ///package.#pom) product.left (\ xml.codec encoded) (\ utf8.codec encoded) ..md5)]} ... else - {#try.Failure "NOPE"}) - {#try.Failure "NOPE"})) + {try.#Failure "NOPE"}) + {try.#Failure "NOPE"})) (def: (on_upload uri binary state) - {#try.Failure "NOPE"}))) + {try.#Failure "NOPE"}))) (def: one Test @@ -250,7 +250,7 @@ [expected_artifact $///artifact.random [_ expected_package] $///package.random [_ dummy_package] (random.only (|>> product.right - (with@ #///package.pom (value@ #///package.pom expected_package)) + (with@ ///package.#pom (value@ ///package.#pom expected_package)) (\ ///package.equivalence = expected_package) not) $///package.random) @@ -260,28 +260,28 @@ (`` ($_ _.and (in (do async.monad [actual_package (/.one (///repository.mock good []) - [#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library])] + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] (_.cover' [/.one] (case actual_package - {#try.Success actual_package} + {try.#Success actual_package} (\ ///package.equivalence = - (with@ #///package.origin {#///repository/origin.Remote ""} expected_package) + (with@ ///package.#origin {///repository/origin.#Remote ""} expected_package) actual_package) - {#try.Failure _} + {try.#Failure _} false)))) (~~ (template [ ] [(in (do async.monad [actual_package (/.one (///repository.mock []) - [#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library])] + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] (_.cover' [] (case actual_package - {#try.Failure error} + {try.#Failure error} (exception.match? error) - {#try.Success _} + {try.#Success _} false))))] [/.sha-1_does_not_match bad_sha-1] @@ -295,7 +295,7 @@ [expected_artifact $///artifact.random [_ expected_package] $///package.random [_ dummy_package] (random.only (|>> product.right - (with@ #///package.pom (value@ #///package.pom expected_package)) + (with@ ///package.#pom (value@ ///package.#pom expected_package)) (\ ///package.equivalence = expected_package) not) $///package.random) @@ -309,30 +309,30 @@ (list (///repository.mock bad_sha-1 []) (///repository.mock bad_md5 []) (///repository.mock good [])) - [#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library])] + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] (_.cover' [/.any] (case actual_package - {#try.Success actual_package} + {try.#Success actual_package} (\ ///package.equivalence = - (with@ #///package.origin {#///repository/origin.Remote ""} expected_package) + (with@ ///package.#origin {///repository/origin.#Remote ""} expected_package) actual_package) - {#try.Failure _} + {try.#Failure _} false)))) (in (do async.monad [.let [console ($///version.echo "")] actual_package (/.any console (list (///repository.mock bad_sha-1 []) (///repository.mock bad_md5 [])) - [#///dependency.artifact expected_artifact - #///dependency.type ///artifact/type.lux_library])] + [///dependency.#artifact expected_artifact + ///dependency.#type ///artifact/type.lux_library])] (_.cover' [/.cannot_resolve] (case actual_package - {#try.Failure error} + {try.#Failure error} (exception.match? /.cannot_resolve error) - {#try.Success _} + {try.#Success _} false)))) ))) @@ -358,41 +358,41 @@ [_ depender_package] $///package.random [_ ignored_package] $///package.random - .let [dependee [#///dependency.artifact dependee_artifact - #///dependency.type ///artifact/type.lux_library] - depender [#///dependency.artifact depender_artifact - #///dependency.type ///artifact/type.lux_library] - ignored [#///dependency.artifact ignored_artifact - #///dependency.type ///artifact/type.lux_library] + .let [dependee [///dependency.#artifact dependee_artifact + ///dependency.#type ///artifact/type.lux_library] + depender [///dependency.#artifact depender_artifact + ///dependency.#type ///artifact/type.lux_library] + ignored [///dependency.#artifact ignored_artifact + ///dependency.#type ///artifact/type.lux_library] dependee_pom (|> (\ ///.monoid identity) - (with@ #///.identity {#.Some dependee_artifact}) + (with@ ///.#identity {.#Some dependee_artifact}) ///pom.write try.trusted) depender_pom (|> (\ ///.monoid identity) - (with@ #///.identity {#.Some depender_artifact}) - (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee))) + (with@ ///.#identity {.#Some depender_artifact}) + (with@ ///.#dependencies (set.of_list ///dependency.hash (list dependee))) ///pom.write try.trusted) ignored_pom (|> (\ ///.monoid identity) - (with@ #///.identity {#.Some ignored_artifact}) + (with@ ///.#identity {.#Some ignored_artifact}) ///pom.write try.trusted) - dependee_package (with@ #///package.pom + dependee_package (with@ ///package.#pom [dependee_pom (|> dependee_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified] + {///dependency/status.#Unverified}] dependee_package) - depender_package (with@ #///package.pom + depender_package (with@ ///package.#pom [depender_pom (|> depender_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified] + {///dependency/status.#Unverified}] depender_package) - ignored_package (with@ #///package.pom + ignored_package (with@ ///package.#pom [ignored_pom (|> ignored_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified] + {///dependency/status.#Unverified}] ignored_package)]] (in [[dependee depender ignored] [dependee_package depender_package ignored_package]]))) diff --git a/stdlib/source/test/aedifex/dependency/status.lux b/stdlib/source/test/aedifex/dependency/status.lux index 79e59460f..ea39e0cf5 100644 --- a/stdlib/source/test/aedifex/dependency/status.lux +++ b/stdlib/source/test/aedifex/dependency/status.lux @@ -40,7 +40,7 @@ [payload (binaryT.random 1)] (_.cover [/.verified] (case (/.verified payload) - {#/.Verified sha1 md5} + {/.#Verified sha1 md5} true _ -- cgit v1.2.3