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! --- .../aedifex/artifact/snapshot/version/value.lux | 12 +- stdlib/source/test/aedifex/artifact/time/date.lux | 4 +- stdlib/source/test/aedifex/artifact/time/time.lux | 4 +- stdlib/source/test/aedifex/cache.lux | 18 +-- stdlib/source/test/aedifex/cli.lux | 28 ++-- stdlib/source/test/aedifex/command/auto.lux | 16 +- stdlib/source/test/aedifex/command/build.lux | 78 +++++----- stdlib/source/test/aedifex/command/clean.lux | 2 +- stdlib/source/test/aedifex/command/deploy.lux | 14 +- stdlib/source/test/aedifex/command/deps.lux | 28 ++-- stdlib/source/test/aedifex/command/install.lux | 12 +- stdlib/source/test/aedifex/command/pom.lux | 10 +- stdlib/source/test/aedifex/command/test.lux | 16 +- stdlib/source/test/aedifex/command/version.lux | 4 +- .../source/test/aedifex/dependency/deployment.lux | 20 +-- .../source/test/aedifex/dependency/resolution.lux | 168 ++++++++++----------- stdlib/source/test/aedifex/dependency/status.lux | 2 +- stdlib/source/test/aedifex/hash.lux | 12 +- stdlib/source/test/aedifex/input.lux | 6 +- stdlib/source/test/aedifex/local.lux | 2 +- stdlib/source/test/aedifex/metadata/artifact.lux | 24 +-- stdlib/source/test/aedifex/metadata/snapshot.lux | 20 +-- stdlib/source/test/aedifex/package.lux | 32 ++-- stdlib/source/test/aedifex/parser.lux | 8 +- stdlib/source/test/aedifex/pom.lux | 18 +-- stdlib/source/test/aedifex/profile.lux | 4 +- stdlib/source/test/aedifex/project.lux | 16 +- stdlib/source/test/aedifex/repository.lux | 8 +- stdlib/source/test/aedifex/repository/local.lux | 4 +- stdlib/source/test/aedifex/repository/remote.lux | 26 ++-- stdlib/source/test/aedifex/runtime.lux | 8 +- 31 files changed, 313 insertions(+), 311 deletions(-) (limited to 'stdlib/source/test/aedifex') diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux index 8daf8635c..a6532c250 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux @@ -47,18 +47,18 @@ (do random.monad [sample random stamp $///stamp.random] - (let [version (value@ #/.version sample) + (let [version (value@ /.#version sample) local! (text\= version - (/.format (with@ #/.snapshot #///.Local sample))) + (/.format (with@ /.#snapshot {///.#Local} sample))) - remote_format (/.format [#/.version (format version /.snapshot) - #/.snapshot {#///.Remote stamp}]) + remote_format (/.format [/.#version (format version /.snapshot) + /.#snapshot {///.#Remote stamp}]) remote! - (and (text.starts_with? (format version (///time.format (value@ #///stamp.time stamp))) + (and (text.starts_with? (format version (///time.format (value@ ///stamp.#time stamp))) remote_format) - (text.ends_with? (%.nat (value@ #///stamp.build stamp)) + (text.ends_with? (%.nat (value@ ///stamp.#build stamp)) remote_format))] (_.cover [/.snapshot /.format] (and local! diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux index 77c312380..b32787d49 100644 --- a/stdlib/source/test/aedifex/artifact/time/date.lux +++ b/stdlib/source/test/aedifex/artifact/time/date.lux @@ -59,10 +59,10 @@ (try.else false))) (_.cover [/.year_is_out_of_range] (case (/.date candidate) - {#try.Success date} + {try.#Success date} (same? candidate (/.value date)) - {#try.Failure error} + {try.#Failure error} (exception.match? /.year_is_out_of_range error))) (_.cover [/.epoch] (date\= date.epoch (/.value /.epoch))) diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux index 6351eca60..c908eb69b 100644 --- a/stdlib/source/test/aedifex/artifact/time/time.lux +++ b/stdlib/source/test/aedifex/artifact/time/time.lux @@ -19,7 +19,9 @@ (def: .public random (Random /.Time) - (random.one (|>> time.clock (with@ #time.milli_second 0) time.time) + (random.one (|>> time.clock + (with@ time.#milli_second 0) + time.time) random.time)) (def: .public test diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux index 338feb5fa..84b8aaa02 100644 --- a/stdlib/source/test/aedifex/cache.lux +++ b/stdlib/source/test/aedifex/cache.lux @@ -57,7 +57,7 @@ (try.maybe (do try.monad [pom (//pom.write profile) - identity (try.of_maybe (value@ #//.identity profile))] + identity (try.of_maybe (value@ //.#identity profile))] (in [identity profile pom])))) @profile.random)) @@ -73,9 +73,9 @@ [[identity profile pom] ..profile type ..type content ..content] - (in [[#//dependency.artifact identity - #//dependency.type type] - (with@ #//package.origin {#//repository/origin.Remote ""} (//package.local pom content))]))) + (in [[//dependency.#artifact identity + //dependency.#type type] + (with@ //package.#origin {//repository/origin.#Remote ""} (//package.local pom content))]))) (def: resolution (Random Resolution) @@ -88,14 +88,14 @@ (do ! [pom (random.one (function (_ [identity profile pom]) (|> profile - (with@ #//.dependencies (set.empty //dependency.hash)) - (with@ #//.identity {#.Some (value@ #//dependency.artifact dependency)}) + (with@ //.#dependencies (set.empty //dependency.hash)) + (with@ //.#identity {.#Some (value@ //dependency.#artifact dependency)}) //pom.write try.maybe)) ..profile) content ..content] (in [dependency - (with@ #//package.origin {#//repository/origin.Remote ""} (//package.local pom content))])))))] + (with@ //package.#origin {//repository/origin.#Remote ""} (//package.local pom content))])))))] (in (dictionary.of_list //dependency.hash (list& [main_dependency main_package] dependencies))))) (def: singular @@ -116,7 +116,7 @@ [_ wrote! actual_package read!] (in (\ //package.equivalence = - (with@ #//package.origin {#//repository/origin.Local ""} expected_package) + (with@ //package.#origin {//repository/origin.#Local ""} expected_package) actual_package))))))))) (def: plural @@ -138,7 +138,7 @@ actual read!] (in (\ //dependency/resolution.equivalence = (\ dictionary.functor each - (with@ #//package.origin {#//repository/origin.Local ""}) + (with@ //package.#origin {//repository/origin.#Local ""}) expected) actual))))))))) diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux index e41f3e44c..d08d5f1a1 100644 --- a/stdlib/source/test/aedifex/cli.lux +++ b/stdlib/source/test/aedifex/cli.lux @@ -53,20 +53,20 @@ (def: (compilation_format value) (-> /.Compilation (List Text)) (case value - #/.Build (list "build") - #/.Test (list "test"))) + {/.#Build} (list "build") + {/.#Test} (list "test"))) (def: (format value) (-> /.Command (List Text)) (case value - #/.Version (list "version") - #/.Clean (list "clean") - #/.POM (list "pom") - #/.Dependencies (list "deps") - #/.Install (list "install") - {#/.Deploy repository [user password]} (list "deploy" repository user password) - {#/.Compilation compilation} (..compilation_format compilation) - {#/.Auto compilation} (list& "auto" (..compilation_format compilation)))) + {/.#Version} (list "version") + {/.#Clean} (list "clean") + {/.#POM} (list "pom") + {/.#Dependencies} (list "deps") + {/.#Install} (list "install") + {/.#Deploy repository [user password]} (list "deploy" repository user password) + {/.#Compilation compilation} (..compilation_format compilation) + {/.#Auto compilation} (list& "auto" (..compilation_format compilation)))) (def: without_profile Test @@ -76,11 +76,11 @@ (|> expected ..format (cli.result /.command) - (case> {#try.Success [names actual]} + (case> {try.#Success [names actual]} (and (\ (list.equivalence text.equivalence) = (list //.default) names) (\ /.equivalence = expected actual)) - {#try.Failure error} + {try.#Failure error} false))))) (def: with_profile @@ -93,11 +93,11 @@ ..format (list& "with" expected_profile) (cli.result /.command) - (case> {#try.Success [actual_profile actual_command]} + (case> {try.#Success [actual_profile actual_command]} (and (\ (list.equivalence text.equivalence) = (list expected_profile //.default) actual_profile) (\ /.equivalence = expected_command actual_command)) - {#try.Failure error} + {try.#Failure error} false))))) (def: .public test diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 57aca92d2..307946212 100644 --- a/stdlib/source/test/aedifex/command/auto.lux +++ b/stdlib/source/test/aedifex/command/auto.lux @@ -55,7 +55,7 @@ (do [! async.monad] [[_ actual_runs] (async.future (atom.update! ++ @runs))] (if (n.= expected_runs actual_runs) - (in {#try.Failure end_signal}) + (in {try.#Failure end_signal}) (do (try.with !) [_ (\ fs write (\ utf8.codec encoded (%.nat actual_runs)) dummy_file) _ (\ fs modify @@ -77,14 +77,14 @@ .let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ #///.target target)) + (with@ ///.#target target)) with_program (: (-> Profile Profile) - (with@ #///.program {#.Some program})) + (with@ ///.#program {.#Some program})) profile (|> empty_profile with_program with_target - (with@ #///.sources (set.of_list text.hash (list source))))] + (with@ ///.#sources (set.of_list text.hash (list source))))] home (random.ascii/alpha 5) working_directory (random.ascii/alpha 5) @@ -103,23 +103,23 @@ _ (\ watcher poll [])] (do [! async.monad] [no_dangling_process! (|> profile - (with@ #///.compiler compiler) + (with@ ///.#compiler compiler) ((/.do! 1 watcher command) ($version.echo "") (program.async (program.mock environment.empty home working_directory)) fs (shell.async ($build.good_shell [])) resolution) - (\ ! each (|>> (case> {#try.Failure error} + (\ ! each (|>> (case> {try.#Failure error} (same? end_signal error) - {#try.Success _} + {try.#Success _} false)))) correct_number_of_runs! (|> @runs atom.read! async.future (\ ! each (n.= expected_runs)))] - (in {#try.Success (and correct_number_of_runs! + (in {try.#Success (and correct_number_of_runs! no_dangling_process!)})))] (_.cover' [/.do!] (try.else false verdict)))) diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index 1376d440a..ee69f1010 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -41,85 +41,85 @@ (-> Any (Shell IO)) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - {#try.Success + {try.#Success (: (shell.Mock []) (implementation (def: (on_read state) (exception.except shell.no_more_output [])) - (def: (on_error state) + (def: (on_fail state) (exception.except shell.no_more_output [])) (def: (on_write input state) - {#try.Failure "on_write"}) + {try.#Failure "on_write"}) (def: (on_destroy state) - {#try.Failure "on_destroy"}) + {try.#Failure "on_destroy"}) (def: (on_await state) - {#try.Success [state shell.normal]})))}))) + {try.#Success [state shell.normal]})))}))) (def: .public bad_shell (-> Any (Shell IO)) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - {#try.Success + {try.#Success (: (shell.Mock []) (implementation (def: (on_read state) (exception.except shell.no_more_output [])) - (def: (on_error state) + (def: (on_fail state) (exception.except shell.no_more_output [])) (def: (on_write input state) - {#try.Failure "on_write"}) + {try.#Failure "on_write"}) (def: (on_destroy state) - {#try.Failure "on_destroy"}) + {try.#Failure "on_destroy"}) (def: (on_await state) - {#try.Success [state shell.error]})))}))) + {try.#Success [state shell.error]})))}))) (def: .public (reader_shell error?) (-> Bit (-> (List Text) (Shell IO))) (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - {#try.Success + {try.#Success (: (shell.Mock (List Text)) (implementation (def: (on_read state) (if error? (exception.except shell.no_more_output []) (case state - {#.Item head tail} - {#try.Success [tail head]} + {.#Item head tail} + {try.#Success [tail head]} - #.End + {.#End} (exception.except shell.no_more_output [])))) (def: (on_error state) (if error? (case state - {#.Item head tail} - {#try.Success [tail head]} + {.#Item head tail} + {try.#Success [tail head]} - #.End + {.#End} (exception.except shell.no_more_output [])) (exception.except shell.no_more_output []))) (def: (on_write input state) - {#try.Failure "on_write"}) + {try.#Failure "on_write"}) (def: (on_destroy state) - {#try.Failure "on_destroy"}) + {try.#Failure "on_destroy"}) (def: (on_await state) - {#try.Success [state shell.error]})))}))) + {try.#Success [state shell.error]})))}))) (def: compiler (Random Dependency) (do random.monad [lux_version (random.ascii/alpha 5) - .let [js_compiler [#///dependency.artifact [#///artifact.group /.lux_group - #///artifact.name /.js_compiler_name - #///artifact.version lux_version] - #///dependency.type ///artifact/type.js_library]]] + .let [js_compiler [///dependency.#artifact [///artifact.#group /.lux_group + ///artifact.#name /.js_compiler_name + ///artifact.#version lux_version] + ///dependency.#type ///artifact/type.js_library]]] (`` ($_ random.either (in js_compiler) (~~ (template [] - [(in [#///dependency.artifact [#///artifact.group /.lux_group - #///artifact.name - #///artifact.version lux_version] - #///dependency.type ///artifact/type.lux_library])] + [(in [///dependency.#artifact [///artifact.#group /.lux_group + ///artifact.#name + ///artifact.#version lux_version] + ///dependency.#type ///artifact/type.lux_library])] [/.jvm_compiler_name] [/.python_compiler_name] @@ -151,9 +151,9 @@ .let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ #///.target target)) + (with@ ///.#target target)) with_program (: (-> Profile Profile) - (with@ #///.program {#.Some program})) + (with@ ///.#program {.#Some program})) profile (|> empty_profile with_program @@ -164,19 +164,19 @@ (with_target empty_profile))] (_.cover' [/.no_specified_program] (case outcome - {#try.Success _} + {try.#Success _} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.no_specified_program error))))) (in (do async.monad [outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty profile)] (_.cover' [/.Compiler /.no_available_compiler] (case outcome - {#try.Success _} + {try.#Success _} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.no_available_compiler error))))) (do ! [.let [console (@version.echo "")] @@ -185,7 +185,7 @@ [verdict (do ///action.monad [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs shell resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) start (\ console read_line []) end (\ console read_line [])] (in (and (text\= /.start start) @@ -207,7 +207,7 @@ [verdict (do ///action.monad [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async (..bad_shell [])) resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) start (\ console read_line []) end (\ console read_line [])] (in (and (text\= /.start start) @@ -232,12 +232,12 @@ actual/1 (\ console read_line []) actual/2 (\ console read_line []) end! (|> (\ console read_line []) - (\ ! each (|>> (case> {#try.Failure error} + (\ ! each (|>> (case> {try.#Failure error} true - {#try.Success _} + {try.#Success _} false) - #try.Success)))] + {try.#Success})))] (in (and (text\= expected/0 actual/0) (text\= expected/1 actual/1) (text\= expected/2 actual/2) diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index 83c3e5a80..7d3e57392 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -103,7 +103,7 @@ context_exists!/pre (..directory_exists? fs context) target_exists!/pre (..assets_exist? fs target_path direct_files) sub_exists!/pre (..assets_exist? fs sub_path sub_files) - _ (/.do! console fs (with@ #///.target target_path dummy)) + _ (/.do! console fs (with@ ///.#target target_path dummy)) context_exists!/post (..directory_exists? fs context) target_exists!/post (..assets_exist? fs target_path direct_files) sub_exists!/post (..assets_exist? fs sub_path sub_files) diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux index 219a2931b..0b0f8558b 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -55,7 +55,7 @@ (Async (Try Text))) (do ///action.monad [.let [console ($version.echo "")] - _ ($install.make_sources! fs (value@ #///.sources profile)) + _ ($install.make_sources! fs (value@ ///.#sources profile)) _ (/.do! console repository fs artifact profile)] (\ console read_line []))) @@ -66,7 +66,7 @@ [[artifact expected_pom profile] (random.one (function (_ profile) (do maybe.monad - [artifact (value@ #///.identity profile) + [artifact (value@ ///.#identity profile) expected_pom (try.maybe (///pom.write profile))] (in [artifact expected_pom profile]))) $profile.random) @@ -81,19 +81,19 @@ [verdict (do [! ///action.monad] [logging (..execute! program repository fs artifact profile) expected_library (|> profile - (value@ #///.sources) + (value@ ///.#sources) set.list (export.library fs) (\ ! each (format.result tar.writer))) - actual_pom (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.pom)) - actual_library (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.lux_library)) - actual_sha-1 (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1))) + actual_pom (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact ///artifact/extension.pom)) + actual_library (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact ///artifact/extension.lux_library)) + actual_sha-1 (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1))) actual_sha-1 (\ async.monad in (do try.monad [actual_sha-1 (\ utf8.codec decoded actual_sha-1)] (\ ///hash.sha-1_codec decoded actual_sha-1))) - actual_md5 (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5))) + actual_md5 (\ repository download (///repository/remote.uri (value@ ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5))) actual_md5 (\ async.monad in (do try.monad [actual_md5 (\ utf8.codec decoded actual_md5)] diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux index 8cf0ea05c..037a8e119 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -67,31 +67,31 @@ [_ dependee_package] $///package.random [_ depender_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] + .let [dependee [///dependency.#artifact dependee_artifact + ///dependency.#type ///artifact/type.lux_library] + depender [///dependency.#artifact depender_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) dependee_package (|> dependee_package - (with@ #///package.origin {#///repository/origin.Remote ""}) - (with@ #///package.pom [dependee_pom + (with@ ///package.#origin {///repository/origin.#Remote ""}) + (with@ ///package.#pom [dependee_pom (|> dependee_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified])) + {///dependency/status.#Unverified}])) depender_package (|> depender_package - (with@ #///package.origin {#///repository/origin.Remote ""}) - (with@ #///package.pom [depender_pom + (with@ ///package.#origin {///repository/origin.#Remote ""}) + (with@ ///package.#pom [depender_pom (|> depender_pom (\ xml.codec encoded) (\ utf8.codec encoded)) - #///dependency/status.Unverified])) + {///dependency/status.#Unverified}])) fs (file.mock (\ file.default separator)) program (program.async (program.mock environment.empty home working_directory))]] @@ -103,7 +103,7 @@ (dictionary.has dependee dependee_package) (///dependency/deployment.all local)) post (|> (\ ///.monoid identity) - (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee depender))) + (with@ ///.#dependencies (set.of_list ///dependency.hash (list dependee depender))) (/.do! console local (list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package) [])) diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux index ac1a87be1..0461029fc 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -56,7 +56,7 @@ (-> (Program Async) (file.System Async) ///.Profile (Async (Try Text))) (do ///action.monad [.let [console ($version.echo "")] - _ (..make_sources! fs (value@ #///.sources sample)) + _ (..make_sources! fs (value@ ///.#sources sample)) _ (/.do! console fs (///repository/local.repository program fs) sample)] (\ console read_line []))) @@ -65,7 +65,7 @@ (<| (_.covering /._) (do [! random.monad] [identity $artifact.random - sample (\ ! each (with@ #///.identity {#.Some identity}) + sample (\ ! each (with@ ///.#identity {.#Some identity}) $profile.random) home (random.ascii/alpha 5) working_directory (random.ascii/alpha 5) @@ -75,7 +75,7 @@ [.let [fs (file.mock /) program (program.async (program.mock environment.empty home working_directory)) - artifact_path (///local.uri (value@ #///artifact.version identity) identity) + artifact_path (///local.uri (value@ ///artifact.#version identity) identity) library_path (format artifact_path ///artifact/extension.lux_library) pom_path (format artifact_path ///artifact/extension.pom)] verdict (do [! ///action.monad] @@ -84,11 +84,11 @@ library_exists! (|> library_path (format home /) (\ fs file?) - (\ async.monad each (|>> #try.Success))) + (\ async.monad each (|>> {try.#Success}))) pom_exists! (|> pom_path (format home /) (\ fs file?) - (\ async.monad each (|>> #try.Success)))] + (\ async.monad each (|>> {try.#Success})))] (in (and succeeded! library_exists! pom_exists!)))] @@ -97,7 +97,7 @@ (in (do [! async.monad] [.let [fs (file.mock /) program (program.async (program.mock environment.empty home working_directory))] - logging (..execute! program fs (with@ #///.identity #.None sample))] + logging (..execute! program fs (with@ ///.#identity {.#None} sample))] (_.cover' [/.failure] (|> logging (try\each (text\= /.failure)) diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux index ac080c966..76cdf8b02 100644 --- a/stdlib/source/test/aedifex/command/pom.lux +++ b/stdlib/source/test/aedifex/command/pom.lux @@ -40,7 +40,7 @@ [.let [console (@version.echo "")] outcome (/.do! console fs sample)] (case outcome - {#try.Success _} + {try.#Success _} (do ! [verdict (do ///action.monad [expected (|> (///pom.write sample) @@ -60,11 +60,11 @@ (_.cover' [/.do! /.success] (try.else false verdict))) - {#try.Failure error} + {try.#Failure error} (_.cover' [/.do!] - (case (value@ #///.identity sample) - {#.Some _} + (case (value@ ///.#identity sample) + {.#Some _} false - #.None + {.#None} true)))))))) diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux index 19ae5cd70..cee27dd27 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -50,9 +50,9 @@ .let [empty_profile (: Profile (\ ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ #///.target target)) + (with@ ///.#target target)) with_test (: (-> Profile Profile) - (with@ #///.test {#.Some test})) + (with@ ///.#test {.#Some test})) profile (|> empty_profile with_test @@ -65,7 +65,7 @@ [verdict (do ///action.monad [_ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async (@build.good_shell [])) resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) build_start (\ console read_line []) build_end (\ console read_line []) test_start (\ console read_line []) @@ -83,7 +83,7 @@ [verdict (do ///action.monad [.let [bad_shell (shell.mock (function (_ [actual_environment actual_working_directory actual_command actual_arguments]) - {#try.Success + {try.#Success (: (shell.Mock []) (implementation (def: (on_read state) @@ -91,17 +91,17 @@ (def: (on_error state) (exception.except shell.no_more_output [])) (def: (on_write input state) - {#try.Failure "on_write"}) + {try.#Failure "on_write"}) (def: (on_destroy state) - {#try.Failure "on_destroy"}) + {try.#Failure "on_destroy"}) (def: (on_await state) - {#try.Success [state (if (list.any? (text\= "build") actual_arguments) + {try.#Success [state (if (list.any? (text\= "build") actual_arguments) shell.normal shell.error)]})))}) [])] _ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async bad_shell) resolution - (with@ #///.compiler compiler profile)) + (with@ ///.#compiler compiler profile)) build_start (\ console read_line []) build_end (\ console read_line []) test_start (\ console read_line []) diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux index 6cd59b3a5..583e21fcd 100644 --- a/stdlib/source/test/aedifex/command/version.lux +++ b/stdlib/source/test/aedifex/command/version.lux @@ -50,11 +50,11 @@ (exception.except ..console_is_closed! []))) (def: (on_write input [open? state]) (if open? - {#try.Success [open? (format state input)]} + {try.#Success [open? (format state input)]} (exception.except ..console_is_closed! []))) (def: (on_close [open? buffer]) (if open? - {#try.Success [false buffer]} + {try.#Success [false buffer]} (exception.except ..console_is_closed! [])))) (def: .public echo 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 _ diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux index 049023718..eb3886755 100644 --- a/stdlib/source/test/aedifex/hash.lux +++ b/stdlib/source/test/aedifex/hash.lux @@ -50,18 +50,18 @@ [expected (..random )] (_.cover [ ] (and (case ( (/.data expected)) - {#try.Success actual} + {try.#Success actual} (\ /.equivalence = expected actual) - {#try.Failure error} + {try.#Failure error} false) (case ( (\ binary.monoid composite (/.data expected) (/.data expected))) - {#try.Success actual} + {try.#Success actual} false - {#try.Failure error} + {try.#Failure error} (exception.match? error)))))] [/.sha-1 /.as_sha-1 /.not_a_sha-1] @@ -83,10 +83,10 @@ (case (\ decoded (format (\ encoded expected) "AABBCC")) - {#try.Success actual} + {try.#Success actual} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.not_a_hash error))))] [/.sha-1_codec /.sha-1] diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux index cf7f59840..cec84de94 100644 --- a/stdlib/source/test/aedifex/input.lux +++ b/stdlib/source/test/aedifex/input.lux @@ -45,7 +45,7 @@ Test (<| (_.covering /._) (do [! random.monad] - [expected (\ ! each (with@ #//.parents (list)) $profile.random) + [expected (\ ! each (with@ //.#parents (list)) $profile.random) .let [fs (: (file.System Async) (file.mock (\ file.default separator)))]] (in (do async.monad @@ -60,8 +60,8 @@ (/.read async.monad fs (list //.default)))] (in (\ //.equivalence = (|> expected - (revised@ #//.sources ..with_default_source) - (revised@ #//.repositories ..with_default_repository)) + (revised@ //.#sources ..with_default_source) + (revised@ //.#repositories ..with_default_repository)) actual)))] (_.cover' [/.read] (try.else false verdict))))))) diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux index bd49df4c8..a2a943921 100644 --- a/stdlib/source/test/aedifex/local.lux +++ b/stdlib/source/test/aedifex/local.lux @@ -23,5 +23,5 @@ ($_ _.and (_.cover [/.repository /.uri] (text.starts_with? /.repository - (/.uri (value@ #//artifact.version sample) sample))) + (/.uri (value@ //artifact.#version sample) sample))) )))) diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index a1d3133c5..5708eb39b 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -60,10 +60,10 @@ month (month.by_number month) date (date.date year month day_of_month) time (time.time - [#time.hour hour - #time.minute minute - #time.second second - #time.milli_second 0])] + [time.#hour hour + time.#minute minute + time.#second second + time.#milli_second 0])] (in (instant.of_date_time date time)))))))) (def: .public test @@ -72,10 +72,10 @@ (_.for [/.Metadata]) (do random.monad [expected ..random - .let [artifact [#///artifact.group (value@ #/.group expected) - #///artifact.name (value@ #/.name expected) - #///artifact.version (|> expected - (value@ #/.versions) + .let [artifact [///artifact.#group (value@ /.#group expected) + ///artifact.#name (value@ /.#name expected) + ///artifact.#version (|> expected + (value@ /.#versions) list.head (maybe.else ""))]]] ($_ _.and @@ -105,12 +105,12 @@ actual (/.read repository artifact)] (_.cover' [/.write /.read] (and (case wrote? - {#try.Success _} true - {#try.Failure _} false) + {try.#Success _} true + {try.#Failure _} false) (case actual - {#try.Success actual} + {try.#Success actual} (\ /.equivalence = expected actual) - {#try.Failure _} + {try.#Failure _} false)))))) )))) diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index 52f7a1562..069cefcd2 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -64,16 +64,16 @@ month (month.by_number month) date (date.date year month day_of_month) time (time.time - [#time.hour hour - #time.minute minute - #time.second second - #time.milli_second 0])] + [time.#hour hour + time.#minute minute + time.#second second + time.#milli_second 0])] (in (instant.of_date_time date time))))))) (def: random_versioning (Random Versioning) ($_ random.and - (random\in #///snapshot.Local) + (random\in {///snapshot.#Local}) $///artifact/time.random (random.list 5 $///artifact/snapshot/version.random) )) @@ -91,7 +91,7 @@ (_.for [/.Metadata]) (do random.monad [expected ..random - .let [artifact (value@ #/.artifact expected)]] + .let [artifact (value@ /.#artifact expected)]] ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) @@ -117,12 +117,12 @@ actual (/.read repository artifact)] (_.cover' [/.write /.read] (and (case wrote? - {#try.Success _} true - {#try.Failure _} false) + {try.#Success _} true + {try.#Failure _} false) (case actual - {#try.Success actual} + {try.#Success actual} (\ /.equivalence = expected actual) - {#try.Failure _} + {try.#Failure _} false)))))) )))) diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index 69d31ddcc..8f8285c49 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -64,25 +64,25 @@ ($equivalence.spec /.equivalence (\ ! each product.right ..random))) (_.cover [/.local?] - (/.local? (with@ #/.origin {#//origin.Local "~/yolo"} package))) + (/.local? (with@ /.#origin {//origin.#Local "~/yolo"} package))) (_.cover [/.remote?] - (/.remote? (with@ #/.origin {#//origin.Remote "https://example.com"} package))) + (/.remote? (with@ /.#origin {//origin.#Remote "https://example.com"} package))) (_.cover [/.local] - (let [expected_pom (|> package (value@ #/.pom) product.left) - expected_library (|> package (value@ #/.library) product.left) + (let [expected_pom (|> package (value@ /.#pom) product.left) + expected_library (|> package (value@ /.#library) product.left) local (/.local expected_pom expected_library) - [actual_pom binary_pom pom_status] (value@ #/.pom local) - [actual_library library_status] (value@ #/.library local)] - (and (case (value@ #/.origin local) - {#//origin.Local ""} true + [actual_pom binary_pom pom_status] (value@ /.#pom local) + [actual_library library_status] (value@ /.#library local)] + (and (case (value@ /.#origin local) + {//origin.#Local ""} true _ false) (let [expected_sha1 (//hash.sha-1 expected_library) expected_md5 (//hash.md5 expected_library)] (and (same? expected_library actual_library) (case library_status - {#//status.Verified actual_sha1 expected_md5} + {//status.#Verified actual_sha1 expected_md5} (and (//hash\= expected_sha1 actual_sha1) (//hash\= expected_md5 expected_md5)) @@ -97,26 +97,26 @@ (in (\ xml.equivalence = actual_pom decoded_pom))) (try.else false)) (case pom_status - {#//status.Verified actual_sha1 expected_md5} + {//status.#Verified actual_sha1 expected_md5} (and (//hash\= expected_sha1 actual_sha1) (//hash\= expected_md5 expected_md5)) _ false)))))) (_.cover [/.dependencies] - (let [expected (value@ #//.dependencies profile)] + (let [expected (value@ //.#dependencies profile)] (case (/.dependencies package) - {#try.Success actual} + {try.#Success actual} (\ set.equivalence = expected actual) - {#try.Failure error} + {try.#Failure error} false))) (_.cover [/.repositories] - (let [expected (value@ #//.repositories profile)] + (let [expected (value@ //.#repositories profile)] (case (/.repositories package) - {#try.Success actual} + {try.#Success actual} (\ set.equivalence = expected actual) - {#try.Failure error} + {try.#Failure error} false))) )))) diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux index 3dc073f0d..fea31184f 100644 --- a/stdlib/source/test/aedifex/parser.lux +++ b/stdlib/source/test/aedifex/parser.lux @@ -55,7 +55,7 @@ (def: with_default_sources (-> //.Profile //.Profile) - (revised@ #//.sources + (revised@ //.#sources (: (-> (Set //.Source) (Set //.Source)) (function (_ sources) (if (set.empty? sources) @@ -64,7 +64,7 @@ (def: with_default_repository (-> //.Profile //.Profile) - (revised@ #//.repositories (set.has //.default_repository))) + (revised@ //.#repositories (set.has //.default_repository))) (def: (with_empty_profile project) (-> Project Project) @@ -84,7 +84,7 @@ //format.project list (.result /.project) - (case> {#try.Success actual} + (case> {try.#Success actual} (|> expected ..with_empty_profile dictionary.entries @@ -95,5 +95,5 @@ (dictionary.of_list text.hash) (\ //project.equivalence = actual)) - {#try.Failure error} + {try.#Failure error} false)))))) diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux index 4913df25d..dff414e66 100644 --- a/stdlib/source/test/aedifex/pom.lux +++ b/stdlib/source/test/aedifex/pom.lux @@ -34,22 +34,22 @@ [expected @profile.random] (_.cover [/.write /.parser] (case [(/.write expected) - (value@ #//.identity expected)] - [{#try.Success pom} - {#.Some _}] + (value@ //.#identity expected)] + [{try.#Success pom} + {.#Some _}] (case (.result /.parser (list pom)) - {#try.Success actual} + {try.#Success actual} (\ //.equivalence = (|> (\ //.monoid identity) - (with@ #//.dependencies (value@ #//.dependencies expected)) - (with@ #//.repositories (value@ #//.repositories expected))) + (with@ //.#dependencies (value@ //.#dependencies expected)) + (with@ //.#repositories (value@ //.#repositories expected))) actual) - {#try.Failure error} + {try.#Failure error} false) - [{#try.Failure error} - #.None] + [{try.#Failure error} + {.#None}] (exception.match? //.no_identity error) _ diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index 7a0bcb279..cd5491c33 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -154,10 +154,10 @@ (text\= "" /.default)) (_.cover [/.default_compiler] (|> (\ /.monoid identity) - (value@ #/.compiler) + (value@ /.#compiler) (same? /.default_compiler))) (_.cover [/.default_target] (|> (\ /.monoid identity) - (value@ #/.target) + (value@ /.#target) (same? /.default_target))) ))))) diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux index 767f8cdb3..aa3d726c3 100644 --- a/stdlib/source/test/aedifex/project.lux +++ b/stdlib/source/test/aedifex/project.lux @@ -27,7 +27,7 @@ (def: profile (Random [//.Name //.Profile]) (|> @profile.random - (random\each (with@ #//.parents (list))) + (random\each (with@ //.#parents (list))) (random.and (random.ascii/alpha 1)))) (def: .public random @@ -66,11 +66,11 @@ .let [project ($_ (\ /.monoid composite) (/.project super_name super_profile) (/.project dummy_name dummy_profile) - (/.project sub_name (with@ #//.parents (list super_name) sub_profile))) + (/.project sub_name (with@ //.#parents (list super_name) sub_profile))) circular ($_ (\ /.monoid composite) - (/.project super_name (with@ #//.parents (list sub_name) super_profile)) + (/.project super_name (with@ //.#parents (list sub_name) super_profile)) (/.project dummy_name dummy_profile) - (/.project sub_name (with@ #//.parents (list super_name) sub_profile)))]] + (/.project sub_name (with@ //.#parents (list super_name) sub_profile)))]] ($_ _.and (_.cover [/.profile] (and (|> (/.profile project super_name) @@ -84,17 +84,17 @@ (try.else false)))) (_.cover [/.unknown_profile] (case (/.profile project fake_name) - {#try.Success _} + {try.#Success _} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.unknown_profile error))) (_.cover [/.circular_dependency] (case (/.profile circular sub_name) - {#try.Success _} + {try.#Success _} false - {#try.Failure error} + {try.#Failure error} (exception.match? /.circular_dependency error))) )) )))) diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux index e65503ee9..9cc73f6c8 100644 --- a/stdlib/source/test/aedifex/repository.lux +++ b/stdlib/source/test/aedifex/repository.lux @@ -72,17 +72,17 @@ "@") (def: (on_download uri state) (case (dictionary.value uri state) - {#.Some content} + {.#Some content} (case (binary.size content) 0 (exception.except ..not_found [uri]) - _ {#try.Success [state content]}) + _ {try.#Success [state content]}) - #.None + {.#None} (exception.except ..not_found [uri]))) (def: (on_upload uri content state) (if (dictionary.key? state uri) (exception.except ..cannot_upload [uri]) - {#try.Success (dictionary.has uri content state)}))) + {try.#Success (dictionary.has uri content state)}))) (def: .public test Test diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux index b6d647bb9..5d3c94565 100644 --- a/stdlib/source/test/aedifex/repository/local.lux +++ b/stdlib/source/test/aedifex/repository/local.lux @@ -44,8 +44,8 @@ actual (\ repo download uri)] (_.cover' [/.repository] (and (case before_upload - {#try.Success _} false - {#try.Failure _} true) + {try.#Success _} false + {try.#Failure _} true) (|> actual (try\each (binary\= expected)) (try.else false)))))) diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux index 443ab884e..9cea986a8 100644 --- a/stdlib/source/test/aedifex/repository/remote.lux +++ b/stdlib/source/test/aedifex/repository/remote.lux @@ -35,7 +35,7 @@ (-> URL (@http.Body IO)) (let [url (\ utf8.codec encoded url)] (function (_ _) - (io.io {#try.Success [(binary.size url) url]})))) + (io.io {try.#Success [(binary.size url) url]})))) (def: (good_http user password) (-> //identity.User //identity.Password (http.Client IO)) @@ -45,18 +45,18 @@ [#@http.headers (http.headers (list)) #@http.body (..url_body "")]]] (<| io.io - #try.Success + {try.#Success} (if (|> headers (dictionary.value "User-Agent") (maybe\each (same? /.user_agent)) (maybe.else false)) (case [method input] - [#@http.Get #.None] + [#@http.Get {.#None}] [http/status.ok [#@http.headers (http.headers (list)) #@http.body (..url_body url)]] - [#@http.Put {#.Some input}] + [#@http.Put {.#Some input}] (if (|> headers (dictionary.value "Authorization") (maybe\each (text\= (//identity.basic_auth user password))) @@ -75,7 +75,7 @@ (implementation (def: (request method url headers input) (<| io.io - #try.Success + {try.#Success} [http/status.bad_request [#@http.headers (http.headers (list)) #@http.body (..url_body "")]])))) @@ -95,8 +95,8 @@ ($_ _.and (_.cover [/.repository /.user_agent /.Address] (let [repo (/.repository (..good_http user password) - {#.Some [#//identity.user user - #//identity.password password]} + {.#Some [//identity.#user user + //identity.#password password]} address)] (and (|> (\ repo download uri) io.run! @@ -110,22 +110,22 @@ (try.else false))))) (_.cover [/.upload_failure] (let [repo (/.repository (..good_http user password) - #.None + {.#None} address)] (case (io.run! (\ repo upload uri content)) - {#try.Failure error} + {try.#Failure error} (exception.match? /.upload_failure error) - {#try.Success _} + {try.#Success _} false))) (_.cover [/.download_failure] (let [repo (/.repository ..bad_http - #.None + {.#None} address)] (case (io.run! (\ repo download uri)) - {#try.Failure error} + {try.#Failure error} (exception.match? /.download_failure error) - {#try.Success _} + {try.#Success _} false))) )))) diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux index 0e5b72b01..77f7bcbed 100644 --- a/stdlib/source/test/aedifex/runtime.lux +++ b/stdlib/source/test/aedifex/runtime.lux @@ -44,7 +44,7 @@ (~~ (template [] [(_.cover [/.default_java /.default_js /.default_python /.default_lua /.default_ruby] (let [listing (|> (list /.default_java /.default_js /.default_python /.default_lua /.default_ruby) - (list\each (value@ #/.program))) + (list\each (value@ /.#program))) unique (set.of_list text.hash listing)] (n.= (list.size listing) (set.size unique))))] @@ -57,10 +57,10 @@ )) (_.cover [/.for] (let [runtime' (/.for runtime path)] - (and (text\= (value@ #/.program runtime) - (value@ #/.program runtime')) + (and (text\= (value@ /.#program runtime) + (value@ /.#program runtime')) (|> runtime' - (value@ #/.parameters) + (value@ /.#parameters) list.last (maybe\each (text\= path)) (maybe.else false))))) -- cgit v1.2.3