diff options
author | Eduardo Julian | 2022-03-14 03:33:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-03-14 03:33:01 -0400 |
commit | 93eb82e1bf6d2f2a6b3b0adb85f4ab93cbb766a9 (patch) | |
tree | 9301db84130bb3714d57db1196e80e7325b7f880 /stdlib/source/test | |
parent | b8681fd206d5b5076b9737ee54f0cb0405a898d6 (diff) |
De-sigil-ification: @
Diffstat (limited to '')
62 files changed, 1583 insertions, 1583 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux index 6e7947aff..fba89a430 100644 --- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux +++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux @@ -1,32 +1,32 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" try ("[1]#[0]" functor)] - [parser - ["<[0]>" text]]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat] - ["i" int]]] - [time - ["[0]" instant]]]] - ["$[0]" /// "_" - ["[1][0]" stamp]] - [\\program - ["[0]" / - ["//[1]" /// - ["[1][0]" stamp] - ["[1][0]" time]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" try ("[1]#[0]" functor)] + [parser + ["<[0]>" text]]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat] + ["i" int]]] + [time + ["[0]" instant]]]] + ["$[0]" /// "_" + ["[1][0]" stamp]] + [\\program + ["[0]" / + ["//[1]" /// + ["[1][0]" stamp] + ["[1][0]" time]]]]) (def: .public random (Random /.Value) @@ -47,18 +47,18 @@ (do random.monad [sample random stamp $///stamp.random] - (let [version (value@ /.#version sample) + (let [version (the /.#version sample) local! (text#= version - (/.format (with@ /.#snapshot {///.#Local} sample))) + (/.format (has /.#snapshot {///.#Local} sample))) 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 (the ///stamp.#time stamp))) remote_format) - (text.ends_with? (%.nat (value@ ///stamp.#build stamp)) + (text.ends_with? (%.nat (the ///stamp.#build stamp)) remote_format))] (_.cover [/.snapshot /.format] (and local! diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux index 2b10fe559..64155f029 100644 --- a/stdlib/source/test/aedifex/artifact/time/time.lux +++ b/stdlib/source/test/aedifex/artifact/time/time.lux @@ -1,26 +1,26 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - ["[0]" time] - [abstract - [monad {"+" do}]] - [control - ["[0]" try ("[1]#[0]" functor)] - [parser - ["<[0]>" text]]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat] - ["i" int]]]]] - [\\program - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + ["[0]" time] + [abstract + [monad {"+" do}]] + [control + ["[0]" try ("[1]#[0]" functor)] + [parser + ["<[0]>" text]]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat] + ["i" int]]]]] + [\\program + ["[0]" /]]) (def: .public random (Random /.Time) (random.one (|>> time.clock - (with@ time.#milli_second 0) + (has time.#milli_second 0) time.time) random.time)) diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux index a392d6ae5..9888e2f58 100644 --- a/stdlib/source/test/aedifex/cache.lux +++ b/stdlib/source/test/aedifex/cache.lux @@ -1,49 +1,49 @@ (.using - [library - [lux {"-" Type type} - ["_" test {"+" Test}] - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" try] - [concurrency - ["[0]" async {"+" Async}]] - [parser - ["[0]" environment]]] - [data - [binary {"+" Binary}] - ["[0]" text] - [format - [xml {"+" XML}]] - [collection - ["[0]" set] - ["[0]" dictionary]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]] - [world - ["[0]" file] - ["[0]" program]]]] + [library + [lux {"-" Type type} + ["_" test {"+" Test}] + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" try] + [concurrency + ["[0]" async {"+" Async}]] + [parser + ["[0]" environment]]] + [data + [binary {"+" Binary}] + ["[0]" text] + [format + [xml {"+" XML}]] + [collection + ["[0]" set] + ["[0]" dictionary]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]] + [world + ["[0]" file] + ["[0]" program]]]] + [// + ["@[0]" profile] + ["@[0]" artifact] [// - ["@[0]" profile] - ["@[0]" artifact] - [// - [lux - [data - ["_[0]" binary]]]]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1]" profile {"+" Profile}] - ["[1][0]" package {"+" Package}] - ["[1][0]" pom] - ["[1][0]" dependency {"+" Dependency} - ["[1]/[0]" resolution {"+" Resolution}]] - ["[1][0]" artifact {"+" Artifact} - ["[1]/[0]" type {"+" Type}]] - ["[1][0]" repository "_" - ["[1]/[0]" origin]]]]]) + [lux + [data + ["_[0]" binary]]]]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1]" profile {"+" Profile}] + ["[1][0]" package {"+" Package}] + ["[1][0]" pom] + ["[1][0]" dependency {"+" Dependency} + ["[1]/[0]" resolution {"+" Resolution}]] + ["[1][0]" artifact {"+" Artifact} + ["[1]/[0]" type {"+" Type}]] + ["[1][0]" repository "_" + ["[1]/[0]" origin]]]]]) (def: type (Random Type) @@ -57,7 +57,7 @@ (try.maybe (do try.monad [pom (//pom.write profile) - identity (try.of_maybe (value@ //.#identity profile))] + identity (try.of_maybe (the //.#identity profile))] (in [identity profile pom])))) @profile.random)) @@ -75,7 +75,7 @@ content ..content] (in [[//dependency.#artifact identity //dependency.#type type] - (with@ //package.#origin {//repository/origin.#Remote ""} (//package.local pom content))]))) + (has //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)}) + (has //.#dependencies (set.empty //dependency.hash)) + (has //.#identity {.#Some (the //dependency.#artifact dependency)}) //pom.write try.maybe)) ..profile) content ..content] (in [dependency - (with@ //package.#origin {//repository/origin.#Remote ""} (//package.local pom content))])))))] + (has //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) + (has //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 ""}) + (has //package.#origin {//repository/origin.#Local ""}) expected) actual))))))))) diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux index 9e315ebde..a9e9c56fb 100644 --- a/stdlib/source/test/aedifex/command/auto.lux +++ b/stdlib/source/test/aedifex/command/auto.lux @@ -1,48 +1,48 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - [pipe {"+" case>}] - ["[0]" try] - [parser - ["[0]" environment]] - [concurrency - ["[0]" atom {"+" Atom}] - ["[0]" async {"+" Async}]]] - [data - ["[0]" binary] - ["[0]" text - ["%" format {"+" format}] - [encoding - ["[0]" utf8]]] - [collection - ["[0]" set]]] - [math - ["[0]" random] - [number - ["n" nat]]] - [time - ["[0]" instant]] - [world - [console {"+" Console}] - ["[0]" shell {"+" Exit Shell}] - ["[0]" program {"+" Program}] - ["[0]" file - ["[0]" watch]]]]] - ["[0]" // "_" - ["$[0]" version] - ["$[0]" build]] - [\\program - ["[0]" / - ["//[1]" /// "_" - [command {"+" Command}] - ["[1]" profile {"+" Profile}] - ["[1][0]" action] - [dependency - [resolution {"+" Resolution}]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + [pipe {"+" case>}] + ["[0]" try] + [parser + ["[0]" environment]] + [concurrency + ["[0]" atom {"+" Atom}] + ["[0]" async {"+" Async}]]] + [data + ["[0]" binary] + ["[0]" text + ["%" format {"+" format}] + [encoding + ["[0]" utf8]]] + [collection + ["[0]" set]]] + [math + ["[0]" random] + [number + ["n" nat]]] + [time + ["[0]" instant]] + [world + [console {"+" Console}] + ["[0]" shell {"+" Exit Shell}] + ["[0]" program {"+" Program}] + ["[0]" file + ["[0]" watch]]]]] + ["[0]" // "_" + ["$[0]" version] + ["$[0]" build]] + [\\program + ["[0]" / + ["//[1]" /// "_" + [command {"+" Command}] + ["[1]" profile {"+" Profile}] + ["[1][0]" action] + [dependency + [resolution {"+" Resolution}]]]]]) (def: (command expected_runs end_signal fs dummy_file) (-> Nat Text (file.System Async) file.Path @@ -77,14 +77,14 @@ .let [empty_profile (: Profile (# ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ ///.#target target)) + (has ///.#target target)) with_program (: (-> Profile Profile) - (with@ ///.#program {.#Some program})) + (has ///.#program {.#Some program})) profile (|> empty_profile with_program with_target - (with@ ///.#sources (set.of_list text.hash (list source))))] + (has ///.#sources (set.of_list text.hash (list source))))] home (random.ascii/alpha 5) working_directory (random.ascii/alpha 5) @@ -103,7 +103,7 @@ _ (# watcher poll [])] (do [! async.monad] [no_dangling_process! (|> profile - (with@ ///.#compiler compiler) + (has ///.#compiler compiler) ((/.do! 1 watcher command) ($version.echo "") (program.async (program.mock environment.empty home working_directory)) diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux index 4237bc8af..0b8eac768 100644 --- a/stdlib/source/test/aedifex/command/build.lux +++ b/stdlib/source/test/aedifex/command/build.lux @@ -1,41 +1,41 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - [pipe {"+" case>}] - [io {"+" IO}] - ["[0]" try] - ["[0]" exception] - [concurrency - ["[0]" async {"+" Async}]] - [parser - ["[0]" environment]]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [collection - ["[0]" dictionary]]] - [math - ["[0]" random {"+" Random}]] - [world - ["[0]" file] - ["[0]" shell {"+" Shell}] - ["[0]" program]]]] - ["[0]" // "_" - ["@[0]" version] - ["$/[1]" // "_" - ["[1][0]" package]]] - [\\program - ["[0]" / - ["//[1]" /// "_" - ["[1]" profile {"+" Profile}] - ["[1][0]" action] - ["[1][0]" artifact - ["[1]/[0]" type]] - ["[1][0]" dependency {"+" Dependency} - ["[1]/[0]" resolution {"+" Resolution}]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + [pipe {"+" case>}] + [io {"+" IO}] + ["[0]" try] + ["[0]" exception] + [concurrency + ["[0]" async {"+" Async}]] + [parser + ["[0]" environment]]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [collection + ["[0]" dictionary]]] + [math + ["[0]" random {"+" Random}]] + [world + ["[0]" file] + ["[0]" shell {"+" Shell}] + ["[0]" program]]]] + ["[0]" // "_" + ["@[0]" version] + ["$/[1]" // "_" + ["[1][0]" package]]] + [\\program + ["[0]" / + ["//[1]" /// "_" + ["[1]" profile {"+" Profile}] + ["[1][0]" action] + ["[1][0]" artifact + ["[1]/[0]" type]] + ["[1][0]" dependency {"+" Dependency} + ["[1]/[0]" resolution {"+" Resolution}]]]]]) (def: .public good_shell (-> Any (Shell IO)) @@ -151,9 +151,9 @@ .let [empty_profile (: Profile (# ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ ///.#target target)) + (has ///.#target target)) with_program (: (-> Profile Profile) - (with@ ///.#program {.#Some program})) + (has ///.#program {.#Some program})) profile (|> empty_profile with_program @@ -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)) + (has ///.#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)) + (has ///.#compiler compiler profile)) start (# console read_line []) end (# console read_line [])] (in (and (text#= /.start start) diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index c66150d63..6a2210f1b 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -1,40 +1,40 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - [concurrency - ["[0]" async {"+" Async}]]] - [data - [binary {"+" Binary}] - ["[0]" product] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - [collection - ["[0]" list ("[1]#[0]" functor)] - ["[0]" set]]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]] - [world - ["[0]" file {"+" Path}]]]] + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + [concurrency + ["[0]" async {"+" Async}]]] + [data + [binary {"+" Binary}] + ["[0]" product] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + [collection + ["[0]" list ("[1]#[0]" functor)] + ["[0]" set]]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]] + [world + ["[0]" file {"+" Path}]]]] + [// + ["@[0]" version] [// - ["@[0]" version] + ["@[0]" profile] [// - ["@[0]" profile] - [// - [lux - [data - ["$[0]" binary]]]]]] - [\\program - ["[0]" / - ["//[1]" /// "_" - ["[1]" profile] - ["[1][0]" action {"+" Action}]]]]) + [lux + [data + ["$[0]" binary]]]]]] + [\\program + ["[0]" / + ["//[1]" /// "_" + ["[1]" profile] + ["[1][0]" action {"+" Action}]]]]) (def: node_name (Random Text) @@ -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 (has ///.#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 62c1ef931..7cdba510d 100644 --- a/stdlib/source/test/aedifex/command/deploy.lux +++ b/stdlib/source/test/aedifex/command/deploy.lux @@ -1,53 +1,53 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" maybe] - ["[0]" try {"+" Try}] - [concurrency - ["[0]" async {"+" Async}]] - [parser - ["[0]" environment]]] - [data - ["[0]" binary ("[1]#[0]" equivalence)] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}] - [encoding - ["[0]" utf8]]] - ["[0]" format "_" - ["[1]" binary] - ["[0]" tar] - ["[0]" xml]] - [collection - ["[0]" set]]] - [math - ["[0]" random]] - [world - ["[0]" file] - ["[0]" program {"+" Program}]]]] - [program - [compositor - ["[0]" export]]] + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" maybe] + ["[0]" try {"+" Try}] + [concurrency + ["[0]" async {"+" Async}]] + [parser + ["[0]" environment]]] + [data + ["[0]" binary ("[1]#[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}] + [encoding + ["[0]" utf8]]] + ["[0]" format "_" + ["[1]" binary] + ["[0]" tar] + ["[0]" xml]] + [collection + ["[0]" set]]] + [math + ["[0]" random]] + [world + ["[0]" file] + ["[0]" program {"+" Program}]]]] + [program + [compositor + ["[0]" export]]] + [// + ["$[0]" install] + ["$[0]" version] [// - ["$[0]" install] - ["$[0]" version] - [// - ["$[0]" profile] - ["$[0]" repository]]] - [\\program - ["[0]" / - ["//[1]" /// "_" - ["[1]" profile] - ["[1][0]" action] - ["[1][0]" pom] - ["[1][0]" hash] - ["[1][0]" repository {"+" Repository} - ["[1]/[0]" remote]] - ["[1][0]" artifact {"+" Artifact} - ["[1]/[0]" extension]]]]]) + ["$[0]" profile] + ["$[0]" repository]]] + [\\program + ["[0]" / + ["//[1]" /// "_" + ["[1]" profile] + ["[1][0]" action] + ["[1][0]" pom] + ["[1][0]" hash] + ["[1][0]" repository {"+" Repository} + ["[1]/[0]" remote]] + ["[1][0]" artifact {"+" Artifact} + ["[1]/[0]" extension]]]]]) (def: (execute! program repository fs artifact profile) (-> (Program Async) (Repository Async) (file.System Async) @@ -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 (the ///.#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 (the ///.#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) + (the ///.#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 (the ///artifact.#version artifact) artifact ///artifact/extension.pom)) + actual_library (# repository download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.lux_library)) + actual_sha-1 (# repository download (///repository/remote.uri (the ///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 (the ///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 0362bce14..5b6c42a9c 100644 --- a/stdlib/source/test/aedifex/command/deps.lux +++ b/stdlib/source/test/aedifex/command/deps.lux @@ -1,56 +1,56 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - ["[0]" predicate]] - [control - ["[0]" try] - [concurrency - ["[0]" async]] - [parser - ["[0]" environment]]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}] - [encoding - ["[0]" utf8]]] - [collection - ["[0]" dictionary] - ["[0]" set]] - [format - ["[0]" xml]]] - [math - ["[0]" random {"+" Random}]] - [world - ["[0]" program] - ["[0]" file]]]] - ["[0]" // "_" - ["@[0]" version] - ["$/[1]" // "_" - ["[1][0]" package] - ["[1][0]" artifact] - ["[1][0]" dependency "_" - ["[1]/[0]" resolution]]]] - [\\program - ["[0]" / + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + ["[0]" predicate]] + [control + ["[0]" try] + [concurrency + ["[0]" async]] + [parser + ["[0]" environment]]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}] + [encoding + ["[0]" utf8]]] + [collection + ["[0]" dictionary] + ["[0]" set]] + [format + ["[0]" xml]]] + [math + ["[0]" random {"+" Random}]] + [world + ["[0]" program] + ["[0]" file]]]] + ["[0]" // "_" + ["@[0]" version] + ["$/[1]" // "_" + ["[1][0]" package] + ["[1][0]" artifact] + ["[1][0]" dependency "_" + ["[1]/[0]" resolution]]]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1][0]" clean] ["/[1]" // "_" - ["[1][0]" clean] - ["/[1]" // "_" - ["[1]" profile] - ["[1][0]" action] - ["[1][0]" pom] - ["[1][0]" package] - ["[1][0]" artifact - ["[1]/[0]" type]] - ["[1][0]" dependency - ["[1]/[0]" resolution] - ["[1]/[0]" deployment] - ["[1]/[0]" status]] - ["[1][0]" repository - ["[1]/[0]" origin] - ["[1]/[0]" local]]]]]]) + ["[1]" profile] + ["[1][0]" action] + ["[1][0]" pom] + ["[1][0]" package] + ["[1][0]" artifact + ["[1]/[0]" type]] + ["[1][0]" dependency + ["[1]/[0]" resolution] + ["[1]/[0]" deployment] + ["[1]/[0]" status]] + ["[1][0]" repository + ["[1]/[0]" origin] + ["[1]/[0]" local]]]]]]) (def: .public test Test @@ -73,25 +73,25 @@ ///dependency.#type ///artifact/type.lux_library] dependee_pom (|> (# ///.monoid identity) - (with@ ///.#identity {.#Some dependee_artifact}) + (has ///.#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))) + (has ///.#identity {.#Some depender_artifact}) + (has ///.#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 - (|> dependee_pom (# xml.codec encoded) (# utf8.codec encoded)) - {///dependency/status.#Unverified}])) + (has ///package.#origin {///repository/origin.#Remote ""}) + (has ///package.#pom [dependee_pom + (|> dependee_pom (# xml.codec encoded) (# utf8.codec encoded)) + {///dependency/status.#Unverified}])) depender_package (|> depender_package - (with@ ///package.#origin {///repository/origin.#Remote ""}) - (with@ ///package.#pom [depender_pom - (|> depender_pom (# xml.codec encoded) (# utf8.codec encoded)) - {///dependency/status.#Unverified}])) + (has ///package.#origin {///repository/origin.#Remote ""}) + (has ///package.#pom [depender_pom + (|> depender_pom (# xml.codec encoded) (# utf8.codec encoded)) + {///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))) + (has ///.#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 4d1509924..fd4780195 100644 --- a/stdlib/source/test/aedifex/command/install.lux +++ b/stdlib/source/test/aedifex/command/install.lux @@ -1,43 +1,43 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" try {"+" Try} ("[1]#[0]" functor)] - ["[0]" exception] - [concurrency - ["[0]" async {"+" Async}]] - [parser - ["[0]" environment]]] - [data - ["[0]" binary] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - [collection - ["[0]" set {"+" Set}]]] - [math - ["[0]" random]] - [world - ["[0]" file] - ["[0]" program {"+" Program}]]]] + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" try {"+" Try} ("[1]#[0]" functor)] + ["[0]" exception] + [concurrency + ["[0]" async {"+" Async}]] + [parser + ["[0]" environment]]] + [data + ["[0]" binary] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + [collection + ["[0]" set {"+" Set}]]] + [math + ["[0]" random]] + [world + ["[0]" file] + ["[0]" program {"+" Program}]]]] + [// + ["$[0]" version] [// - ["$[0]" version] - [// - ["$[0]" profile] - ["$[0]" artifact]]] - [\\program - ["[0]" / + ["$[0]" profile] + ["$[0]" artifact]]] + [\\program + ["[0]" / + ["/[1]" // "_" ["/[1]" // "_" - ["/[1]" // "_" - ["[1]" profile] - ["[1][0]" action {"+" Action}] - ["[1][0]" local] - ["[1][0]" artifact - ["[1]/[0]" extension]] - ["[1][0]" repository "_" - ["[1]/[0]" local]]]]]]) + ["[1]" profile] + ["[1][0]" action {"+" Action}] + ["[1][0]" local] + ["[1][0]" artifact + ["[1]/[0]" extension]] + ["[1][0]" repository "_" + ["[1]/[0]" local]]]]]]) (def: .public (make_sources! fs sources) (-> (file.System Async) (Set file.Path) (Action (List Any))) @@ -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 (the ///.#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 (has ///.#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 (the ///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] @@ -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 (has ///.#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 82ca558ae..464189af0 100644 --- a/stdlib/source/test/aedifex/command/pom.lux +++ b/stdlib/source/test/aedifex/command/pom.lux @@ -1,34 +1,34 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try ("[1]#[0]" functor)] - [concurrency - ["[0]" async]]] - [data - ["[0]" binary ("[1]#[0]" equivalence)] - ["[0]" text ("[1]#[0]" equivalence) - [encoding - ["[0]" utf8]]] - [format - ["[0]" xml]]] - [math - ["[0]" random]] - [world - ["[0]" file]]]] + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try ("[1]#[0]" functor)] + [concurrency + ["[0]" async]]] + [data + ["[0]" binary ("[1]#[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence) + [encoding + ["[0]" utf8]]] + [format + ["[0]" xml]]] + [math + ["[0]" random]] + [world + ["[0]" file]]]] + [// + ["@[0]" version] [// - ["@[0]" version] - [// - ["@[0]" profile]]] - [\\program - ["[0]" / - ["//[1]" /// "_" - ["[1]" profile] - ["[1][0]" action] - ["[1][0]" pom]]]]) + ["@[0]" profile]]] + [\\program + ["[0]" / + ["//[1]" /// "_" + ["[1]" profile] + ["[1][0]" action] + ["[1][0]" pom]]]]) (def: .public test Test @@ -62,7 +62,7 @@ {try.#Failure error} (_.cover' [/.do!] - (case (value@ ///.#identity sample) + (case (the ///.#identity sample) {.#Some _} false diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux index 7be97a8bb..e992f87bc 100644 --- a/stdlib/source/test/aedifex/command/test.lux +++ b/stdlib/source/test/aedifex/command/test.lux @@ -1,43 +1,43 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception] - [concurrency - ["[0]" async]] - [parser - ["[0]" environment]]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [collection - ["[0]" dictionary] - ["[0]" list]]] - [math - ["[0]" random]] - [world - ["[0]" file] - ["[0]" shell] - ["[0]" program]]]] - ["[0]" // "_" - ["@[0]" version] - ["@[0]" build] - ["$/[1]" // "_" - ["[1][0]" package]]] - [\\program - ["[0]" / + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception] + [concurrency + ["[0]" async]] + [parser + ["[0]" environment]]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [collection + ["[0]" dictionary] + ["[0]" list]]] + [math + ["[0]" random]] + [world + ["[0]" file] + ["[0]" shell] + ["[0]" program]]]] + ["[0]" // "_" + ["@[0]" version] + ["@[0]" build] + ["$/[1]" // "_" + ["[1][0]" package]]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1][0]" build] ["/[1]" // "_" - ["[1][0]" build] - ["/[1]" // "_" - ["[1]" profile {"+" Profile}] - ["[1][0]" action] - ["[1][0]" artifact - ["[1]/[0]" type]] - ["[1][0]" dependency - ["[1]/[0]" resolution]]]]]]) + ["[1]" profile {"+" Profile}] + ["[1][0]" action] + ["[1][0]" artifact + ["[1]/[0]" type]] + ["[1][0]" dependency + ["[1]/[0]" resolution]]]]]]) (def: .public test Test @@ -50,9 +50,9 @@ .let [empty_profile (: Profile (# ///.monoid identity)) with_target (: (-> Profile Profile) - (with@ ///.#target target)) + (has ///.#target target)) with_test (: (-> Profile Profile) - (with@ ///.#test {.#Some test})) + (has ///.#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)) + (has ///.#compiler compiler profile)) build_start (# console read_line []) build_end (# console read_line []) test_start (# console read_line []) @@ -101,7 +101,7 @@ [])] _ (/.do! console (program.async (program.mock environment.empty home working_directory)) fs (shell.async bad_shell) resolution - (with@ ///.#compiler compiler profile)) + (has ///.#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/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index 4a3946a53..c22121755 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -79,20 +79,20 @@ (-> 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 (the 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 (the 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) + (the package.#library) product.left) expected_pom (|> package - (value@ package.#pom) + (the package.#pom) product.right product.left) @@ -136,7 +136,7 @@ (do random.monad [[profile package] $///package.random .let [artifact (|> profile - (value@ profile.#identity) + (the profile.#identity) maybe.trusted) dependency (: Dependency [artifact diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 3165a659d..5ea995021 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -1,52 +1,52 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - ["[0]" predicate] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" try] - ["[0]" exception] - [concurrency - ["[0]" async]]] - [data - [binary {"+" Binary}] - ["[0]" product] - ["[0]" text - ["%" format {"+" format}] - [encoding - ["[0]" utf8]]] - [format - ["[0]" xml]] - [collection - ["[0]" dictionary] - ["[0]" set] - ["[0]" list]]] - [math - ["[0]" random {"+" Random}]]]] - ["$[0]" /// "_" - ["[1][0]" package] - ["[1][0]" repository] - ["[1][0]" artifact] - [command - ["[1][0]" version]]] - [\\program - ["[0]" / - ["//[1]" /// "_" - ["[1]" profile] - ["[1][0]" package {"+" Package}] - ["[1][0]" hash] - ["[1][0]" dependency {"+" Dependency} ("[1]#[0]" equivalence) - ["[1]/[0]" status]] - ["[1][0]" pom] - ["[1][0]" artifact {"+" Artifact} - ["[1]/[0]" type] - ["[1]/[0]" extension]] - ["[1][0]" repository {"+" Mock} - ["[1]/[0]" origin]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + ["[0]" predicate] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" try] + ["[0]" exception] + [concurrency + ["[0]" async]]] + [data + [binary {"+" Binary}] + ["[0]" product] + ["[0]" text + ["%" format {"+" format}] + [encoding + ["[0]" utf8]]] + [format + ["[0]" xml]] + [collection + ["[0]" dictionary] + ["[0]" set] + ["[0]" list]]] + [math + ["[0]" random {"+" Random}]]]] + ["$[0]" /// "_" + ["[1][0]" package] + ["[1][0]" repository] + ["[1][0]" artifact] + [command + ["[1][0]" version]]] + [\\program + ["[0]" / + ["//[1]" /// "_" + ["[1]" profile] + ["[1][0]" package {"+" Package}] + ["[1][0]" hash] + ["[1][0]" dependency {"+" Dependency} ("[1]#[0]" equivalence) + ["[1]/[0]" status]] + ["[1][0]" pom] + ["[1][0]" artifact {"+" Artifact} + ["[1]/[0]" type] + ["[1]/[0]" extension]] + ["[1][0]" repository {"+" Mock} + ["[1]/[0]" origin]]]]]) (def: random (Random /.Resolution) @@ -98,7 +98,7 @@ (def: .public (single artifact package) (-> Artifact Package (Mock Any)) - (let [expected (///artifact.uri (value@ ///artifact.#version artifact) artifact)] + (let [expected (///artifact.uri (the ///artifact.#version artifact) artifact)] (implementation (def: the_description "[1]") @@ -106,11 +106,11 @@ (if (text.contains? expected uri) (let [library (: Binary (|> package - (value@ ///package.#library) + (the ///package.#library) product.left)) pom (: Binary (|> package - (value@ ///package.#pom) + (the ///package.#pom) product.left (# xml.codec encoded) (# utf8.codec encoded)))] @@ -144,34 +144,34 @@ (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 (the ///artifact.#version expected_artifact) expected_artifact) uri) (cond (text.ends_with? ///artifact/extension.lux_library uri) {try.#Success [state (|> expected_package - (value@ ///package.#library) + (the ///package.#library) product.left)]} (text.ends_with? ..lux_sha-1 uri) {try.#Success [state (|> expected_package - (value@ ///package.#library) + (the ///package.#library) product.left ..sha-1)]} (text.ends_with? ..lux_md5 uri) {try.#Success [state (|> expected_package - (value@ ///package.#library) + (the ///package.#library) product.left ..md5)]} (text.ends_with? ///artifact/extension.pom uri) {try.#Success [state (|> expected_package - (value@ ///package.#pom) + (the ///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) + (the ///package.#pom) product.left (# xml.codec encoded) (# utf8.codec encoded) @@ -179,7 +179,7 @@ (text.ends_with? ..pom_md5 uri) {try.#Success [state (|> expected_package - (value@ ///package.#pom) + (the ///package.#pom) product.left (# xml.codec encoded) (# utf8.codec encoded) @@ -197,34 +197,34 @@ (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 (the ///artifact.#version expected_artifact) expected_artifact) uri) (cond (text.ends_with? ///artifact/extension.lux_library uri) {try.#Success [state (|> expected_package - (value@ ///package.#library) + (the ///package.#library) product.left)]} (text.ends_with? ..lux_sha-1 uri) {try.#Success [state (|> expected_package - (value@ ///package.#library) + (the ///package.#library) product.left ..sha-1)]} (text.ends_with? ..lux_md5 uri) {try.#Success [state (|> dummy_package - (value@ ///package.#library) + (the ///package.#library) product.left ..md5)]} (text.ends_with? ///artifact/extension.pom uri) {try.#Success [state (|> expected_package - (value@ ///package.#pom) + (the ///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) + (the ///package.#pom) product.left (# xml.codec encoded) (# utf8.codec encoded) @@ -232,7 +232,7 @@ (text.ends_with? ..pom_md5 uri) {try.#Success [state (|> dummy_package - (value@ ///package.#pom) + (the ///package.#pom) product.left (# xml.codec encoded) (# utf8.codec encoded) @@ -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)) + (has ///package.#pom (the ///package.#pom expected_package)) (# ///package.equivalence = expected_package) not) $///package.random) @@ -266,7 +266,7 @@ (case actual_package {try.#Success actual_package} (# ///package.equivalence = - (with@ ///package.#origin {///repository/origin.#Remote ""} expected_package) + (has ///package.#origin {///repository/origin.#Remote ""} expected_package) actual_package) {try.#Failure _} @@ -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)) + (has ///package.#pom (the ///package.#pom expected_package)) (# ///package.equivalence = expected_package) not) $///package.random) @@ -315,7 +315,7 @@ (case actual_package {try.#Success actual_package} (# ///package.equivalence = - (with@ ///package.#origin {///repository/origin.#Remote ""} expected_package) + (has ///package.#origin {///repository/origin.#Remote ""} expected_package) actual_package) {try.#Failure _} @@ -366,34 +366,34 @@ ///dependency.#type ///artifact/type.lux_library] dependee_pom (|> (# ///.monoid identity) - (with@ ///.#identity {.#Some dependee_artifact}) + (has ///.#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))) + (has ///.#identity {.#Some depender_artifact}) + (has ///.#dependencies (set.of_list ///dependency.hash (list dependee))) ///pom.write try.trusted) ignored_pom (|> (# ///.monoid identity) - (with@ ///.#identity {.#Some ignored_artifact}) + (has ///.#identity {.#Some ignored_artifact}) ///pom.write try.trusted) - dependee_package (with@ ///package.#pom - [dependee_pom - (|> dependee_pom (# xml.codec encoded) (# utf8.codec encoded)) - {///dependency/status.#Unverified}] - dependee_package) - depender_package (with@ ///package.#pom - [depender_pom - (|> depender_pom (# xml.codec encoded) (# utf8.codec encoded)) - {///dependency/status.#Unverified}] - depender_package) - ignored_package (with@ ///package.#pom - [ignored_pom - (|> ignored_pom (# xml.codec encoded) (# utf8.codec encoded)) - {///dependency/status.#Unverified}] - ignored_package)]] + dependee_package (has ///package.#pom + [dependee_pom + (|> dependee_pom (# xml.codec encoded) (# utf8.codec encoded)) + {///dependency/status.#Unverified}] + dependee_package) + depender_package (has ///package.#pom + [depender_pom + (|> depender_pom (# xml.codec encoded) (# utf8.codec encoded)) + {///dependency/status.#Unverified}] + depender_package) + ignored_package (has ///package.#pom + [ignored_pom + (|> ignored_pom (# xml.codec encoded) (# utf8.codec encoded)) + {///dependency/status.#Unverified}] + ignored_package)]] (in [[dependee depender ignored] [dependee_package depender_package ignored_package]]))) diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux index 01db3538c..dedb9b33c 100644 --- a/stdlib/source/test/aedifex/input.lux +++ b/stdlib/source/test/aedifex/input.lux @@ -1,35 +1,35 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - [concurrency - ["[0]" async {"+" Async}]]] - [data - [text - ["%" format] - [encoding - ["[0]" utf8]]] - [collection - ["[0]" set {"+" Set}]]] - [math - ["[0]" random]] - [world - ["[0]" file]]]] - [// - ["$[0]" profile]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1]" profile {"+" Profile}] - ["[1][0]" project] - ["[1][0]" action] - ["[1][0]" format] - [repository - [remote {"+" Address}]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + [concurrency + ["[0]" async {"+" Async}]]] + [data + [text + ["%" format] + [encoding + ["[0]" utf8]]] + [collection + ["[0]" set {"+" Set}]]] + [math + ["[0]" random]] + [world + ["[0]" file]]]] + [// + ["$[0]" profile]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1]" profile {"+" Profile}] + ["[1][0]" project] + ["[1][0]" action] + ["[1][0]" format] + [repository + [remote {"+" Address}]]]]]) (def: (with_default_source sources) (-> (Set //.Source) (Set //.Source)) @@ -45,7 +45,7 @@ Test (<| (_.covering /._) (do [! random.monad] - [expected (# ! each (with@ //.#parents (list)) $profile.random) + [expected (# ! each (has //.#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 babf58808..241915579 100644 --- a/stdlib/source/test/aedifex/local.lux +++ b/stdlib/source/test/aedifex/local.lux @@ -1,19 +1,19 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [data - ["[0]" text]] - [math - ["[0]" random {"+" Random}]]]] - [// - ["@[0]" artifact]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1][0]" artifact]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [data + ["[0]" text]] + [math + ["[0]" random {"+" Random}]]]] + [// + ["@[0]" artifact]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1][0]" artifact]]]]) (def: .public test Test @@ -23,5 +23,5 @@ ($_ _.and (_.cover [/.repository /.uri] (text.starts_with? /.repository - (/.uri (value@ //artifact.#version sample) sample))) + (/.uri (the //artifact.#version sample) sample))) )))) diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index a77881197..bf94bf600 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -1,45 +1,45 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" maybe] - ["[0]" try ("[1]#[0]" functor)] - [parser - ["[0]" environment] - ["<[0]>" xml]] - [concurrency - ["[0]" async]]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [collection - ["[0]" list]]] - [macro - ["[0]" code]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]] - ["[0]" time - ["[0]" date] - ["[0]" year] - ["[0]" month] - ["[0]" instant] - ["[0]" duration]] - [world - ["[0]" file] - ["[0]" program]]]] - [\\program - ["[0]" / - ["/[1]" // - ["/[1]" // "_" - ["[1][0]" artifact] - ["[1][0]" repository "_" - ["[1]/[0]" local]]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" maybe] + ["[0]" try ("[1]#[0]" functor)] + [parser + ["[0]" environment] + ["<[0]>" xml]] + [concurrency + ["[0]" async]]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [collection + ["[0]" list]]] + [macro + ["[0]" code]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]] + ["[0]" time + ["[0]" date] + ["[0]" year] + ["[0]" month] + ["[0]" instant] + ["[0]" duration]] + [world + ["[0]" file] + ["[0]" program]]]] + [\\program + ["[0]" / + ["/[1]" // + ["/[1]" // "_" + ["[1][0]" artifact] + ["[1][0]" repository "_" + ["[1]/[0]" local]]]]]]) (def: .public random (Random /.Metadata) @@ -72,10 +72,10 @@ (_.for [/.Metadata]) (do random.monad [expected ..random - .let [artifact [///artifact.#group (value@ /.#group expected) - ///artifact.#name (value@ /.#name expected) + .let [artifact [///artifact.#group (the /.#group expected) + ///artifact.#name (the /.#name expected) ///artifact.#version (|> expected - (value@ /.#versions) + (the /.#versions) list.head (maybe.else ""))]]] ($_ _.and diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index d59e79809..4735a6994 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -1,53 +1,53 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" maybe] - ["[0]" try ("[1]#[0]" functor)] - [parser - ["[0]" environment] - ["<[0]>" xml]] - [concurrency - ["[0]" async]]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [collection - ["[0]" list]]] - [macro - ["[0]" code]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]] - ["[0]" time - ["[0]" date] - ["[0]" year] - ["[0]" month] - ["[0]" instant {"+" Instant}] - ["[0]" duration]] - [world - ["[0]" file] - ["[0]" program]]]] - ["$[0]" /// "_" - ["[1][0]" artifact - ["[1]/[0]" type] - ["[1]/[0]" time] - ["[1]/[0]" snapshot "_" - ["[1]/[0]" version]]]] - [\\program - ["[0]" / - ["/[1]" // - ["/[1]" // "_" - [artifact - [versioning {"+" Versioning}] - ["[1][0]" snapshot]] - ["[1][0]" repository "_" - ["[1]/[0]" local]]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" maybe] + ["[0]" try ("[1]#[0]" functor)] + [parser + ["[0]" environment] + ["<[0]>" xml]] + [concurrency + ["[0]" async]]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [collection + ["[0]" list]]] + [macro + ["[0]" code]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]] + ["[0]" time + ["[0]" date] + ["[0]" year] + ["[0]" month] + ["[0]" instant {"+" Instant}] + ["[0]" duration]] + [world + ["[0]" file] + ["[0]" program]]]] + ["$[0]" /// "_" + ["[1][0]" artifact + ["[1]/[0]" type] + ["[1]/[0]" time] + ["[1]/[0]" snapshot "_" + ["[1]/[0]" version]]]] + [\\program + ["[0]" / + ["/[1]" // + ["/[1]" // "_" + [artifact + [versioning {"+" Versioning}] + ["[1][0]" snapshot]] + ["[1][0]" repository "_" + ["[1]/[0]" local]]]]]]) (def: random_instant (Random Instant) @@ -91,7 +91,7 @@ (_.for [/.Metadata]) (do random.monad [expected ..random - .let [artifact (value@ /.#artifact expected)]] + .let [artifact (the /.#artifact expected)]] ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux index 9579f82db..af51453dd 100644 --- a/stdlib/source/test/aedifex/package.lux +++ b/stdlib/source/test/aedifex/package.lux @@ -1,44 +1,44 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" try]] - [data - ["[0]" product] - ["[0]" text - [encoding - ["[0]" utf8]]] - [format - ["[0]" xml {"+" XML}]] - [collection - ["[0]" set {"+" Set}]]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]] - [world - ["[0]" file]]]] + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" try]] + [data + ["[0]" product] + ["[0]" text + [encoding + ["[0]" utf8]]] + [format + ["[0]" xml {"+" XML}]] + [collection + ["[0]" set {"+" Set}]]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]] + [world + ["[0]" file]]]] + [// + ["$[0]" profile] [// - ["$[0]" profile] - [// - [lux - [data - ["$[0]" binary]]]]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1]" profile] - ["[1][0]" hash ("[1]#[0]" equivalence)] - ["[1][0]" pom] - [dependency - ["[1][0]" status]] - [repository - ["[1][0]" origin]]]]]) + [lux + [data + ["$[0]" binary]]]]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1]" profile] + ["[1][0]" hash ("[1]#[0]" equivalence)] + ["[1][0]" pom] + [dependency + ["[1][0]" status]] + [repository + ["[1][0]" origin]]]]]) (def: .public random (Random [//.Profile /.Package]) @@ -64,18 +64,18 @@ ($equivalence.spec /.equivalence (# ! each product.right ..random))) (_.cover [/.local?] - (/.local? (with@ /.#origin {//origin.#Local "~/yolo"} package))) + (/.local? (has /.#origin {//origin.#Local "~/yolo"} package))) (_.cover [/.remote?] - (/.remote? (with@ /.#origin {//origin.#Remote "https://example.com"} package))) + (/.remote? (has /.#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 (the /.#pom) product.left) + expected_library (|> package (the /.#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) + [actual_pom binary_pom pom_status] (the /.#pom local) + [actual_library library_status] (the /.#library local)] + (and (case (the /.#origin local) {//origin.#Local ""} true _ false) (let [expected_sha1 (//hash.sha-1 expected_library) @@ -104,7 +104,7 @@ _ false)))))) (_.cover [/.dependencies] - (let [expected (value@ //.#dependencies profile)] + (let [expected (the //.#dependencies profile)] (case (/.dependencies package) {try.#Success actual} (# set.equivalence = expected actual) @@ -112,7 +112,7 @@ {try.#Failure error} false))) (_.cover [/.repositories] - (let [expected (value@ //.#repositories profile)] + (let [expected (the //.#repositories profile)] (case (/.repositories package) {try.#Success actual} (# set.equivalence = expected actual) diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux index 5565875fb..1d3168d93 100644 --- a/stdlib/source/test/aedifex/parser.lux +++ b/stdlib/source/test/aedifex/parser.lux @@ -1,37 +1,37 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [hash {"+" Hash}]] - [control - [pipe {"+" case>}] - ["[0]" try] - [parser - ["<[0]>" code]]] - [data - ["[0]" text] - [collection - ["[0]" set {"+" Set}] - ["[0]" dictionary {"+" Dictionary}] - ["[0]" list ("[1]#[0]" functor)]]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]] - [macro - ["[0]" code]]]] - [// - ["@[0]" profile]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1]" profile] - ["[1][0]" project {"+" Project}] - ["[1][0]" artifact {"+" Artifact}] - ["[1][0]" dependency {"+" Dependency}] - ["[1][0]" format]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [hash {"+" Hash}]] + [control + [pipe {"+" case>}] + ["[0]" try] + [parser + ["<[0]>" code]]] + [data + ["[0]" text] + [collection + ["[0]" set {"+" Set}] + ["[0]" dictionary {"+" Dictionary}] + ["[0]" list ("[1]#[0]" functor)]]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]] + [macro + ["[0]" code]]]] + [// + ["@[0]" profile]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1]" profile] + ["[1][0]" project {"+" Project}] + ["[1][0]" artifact {"+" Artifact}] + ["[1][0]" dependency {"+" Dependency}] + ["[1][0]" format]]]]) (def: name (Random //.Name) @@ -55,16 +55,16 @@ (def: with_default_sources (-> //.Profile //.Profile) - (revised@ //.#sources - (: (-> (Set //.Source) (Set //.Source)) - (function (_ sources) - (if (set.empty? sources) - (set.of_list text.hash (list //.default_source)) - sources))))) + (revised //.#sources + (: (-> (Set //.Source) (Set //.Source)) + (function (_ sources) + (if (set.empty? sources) + (set.of_list text.hash (list //.default_source)) + sources))))) (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) diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux index 5f5e351d9..e6d5340e2 100644 --- a/stdlib/source/test/aedifex/pom.lux +++ b/stdlib/source/test/aedifex/pom.lux @@ -1,26 +1,26 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception] - ["<>" parser - ["<[0]>" xml]]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [format - ["[0]" xml]]] - [math - ["[0]" random]]]] - [// - ["@[0]" profile]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1]" profile]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception] + ["<>" parser + ["<[0]>" xml]]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [format + ["[0]" xml]]] + [math + ["[0]" random]]]] + [// + ["@[0]" profile]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1]" profile]]]]) (def: .public test Test @@ -34,15 +34,15 @@ [expected @profile.random] (_.cover [/.write /.parser] (case [(/.write expected) - (value@ //.#identity expected)] + (the //.#identity expected)] [{try.#Success pom} {.#Some _}] (case (<xml>.result /.parser (list pom)) {try.#Success actual} (# //.equivalence = (|> (# //.monoid identity) - (with@ //.#dependencies (value@ //.#dependencies expected)) - (with@ //.#repositories (value@ //.#repositories expected))) + (has //.#dependencies (the //.#dependencies expected)) + (has //.#repositories (the //.#repositories expected))) actual) {try.#Failure error} diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index ff9cc4ab2..1cfc7eb40 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -1,38 +1,38 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [hash {"+" Hash}] - [\\specification - ["$[0]" equivalence] - ["$[0]" monoid]]] - [control - [pipe {"+" case>}] - ["[0]" try] - [parser - ["[0]" cli]]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [collection - ["[0]" set {"+" Set}] - ["[0]" dictionary {"+" Dictionary}]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]]]] - [// - ["@[0]" artifact] - ["@[0]" dependency]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1][0]" runtime] - ["[1][0]" dependency {"+" Dependency}] - ["[1][0]" format] - [repository - [remote {"+" Address}]]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [hash {"+" Hash}] + [\\specification + ["$[0]" equivalence] + ["$[0]" monoid]]] + [control + [pipe {"+" case>}] + ["[0]" try] + [parser + ["[0]" cli]]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [collection + ["[0]" set {"+" Set}] + ["[0]" dictionary {"+" Dictionary}]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]]]] + [// + ["@[0]" artifact] + ["@[0]" dependency]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1][0]" runtime] + ["[1][0]" dependency {"+" Dependency}] + ["[1][0]" format] + [repository + [remote {"+" Address}]]]]]) (def: distribution (Random /.Distribution) @@ -154,10 +154,10 @@ (text#= "" /.default)) (_.cover [/.default_compiler] (|> (# /.monoid identity) - (value@ /.#compiler) + (the /.#compiler) (same? /.default_compiler))) (_.cover [/.default_target] (|> (# /.monoid identity) - (value@ /.#target) + (the /.#target) (same? /.default_target))) ))))) diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux index fdf778f28..c7bbe62c0 100644 --- a/stdlib/source/test/aedifex/project.lux +++ b/stdlib/source/test/aedifex/project.lux @@ -1,33 +1,33 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence] - ["$[0]" monoid]]] - [control - ["[0]" try ("[1]#[0]" functor)] - ["[0]" exception]] - [data - ["[0]" product] - ["[0]" text ("[1]#[0]" equivalence)]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]]]] - [// - ["@[0]" profile]] - [\\program - ["[0]" / - ["/[1]" // "_" - ["[1]" profile]]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence] + ["$[0]" monoid]]] + [control + ["[0]" try ("[1]#[0]" functor)] + ["[0]" exception]] + [data + ["[0]" product] + ["[0]" text ("[1]#[0]" equivalence)]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]]]] + [// + ["@[0]" profile]] + [\\program + ["[0]" / + ["/[1]" // "_" + ["[1]" profile]]]]) (def: profile (Random [//.Name //.Profile]) (|> @profile.random - (random#each (with@ //.#parents (list))) + (random#each (has //.#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 (has //.#parents (list super_name) sub_profile))) circular ($_ (# /.monoid composite) - (/.project super_name (with@ //.#parents (list sub_name) super_profile)) + (/.project super_name (has //.#parents (list sub_name) super_profile)) (/.project dummy_name dummy_profile) - (/.project sub_name (with@ //.#parents (list super_name) sub_profile)))]] + (/.project sub_name (has //.#parents (list super_name) sub_profile)))]] ($_ _.and (_.cover [/.profile] (and (|> (/.profile project super_name) diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux index ec86419c2..99c1bd92d 100644 --- a/stdlib/source/test/aedifex/runtime.lux +++ b/stdlib/source/test/aedifex/runtime.lux @@ -1,24 +1,24 @@ - (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" maybe ("[1]#[0]" functor)]] - [data - ["[0]" text ("[1]#[0]" equivalence)] - [collection - ["[0]" list ("[1]#[0]" functor)] - ["[0]" set]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]]]] - [\\program - ["[0]" /]]) +(.using + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" maybe ("[1]#[0]" functor)]] + [data + ["[0]" text ("[1]#[0]" equivalence)] + [collection + ["[0]" list ("[1]#[0]" functor)] + ["[0]" set]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]]]] + [\\program + ["[0]" /]]) (def: .public random (Random /.Runtime) @@ -44,7 +44,7 @@ (~~ (template [<command>] [(_.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 (the /.#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#= (the /.#program runtime) + (the /.#program runtime')) (|> runtime' - (value@ /.#parameters) + (the /.#parameters) list.last (maybe#each (text#= path)) (maybe.else false))))) diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index e8a6a482d..743c108f7 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -371,7 +371,7 @@ )) (_.cover [/.Ann] (|> example - (value@ /.#meta) + (the /.#meta) (location#= location.dummy))) ))) @@ -382,7 +382,7 @@ "This is an arbitrary text whose only purpose is to be found, somewhere, in the source-code.") (/.macro: (found_crosshair? tokens lux) - (let [[_ _ source_code] (value@ .#source lux)] + (let [[_ _ source_code] (the .#source lux)] {.#Right [lux (list (code.bit (text.contains? ..crosshair source_code)))]})) (/.macro: (sum tokens) @@ -762,72 +762,72 @@ #big_right [#small_left start/s #small_right text]]]] ($_ _.and - (_.cover [/.value@] + (_.cover [/.the] (and (and (|> sample - (/.value@ #big_left) + (/.the #big_left) (same? start/b)) (|> sample - ((/.value@ #big_left)) + ((/.the #big_left)) (same? start/b))) (and (|> sample - (/.value@ [#big_right #small_left]) + (/.the [#big_right #small_left]) (same? start/s)) (|> sample - ((/.value@ [#big_right #small_left])) + ((/.the [#big_right #small_left])) (same? start/s))))) - (_.cover [/.with@] + (_.cover [/.has] (and (and (|> sample - (/.with@ #big_left shift/b) - (/.value@ #big_left) + (/.has #big_left shift/b) + (/.the #big_left) (same? shift/b)) (|> sample - ((/.with@ #big_left shift/b)) - (/.value@ #big_left) + ((/.has #big_left shift/b)) + (/.the #big_left) (same? shift/b)) (|> sample - ((/.with@ #big_left) shift/b) - (/.value@ #big_left) + ((/.has #big_left) shift/b) + (/.the #big_left) (same? shift/b))) (and (|> sample - (/.with@ [#big_right #small_left] shift/s) - (/.value@ [#big_right #small_left]) + (/.has [#big_right #small_left] shift/s) + (/.the [#big_right #small_left]) (same? shift/s)) (|> sample - ((/.with@ [#big_right #small_left] shift/s)) - (/.value@ [#big_right #small_left]) + ((/.has [#big_right #small_left] shift/s)) + (/.the [#big_right #small_left]) (same? shift/s)) (|> sample - ((/.with@ [#big_right #small_left]) shift/s) - (/.value@ [#big_right #small_left]) + ((/.has [#big_right #small_left]) shift/s) + (/.the [#big_right #small_left]) (same? shift/s))))) - (_.cover [/.revised@] + (_.cover [/.revised] (and (and (|> sample - (/.revised@ #big_left (n.+ shift/b)) - (/.value@ #big_left) + (/.revised #big_left (n.+ shift/b)) + (/.the #big_left) (n.= expected/b)) (|> sample - ((/.revised@ #big_left (n.+ shift/b))) - (/.value@ #big_left) + ((/.revised #big_left (n.+ shift/b))) + (/.the #big_left) (n.= expected/b)) (|> sample ((: (-> (-> Nat Nat) (-> Big Big)) - (/.revised@ #big_left)) + (/.revised #big_left)) (n.+ shift/b)) - (/.value@ #big_left) + (/.the #big_left) (n.= expected/b))) (and (|> sample - (/.revised@ [#big_right #small_left] (n.+ shift/s)) - (/.value@ [#big_right #small_left]) + (/.revised [#big_right #small_left] (n.+ shift/s)) + (/.the [#big_right #small_left]) (n.= expected/s)) (|> sample - ((/.revised@ [#big_right #small_left] (n.+ shift/s))) - (/.value@ [#big_right #small_left]) + ((/.revised [#big_right #small_left] (n.+ shift/s))) + (/.the [#big_right #small_left]) (n.= expected/s)) (|> sample ((: (-> (-> Nat Nat) (-> Big Big)) - (/.revised@ [#big_right #small_left])) + (/.revised [#big_right #small_left])) (n.+ shift/s)) - (/.value@ [#big_right #small_left]) + (/.the [#big_right #small_left]) (n.= expected/s))))) ))) @@ -1042,11 +1042,11 @@ (/.case [..#left expected_nat ..#right expected_int] (/.^ (!pair 0 +0)) true _ false)) - (_.cover [/.^@] + (_.cover [/.^let] (let [expected_pair (: (Pair Nat Int) [..#left expected_nat ..#right expected_int])] (/.case expected_pair - (/.^@ actual_pair (/.^ (!pair actual_left actual_right))) + (/.^let actual_pair (/.^ (!pair actual_left actual_right))) (and (/.same? expected_pair actual_pair) (/.same? expected_nat actual_left) (/.same? expected_int actual_right))))) @@ -1140,13 +1140,13 @@ (syntax: (for_meta|Info []) (function (_ lux) - (let [info (value@ .#info lux) + (let [info (the .#info lux) conforming_target! - (set.member? ..possible_targets (value@ .#target info)) + (set.member? ..possible_targets (the .#target info)) compiling! - (case (value@ .#mode info) + (case (the .#mode info) {.#Build} true _ false)] {.#Right [lux (list (code.bit (and conforming_target! @@ -1155,7 +1155,7 @@ (syntax: (for_meta|Module_State []) (do meta.monad [prelude_module (meta.module .prelude_module)] - (in (list (code.bit (case (value@ .#module_state prelude_module) + (in (list (code.bit (case (the .#module_state prelude_module) {.#Active} false _ true)))))) @@ -1192,22 +1192,22 @@ let/2 <code>.local_symbol let/3 <code>.local_symbol]) - (in (list (code.bit (case (value@ .#scopes *lux*) + (in (list (code.bit (case (the .#scopes *lux*) (^ (list& scope/2 _)) - (let [locals/2 (value@ .#locals scope/2) + (let [locals/2 (the .#locals scope/2) expected_locals/2 (set.of_list text.hash (list fn/2 var/2 let/2 let/3)) actual_locals/2 (|> locals/2 - (value@ .#mappings) + (the .#mappings) (list#each product.left) (set.of_list text.hash)) correct_locals! - (and (n.= 4 (value@ .#counter locals/2)) + (and (n.= 4 (the .#counter locals/2)) (set#= expected_locals/2 actual_locals/2)) - captured/2 (value@ .#captured scope/2) + captured/2 (the .#captured scope/2) local? (: (-> Ref Bit) (function (_ ref) @@ -1219,13 +1219,13 @@ binding? (: (-> (-> Ref Bit) Text Bit) (function (_ is? name) (|> captured/2 - (value@ .#mappings) + (the .#mappings) (plist.value name) (maybe#each (|>> product.right is?)) (maybe.else false)))) correct_closure! - (and (n.= 6 (value@ .#counter captured/2)) + (and (n.= 6 (the .#counter captured/2)) (binding? local? fn/1) (binding? local? var/1) (binding? local? let/1) diff --git a/stdlib/source/test/lux/control/function/contract.lux b/stdlib/source/test/lux/control/function/contract.lux index dfad51e47..21c152053 100644 --- a/stdlib/source/test/lux/control/function/contract.lux +++ b/stdlib/source/test/lux/control/function/contract.lux @@ -1,20 +1,20 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception]] - [data - ["[0]" text]] - [math - ["[0]" random] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception]] + [data + ["[0]" text]] + [math + ["[0]" random] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) (def: .public test Test @@ -29,7 +29,7 @@ output {try.#Failure error} - (and (text.contains? (value@ exception.#label /.pre_condition_failed) + (and (text.contains? (the exception.#label /.pre_condition_failed) error) (not (n.even? expected))))) (_.cover [/.post /.post_condition_failed] @@ -39,7 +39,7 @@ (same? expected actual) {try.#Failure error} - (and (text.contains? (value@ exception.#label /.post_condition_failed) + (and (text.contains? (the exception.#label /.post_condition_failed) error) (not (n.odd? expected))))) ))) diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux index 37b231188..34b24c1f4 100644 --- a/stdlib/source/test/lux/control/security/policy.lux +++ b/stdlib/source/test/lux/control/security/policy.lux @@ -1,22 +1,22 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [hash {"+" Hash}] - [monad {"+" do}] - [\\specification - ["$[0]" functor {"+" Injection Comparison}] - ["$[0]" apply] - ["$[0]" monad]]] - [data - ["[0]" text ("[1]#[0]" equivalence)]] - [math - ["[0]" random] - [number - ["n" nat]]]]] - [\\library - ["[0]" / {"+" Context Privacy Can_Conceal Can_Reveal Privilege Private}]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [hash {"+" Hash}] + [monad {"+" do}] + [\\specification + ["$[0]" functor {"+" Injection Comparison}] + ["$[0]" apply] + ["$[0]" monad]]] + [data + ["[0]" text ("[1]#[0]" equivalence)]] + [math + ["[0]" random] + [number + ["n" nat]]]]] + [\\library + ["[0]" / {"+" Context Privacy Can_Conceal Can_Reveal Privilege Private}]]) (def: (injection can_conceal) (All (_ label) @@ -48,7 +48,7 @@ (Ex (_ %) (-> Any (Policy %))) (/.with_policy (: (Context Privacy Policy) - (function (_ (^@ privilege (^open "%[0]"))) + (function (_ (^let privilege (^open "%[0]"))) (implementation (def: &hash (implementation diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index b2af39ece..9bb1e6ea0 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -1,40 +1,40 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" maybe] - ["[0]" try] - ["[0]" exception] - ["<>" parser - ["<b>" binary]]] - [data - ["[0]" product] - ["[0]" binary ("[1]#[0]" equivalence monoid)] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}] - [encoding - ["[0]" utf8]] - ["[0]" unicode "_" - ["[1]" set] - ["[1]/[0]" block]]] - [collection - ["[0]" sequence] - ["[0]" list ("[1]#[0]" mix)]] - ["[0]" format "_" - ["[1]" binary]]] - [time - ["[0]" instant {"+" Instant}] - ["[0]" duration]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat] - ["i" int]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" maybe] + ["[0]" try] + ["[0]" exception] + ["<>" parser + ["<b>" binary]]] + [data + ["[0]" product] + ["[0]" binary ("[1]#[0]" equivalence monoid)] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}] + [encoding + ["[0]" utf8]] + ["[0]" unicode "_" + ["[1]" set] + ["[1]/[0]" block]]] + [collection + ["[0]" sequence] + ["[0]" list ("[1]#[0]" mix)]] + ["[0]" format "_" + ["[1]" binary]]] + [time + ["[0]" instant {"+" Instant}] + ["[0]" duration]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat] + ["i" int]]]]] + [\\library + ["[0]" /]]) (def: path Test @@ -354,9 +354,9 @@ (in (case (sequence.list tar) (^ (list {/.#Normal [_ _ _ actual_ownership _]})) (and (text#= (/.from_name expected) - (/.from_name (value@ [/.#user /.#name] actual_ownership))) + (/.from_name (the [/.#user /.#name] actual_ownership))) (text#= (/.from_name /.anonymous) - (/.from_name (value@ [/.#group /.#name] actual_ownership)))) + (/.from_name (the [/.#group /.#name] actual_ownership)))) _ false))) @@ -378,13 +378,13 @@ (in (case (sequence.list tar) (^ (list {/.#Normal [_ _ _ actual_ownership _]})) (and (text#= (/.from_name /.anonymous) - (/.from_name (value@ [/.#user /.#name] actual_ownership))) + (/.from_name (the [/.#user /.#name] actual_ownership))) (n.= (/.from_small /.no_id) - (/.from_small (value@ [/.#user /.#id] actual_ownership))) + (/.from_small (the [/.#user /.#id] actual_ownership))) (text#= (/.from_name /.anonymous) - (/.from_name (value@ [/.#group /.#name] actual_ownership))) + (/.from_name (the [/.#group /.#name] actual_ownership))) (n.= (/.from_small /.no_id) - (/.from_small (value@ [/.#group /.#id] actual_ownership)))) + (/.from_small (the [/.#group /.#id] actual_ownership)))) _ false))) diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux index 59f273652..0ee929ca7 100644 --- a/stdlib/source/test/lux/data/format/xml.lux +++ b/stdlib/source/test/lux/data/format/xml.lux @@ -1,32 +1,32 @@ (.using - [library - [lux {"-" char symbol} - ["_" test {"+" Test}] - [abstract - [monad {"+" Monad do}] - [\\specification - ["$[0]" equivalence] - ["$[0]" codec]]] - [control - pipe - ["[0]" maybe] - ["[0]" try] - ["p" parser - ["</>" xml]]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - [collection - ["[0]" dictionary] - ["[0]" list ("[1]#[0]" functor)]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]] - [meta - ["[0]" symbol]]]] - [\\library - ["[0]" / {"+" XML}]]) + [library + [lux {"-" char symbol} + ["_" test {"+" Test}] + [abstract + [monad {"+" Monad do}] + [\\specification + ["$[0]" equivalence] + ["$[0]" codec]]] + [control + pipe + ["[0]" maybe] + ["[0]" try] + ["p" parser + ["</>" xml]]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + [collection + ["[0]" dictionary] + ["[0]" list ("[1]#[0]" functor)]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]] + [meta + ["[0]" symbol]]]] + [\\library + ["[0]" / {"+" XML}]]) (def: char_range Text @@ -78,7 +78,7 @@ ($codec.spec /.equivalence /.codec ..random)) (do [! random.monad] - [(^@ symbol [namespace name]) ..symbol] + [(^let symbol [namespace name]) ..symbol] (`` ($_ _.and (~~ (template [<type> <format>] [(_.cover [<type> <format>] diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux index 4993ceeb4..692b28b43 100644 --- a/stdlib/source/test/lux/documentation.lux +++ b/stdlib/source/test/lux/documentation.lux @@ -1,24 +1,24 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - ["[0]" meta] - [control - ["[0]" try] - ["[0]" exception] - [parser - ["<[0]>" code]]] - [data - ["[0]" text ("[1]#[0]" equivalence) - ["%" format]] - [format - ["md" markdown]]] - ["[0]" macro - [syntax {"+" syntax:}] - ["[0]" template] - ["[0]" code]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + ["[0]" meta] + [control + ["[0]" try] + ["[0]" exception] + [parser + ["<[0]>" code]]] + [data + ["[0]" text ("[1]#[0]" equivalence) + ["%" format]] + [format + ["md" markdown]]] + ["[0]" macro + [syntax {"+" syntax:}] + ["[0]" template] + ["[0]" code]]]] + [\\library + ["[0]" /]]) (syntax: (macro_error [macro <code>.any]) (function (_ compiler) @@ -55,10 +55,10 @@ (case (`` (/.default (~~ (template.symbol [.._] [g!default])))) (^ (list definition)) (and (|> definition - (value@ /.#definition) + (the /.#definition) (text#= (template.text [g!default]))) (|> definition - (value@ /.#documentation) + (the /.#documentation) md.markdown (text#= "") not)) @@ -69,10 +69,10 @@ (case ..documentation: (^ (list documentation:)) (and (|> documentation: - (value@ /.#definition) + (the /.#definition) (text#= (template.text [/.documentation:]))) (|> documentation: - (value@ /.#documentation) + (the /.#documentation) md.markdown (text.contains? 'definition_description'))) @@ -98,7 +98,7 @@ (/.documentation super)) (case ..documentation: (^ (list documentation:)) - (text.contains? (md.markdown (value@ /.#documentation documentation:)) + (text.contains? (md.markdown (the /.#documentation documentation:)) (/.documentation super)) _ diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index 2a988f398..a7d5c88bb 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -135,7 +135,7 @@ (|> array /.length ..macro_error - (text.contains? (value@ exception.#label /.cannot_convert_to_jvm_type)))))))) + (text.contains? (the exception.#label /.cannot_convert_to_jvm_type)))))))) (def: for_miscellaneous Test @@ -228,7 +228,7 @@ /.of_string (text#= it)))) (_.cover [/.cannot_cast_to_non_object] - (text.contains? (value@ exception.#label /.cannot_cast_to_non_object) + (text.contains? (the exception.#label /.cannot_cast_to_non_object) (macro_error (/.:as boolean (: /.Boolean boolean))))) (_.cover [/.:as] (|> string diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux index 9b03b8308..f3bf54cad 100644 --- a/stdlib/source/test/lux/locale/language.lux +++ b/stdlib/source/test/lux/locale/language.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [hash {"+" Hash}] - [\\specification - ["$[0]" hash]]] - [control - ["[0]" maybe]] - [data - ["[0]" text] - [collection - ["[0]" set {"+" Set}] - ["[0]" list ("[1]#[0]" functor mix)]]] - [macro - ["[0]" template]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [hash {"+" Hash}] + [\\specification + ["$[0]" hash]]] + [control + ["[0]" maybe]] + [data + ["[0]" text] + [collection + ["[0]" set {"+" Set}] + ["[0]" list ("[1]#[0]" functor mix)]]] + [macro + ["[0]" template]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) (type: Bundle (Record @@ -190,7 +190,7 @@ (List Bundle) [Nat (Set a)])) (list#mix (function (_ bundle [amount set]) - [(n.+ amount (value@ #amount bundle)) + [(n.+ amount (the #amount bundle)) (set.union set (lens bundle))]) [0 (set.empty hash)] territories)) @@ -199,11 +199,11 @@ Test (|> ..languages list.reversed - (list#each (value@ #test)) + (list#each (the #test)) (list#mix _.and (`` ($_ _.and (~~ (template [<lens> <tag> <hash>] - [(let [[amount set] (..aggregate (value@ <tag>) <hash> ..languages)] + [(let [[amount set] (..aggregate (the <tag>) <hash> ..languages)] (_.cover [<lens>] (n.= amount (set.size set))))] @@ -279,7 +279,7 @@ (def: .public random (Random /.Language) (let [options (|> ..languages - (list#each (|>> (value@ #languages) set.list)) + (list#each (|>> (the #languages) set.list)) list.together)] (do [! random.monad] [choice (# ! each (n.% (list.size options)) diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux index dd869a5f1..e16562e3c 100644 --- a/stdlib/source/test/lux/locale/territory.lux +++ b/stdlib/source/test/lux/locale/territory.lux @@ -1,27 +1,27 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [hash {"+" Hash}] - [\\specification - ["$[0]" hash]]] - [control - ["[0]" maybe]] - [data - ["[0]" text] - [collection - ["[0]" set {"+" Set}] - ["[0]" list ("[1]#[0]" functor mix)]]] - [macro - ["[0]" template]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [hash {"+" Hash}] + [\\specification + ["$[0]" hash]]] + [control + ["[0]" maybe]] + [data + ["[0]" text] + [collection + ["[0]" set {"+" Set}] + ["[0]" list ("[1]#[0]" functor mix)]]] + [macro + ["[0]" template]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) (type: Bundle (Record @@ -145,7 +145,7 @@ (List Bundle) [Nat (Set a)])) (list#mix (function (_ bundle [amount set]) - [(n.+ amount (value@ #amount bundle)) + [(n.+ amount (the #amount bundle)) (set.union set (lens bundle))]) [0 (set.empty hash)] territories)) @@ -154,11 +154,11 @@ Test (|> ..territories list.reversed - (list#each (value@ #test)) + (list#each (the #test)) (list#mix _.and (`` ($_ _.and (~~ (template [<lens> <tag> <hash>] - [(let [[amount set] (..aggregate (value@ <tag>) <hash> ..territories)] + [(let [[amount set] (..aggregate (the <tag>) <hash> ..territories)] (_.cover [<lens>] (n.= amount (set.size set))))] @@ -205,7 +205,7 @@ (def: .public random (Random /.Territory) (let [options (|> ..territories - (list#each (|>> (value@ #territories) set.list)) + (list#each (|>> (the #territories) set.list)) list.together)] (do [! random.monad] [choice (# ! each (n.% (list.size options)) diff --git a/stdlib/source/test/lux/macro/local.lux b/stdlib/source/test/lux/macro/local.lux index db3decc44..b9b996461 100644 --- a/stdlib/source/test/lux/macro/local.lux +++ b/stdlib/source/test/lux/macro/local.lux @@ -1,31 +1,31 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - ["[0]" meta] - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception] - ["<>" parser - ["<[0]>" code]]] - [data - [text - ["%" format]] - [collection - ["[0]" list] - [dictionary - ["[0]" plist]]]] - ["[0]" macro - [syntax {"+" syntax:}] - ["[0]" code]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + ["[0]" meta] + [abstract + [monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception] + ["<>" parser + ["<[0]>" code]]] + [data + [text + ["%" format]] + [collection + ["[0]" list] + [dictionary + ["[0]" plist]]]] + ["[0]" macro + [syntax {"+" syntax:}] + ["[0]" code]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) (syntax: (macro_error [macro <code>.any]) (function (_ compiler) @@ -52,9 +52,9 @@ [module short] (meta.normal name) _ (if pre_remove (let [remove_macro! (: (-> .Module .Module) - (revised@ .#definitions (plist.lacks short)))] + (revised .#definitions (plist.lacks short)))] (function (_ lux) - {try.#Success [(revised@ .#modules (plist.revised module remove_macro!) lux) + {try.#Success [(revised .#modules (plist.revised module remove_macro!) lux) []]})) (in []))] (let [pre_expansion (` (let [(~ g!output) (~ body)] diff --git a/stdlib/source/test/lux/macro/syntax/check.lux b/stdlib/source/test/lux/macro/syntax/check.lux index 452254f43..378fe6b35 100644 --- a/stdlib/source/test/lux/macro/syntax/check.lux +++ b/stdlib/source/test/lux/macro/syntax/check.lux @@ -1,23 +1,23 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" try] - ["<>" parser - ["<[0]>" code]]] - [math - ["[0]" random {"+" Random}]] - [macro - ["[0]" code ("[1]#[0]" equivalence)]]]] - [\\library - ["[0]" /]] - ["$[0]" /// "_" - ["[1][0]" code]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" try] + ["<>" parser + ["<[0]>" code]]] + [math + ["[0]" random {"+" Random}]] + [macro + ["[0]" code ("[1]#[0]" equivalence)]]]] + [\\library + ["[0]" /]] + ["$[0]" /// "_" + ["[1][0]" code]]) (def: .public random (Random /.Check) @@ -44,5 +44,5 @@ false {try.#Success check} - (and (code#= type (value@ /.#type check)) - (code#= value (value@ /.#value check))))))))) + (and (code#= type (the /.#type check)) + (code#= value (the /.#value check))))))))) diff --git a/stdlib/source/test/lux/macro/syntax/definition.lux b/stdlib/source/test/lux/macro/syntax/definition.lux index faf667534..bd8e41b38 100644 --- a/stdlib/source/test/lux/macro/syntax/definition.lux +++ b/stdlib/source/test/lux/macro/syntax/definition.lux @@ -1,28 +1,28 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence]]] - [control - ["[0]" try] - ["[0]" exception] - ["<>" parser - ["<[0]>" code]]] - [macro - ["[0]" code ("[1]#[0]" equivalence)]] - [math - ["[0]" random {"+" Random}]] - [meta - ["[0]" location]]]] - [\\library - ["[0]" /]] - ["$[0]"// "_" - ["[1][0]" check] - ["[1]/" // "_" - ["[1][0]" code]]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence]]] + [control + ["[0]" try] + ["[0]" exception] + ["<>" parser + ["<[0]>" code]]] + [macro + ["[0]" code ("[1]#[0]" equivalence)]] + [math + ["[0]" random {"+" Random}]] + [meta + ["[0]" location]]]] + [\\library + ["[0]" /]] + ["$[0]"// "_" + ["[1][0]" check] + ["[1]/" // "_" + ["[1][0]" code]]]) (def: .public random (Random /.Definition) @@ -76,7 +76,7 @@ {try.#Success actual} (# /.equivalence = expected actual))) (_.cover [/.typed] - (let [expected (with@ /.#value {.#Left [type untyped_value]} expected)] + (let [expected (has /.#value {.#Left [type untyped_value]} expected)] (case (<code>.result (/.typed compiler) (list (/.format expected))) {try.#Failure error} @@ -85,7 +85,7 @@ {try.#Success actual} (# /.equivalence = expected actual)))) (_.cover [/.lacks_type] - (let [expected (with@ /.#value {.#Right untyped_value} expected)] + (let [expected (has /.#value {.#Right untyped_value} expected)] (case (<code>.result (/.typed compiler) (list (/.format expected))) {try.#Failure error} diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux index 0dca828c9..53b8982a2 100644 --- a/stdlib/source/test/lux/math/number/complex.lux +++ b/stdlib/source/test/lux/math/number/complex.lux @@ -1,25 +1,25 @@ (.using - [library - [lux "*" - ["%" data/text/format {"+" format}] - ["_" test {"+" Test}] - [abstract - [monad {"+" do}] - [\\specification - ["$[0]" equivalence] - ["$[0]" order] - ["$[0]" codec]]] - [data - [collection - ["[0]" list ("[1]#[0]" functor)]]] - ["[0]" math - ["[0]" random {"+" Random}]]]] - [\\library - ["[0]" / - [// - ["n" nat] - ["f" frac] - ["[0]" int]]]]) + [library + [lux "*" + ["%" data/text/format {"+" format}] + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence] + ["$[0]" order] + ["$[0]" codec]]] + [data + [collection + ["[0]" list ("[1]#[0]" functor)]]] + ["[0]" math + ["[0]" random {"+" Random}]]]] + [\\library + ["[0]" / + [// + ["n" nat] + ["f" frac] + ["[0]" int]]]]) ... This margin of error is necessary because floating-point arithmetic is not exact. (def: margin_of_error @@ -43,8 +43,8 @@ (def: angle (Random /.Complex) (# random.monad each - (|>> (revised@ /.#real (f.% +1.0)) - (revised@ /.#imaginary (f.% +1.0))) + (|>> (revised /.#real (f.% +1.0)) + (revised /.#imaginary (f.% +1.0))) ..random)) (def: construction @@ -55,11 +55,11 @@ ($_ _.and (_.cover [/.complex] (and (let [r+i (/.complex real imaginary)] - (and (f.= real (value@ /.#real r+i)) - (f.= imaginary (value@ /.#imaginary r+i)))) + (and (f.= real (the /.#real r+i)) + (f.= imaginary (the /.#imaginary r+i)))) (let [r+i (/.complex real)] - (and (f.= real (value@ /.#real r+i)) - (f.= +0.0 (value@ /.#imaginary r+i)))))) + (and (f.= real (the /.#real r+i)) + (f.= +0.0 (the /.#imaginary r+i)))))) (_.cover [/.approximately?] (/.approximately? ..margin_of_error (/.complex real imaginary) @@ -135,18 +135,18 @@ (_.cover [/.+] (let [z (/.+ y x)] (and (/.= z - (/.complex (f.+ (value@ /.#real y) - (value@ /.#real x)) - (f.+ (value@ /.#imaginary y) - (value@ /.#imaginary x))))))) + (/.complex (f.+ (the /.#real y) + (the /.#real x)) + (f.+ (the /.#imaginary y) + (the /.#imaginary x))))))) (_.cover [/.-] (let [normal! (let [z (/.- y x)] (and (/.= z - (/.complex (f.- (value@ /.#real y) - (value@ /.#real x)) - (f.- (value@ /.#imaginary y) - (value@ /.#imaginary x)))))) + (/.complex (f.- (the /.#real y) + (the /.#real x)) + (f.- (the /.#imaginary y) + (the /.#imaginary x)))))) inverse! (and (|> x (/.+ y) (/.- y) (/.approximately? ..margin_of_error x)) @@ -161,8 +161,8 @@ (let [rem (/.% y x) quotient (|> x (/.- rem) (/./ y)) floored (|> quotient - (revised@ /.#real math.floor) - (revised@ /.#imaginary math.floor))] + (revised /.#real math.floor) + (revised /.#imaginary math.floor))] (/.approximately? +0.000000000001 x (|> quotient (/.* y) (/.+ rem))))) @@ -175,10 +175,10 @@ ($_ _.and (_.cover [/.conjugate] (let [cx (/.conjugate x)] - (and (f.= (value@ /.#real x) - (value@ /.#real cx)) - (f.= (f.opposite (value@ /.#imaginary x)) - (value@ /.#imaginary cx))))) + (and (f.= (the /.#real x) + (the /.#real cx)) + (f.= (f.opposite (the /.#imaginary x)) + (the /.#imaginary cx))))) (_.cover [/.reciprocal] (let [reciprocal! (|> x (/.* (/.reciprocal x)) (/.approximately? ..margin_of_error /.+one)) diff --git a/stdlib/source/test/lux/meta/configuration.lux b/stdlib/source/test/lux/meta/configuration.lux index 9776472d5..c96a5593d 100644 --- a/stdlib/source/test/lux/meta/configuration.lux +++ b/stdlib/source/test/lux/meta/configuration.lux @@ -83,8 +83,8 @@ false] true)))) (_.cover [/.invalid] - (and (text.contains? (value@ exception.#label /.invalid) + (and (text.contains? (the exception.#label /.invalid) (..failure (/.for []))) - (text.contains? (value@ exception.#label /.invalid) + (text.contains? (the exception.#label /.invalid) (..failure (/.for [["left" "yolo"] false]))))) )))) diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux index 3e4233939..2ce0ba52b 100644 --- a/stdlib/source/test/lux/meta/symbol.lux +++ b/stdlib/source/test/lux/meta/symbol.lux @@ -32,11 +32,11 @@ [... First Symbol sizeM1 (|> random.nat (# ! each (n.% 100))) sizeS1 (|> random.nat (# ! each (|>> (n.% 100) (n.max 1)))) - (^@ symbol1 [module1 short1]) (..random sizeM1 sizeS1) + (^let symbol1 [module1 short1]) (..random sizeM1 sizeS1) ... Second Symbol sizeM2 (|> random.nat (# ! each (n.% 100))) sizeS2 (|> random.nat (# ! each (|>> (n.% 100) (n.max 1)))) - (^@ symbol2 [module2 short2]) (..random sizeM2 sizeS2)] + (^let symbol2 [module2 short2]) (..random sizeM2 sizeS2)] (_.for [.Symbol] ($_ _.and (_.for [/.equivalence] diff --git a/stdlib/source/test/lux/meta/version.lux b/stdlib/source/test/lux/meta/version.lux index a279158ab..ca219323a 100644 --- a/stdlib/source/test/lux/meta/version.lux +++ b/stdlib/source/test/lux/meta/version.lux @@ -48,8 +48,8 @@ (/.for [<fake> false] true))) (_.cover [/.invalid] - (and (text.contains? (value@ exception.#label /.invalid) + (and (text.contains? (the exception.#label /.invalid) (..failure (/.for []))) - (text.contains? (value@ exception.#label /.invalid) + (text.contains? (the exception.#label /.invalid) (..failure (/.for [<fake> false]))))) ))) diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux index a10c0e0e1..cdeefb573 100644 --- a/stdlib/source/test/lux/target/jvm.lux +++ b/stdlib/source/test/lux/target/jvm.lux @@ -1,58 +1,58 @@ (.using - [library - [lux {"-" Type Primitive Label type int} - ["[0]" ffi {"+" import:}] - ["@" target] - [abstract - ["[0]" monad {"+" do}]] - [control - ["[0]" function] - ["[0]" io] - ["[0]" maybe] - ["[0]" try] - [concurrency - ["[0]" atom]]] - [data - ["[0]" bit ("[1]#[0]" equivalence)] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - ["[0]" format "_" - ["[1]" binary]] - [collection - ["[0]" array] - ["[0]" dictionary] - ["[0]" sequence] - ["[0]" set] - ["[0]" list ("[1]#[0]" functor)]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat] - ["i" int] - ["f" frac] - ["[0]" i32 {"+" I32}] - ["[0]" i64]]] - ["_" test {"+" Test}]]] - [\\library - ["[0]" / "_" - ["[1][0]" loader {"+" Library}] - ["[1][0]" version] - ["[1][0]" modifier ("[1]#[0]" monoid)] - ["[1][0]" field] - ["[1][0]" method {"+" Method}] - ["[1][0]" class] - ["[1][0]" attribute - ["[1]/[0]" code]] - ["[1][0]" constant - ["[1]/[0]" pool {"+" Resource}]] - [encoding - ["[1][0]" name] - ["[1][0]" signed] - ["[1][0]" unsigned]] - ["[1]" bytecode {"+" Label Bytecode} - ["[1][0]" instruction]] - ["[1][0]" type {"+" Type} - ["[0]" category {"+" Value Object Class}]]]]) + [library + [lux {"-" Type Primitive Label type int} + ["[0]" ffi {"+" import:}] + ["@" target] + [abstract + ["[0]" monad {"+" do}]] + [control + ["[0]" function] + ["[0]" io] + ["[0]" maybe] + ["[0]" try] + [concurrency + ["[0]" atom]]] + [data + ["[0]" bit ("[1]#[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + ["[0]" format "_" + ["[1]" binary]] + [collection + ["[0]" array] + ["[0]" dictionary] + ["[0]" sequence] + ["[0]" set] + ["[0]" list ("[1]#[0]" functor)]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat] + ["i" int] + ["f" frac] + ["[0]" i32 {"+" I32}] + ["[0]" i64]]] + ["_" test {"+" Test}]]] + [\\library + ["[0]" / "_" + ["[1][0]" loader {"+" Library}] + ["[1][0]" version] + ["[1][0]" modifier ("[1]#[0]" monoid)] + ["[1][0]" field] + ["[1][0]" method {"+" Method}] + ["[1][0]" class] + ["[1][0]" attribute + ["[1]/[0]" code]] + ["[1][0]" constant + ["[1]/[0]" pool {"+" Resource}]] + [encoding + ["[1][0]" name] + ["[1][0]" signed] + ["[1][0]" unsigned]] + ["[1]" bytecode {"+" Label Bytecode} + ["[1][0]" instruction]] + ["[1][0]" type {"+" Type} + ["[0]" category {"+" Value Object Class}]]]]) (def: method_modifier ($_ /modifier#composite @@ -1054,13 +1054,13 @@ (-> (Primitive a) (Primitive z) (Bytecode Any) (-> a z) (-> z Any Bit) (Random Bit))) (function (_ from to instruction convert test) (do random.monad - [input (value@ #random from) + [input (the #random from) .let [expected (convert input)]] (..bytecode (test expected) (do /.monad - [_ ((value@ #literal from) input) + [_ ((the #literal from) input) _ instruction] - (value@ #wrap to)))))) + (the #wrap to)))))) int::= (!::= java/lang/Integer "jvm ieq" "jvm int =") long::= (!::= java/lang/Long "jvm leq" "jvm long =") float::= (!::= java/lang/Float "jvm feq" "jvm float =") @@ -1324,10 +1324,10 @@ (do random.monad [class_name ..class_name primitive_method_name (random.ascii/upper 10) - .let [primitive_method_type (/type.method [(list) (list) (value@ #unboxed primitive) (list)])] + .let [primitive_method_type (/type.method [(list) (list) (the #unboxed primitive) (list)])] object_method_name (|> (random.ascii/upper 10) (random.only (|>> (text#= primitive_method_name) not))) - expected (value@ #random primitive) + expected (the #random primitive) .let [$Self (/type.class class_name (list))]] (in (case (do try.monad [class (/class.class /version.v6_0 /class.public @@ -1341,11 +1341,11 @@ #0 primitive_method_type (list) {.#Some (do /.monad - [_ ((value@ #literal primitive) expected)] + [_ ((the #literal primitive) expected)] return)}) (/method.method ..method_modifier object_method_name - #0 (/type.method [(list) (list) (value@ #boxed primitive) (list)]) + #0 (/type.method [(list) (list) (the #boxed primitive) (list)]) (list) {.#Some (do /.monad [_ (/.invokestatic $Self primitive_method_name primitive_method_type) @@ -1355,7 +1355,7 @@ {.#Some substitute} (substitute expected)) - _ (value@ #wrap primitive)] + _ (the #wrap primitive)] /.areturn)})) (sequence.sequence)) .let [bytecode (format.result /class.writer class) diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux index feec778bb..4e9638e6d 100644 --- a/stdlib/source/test/lux/test.lux +++ b/stdlib/source/test/lux/test.lux @@ -26,8 +26,8 @@ (-> Text Text Nat Nat [/.Tally Text] Bit) (and (text.contains? expected_message/0 message) (text.contains? expected_message/1 message) - (n.= successes (value@ /.#successes tally)) - (n.= failures (value@ /.#failures tally)))) + (n.= successes (the /.#successes tally)) + (n.= failures (the /.#failures tally)))) (def: assertion /.Test @@ -42,10 +42,10 @@ (/.cover' [/.assertion /.Tally] (and (text.ends_with? expected_message/0 success_message) (text.ends_with? expected_message/0 failure_message) - (and (n.= 1 (value@ /.#successes success_tally)) - (n.= 0 (value@ /.#failures success_tally))) - (and (n.= 0 (value@ /.#successes failure_tally)) - (n.= 1 (value@ /.#failures failure_tally))))))) + (and (n.= 1 (the /.#successes success_tally)) + (n.= 0 (the /.#failures success_tally))) + (and (n.= 0 (the /.#successes failure_tally)) + (n.= 1 (the /.#failures failure_tally))))))) (in (do async.monad [tt (/.and' (/.assertion expected_message/0 true) (/.assertion expected_message/1 true)) @@ -83,10 +83,10 @@ [[pre_tally pre_message] pre [post_tally post_message] post] (/.cover' [/.seed] - (and (and (n.= 1 (value@ /.#successes pre_tally)) - (n.= 0 (value@ /.#failures pre_tally))) - (and (n.= 1 (value@ /.#successes post_tally)) - (n.= 0 (value@ /.#failures post_tally))))))))) + (and (and (n.= 1 (the /.#successes pre_tally)) + (n.= 0 (the /.#failures pre_tally))) + (and (n.= 1 (the /.#successes post_tally)) + (n.= 0 (the /.#failures post_tally))))))))) (def: times /.Test @@ -96,9 +96,9 @@ (in (do async.monad [[tally error] times_assertion] (/.cover' [/.must_try_test_at_least_once] - (and (text.contains? (value@ exception.#label /.must_try_test_at_least_once) error) - (n.= 0 (value@ /.#successes tally)) - (n.= 1 (value@ /.#failures tally))))))) + (and (text.contains? (the exception.#label /.must_try_test_at_least_once) error) + (n.= 0 (the /.#successes tally)) + (n.= 1 (the /.#failures tally))))))) (do [! random.monad] [expected (# ! each (|>> (n.% 10) ++) random.nat) .let [counter (: (Atom Nat) @@ -113,8 +113,8 @@ actual (async.future (atom.read! counter))] (/.cover' [/.times] (and (n.= expected actual) - (n.= 1 (value@ /.#successes tally)) - (n.= 0 (value@ /.#failures tally))))))) + (n.= 1 (the /.#successes tally)) + (n.= 0 (the /.#failures tally))))))) )) (def: in_parallel @@ -136,8 +136,8 @@ actual (async.future (atom.read! counter))] (/.cover' [/.in_parallel] (and (n.= expected actual) - (n.= expected (value@ /.#successes tally)) - (n.= 0 (value@ /.#failures tally))))))) + (n.= expected (the /.#successes tally)) + (n.= 0 (the /.#failures tally))))))) (do [! random.monad] [expected (# ! each (|>> (n.% 10) ++) random.nat) .let [counter (: (Atom Nat) @@ -154,10 +154,10 @@ [[tally error] assertion actual (async.future (atom.read! counter))] (/.cover' [/.error_during_execution] - (let [correct_error! (text.contains? (value@ exception.#label /.error_during_execution) error) + (let [correct_error! (text.contains? (the exception.#label /.error_during_execution) error) no_complete_run! (n.= 0 actual) - no_successes! (n.= 0 (value@ /.#successes tally)) - ran_all_tests! (n.= expected (value@ /.#failures tally))] + no_successes! (n.= 0 (the /.#successes tally)) + ran_all_tests! (n.= expected (the /.#failures tally))] (and correct_error! no_complete_run! no_successes! @@ -177,10 +177,10 @@ [[not_covering _] not_covering [covering _] covering] (/.cover' [/.covering] - (and (and (set.empty? (value@ /.#expected_coverage not_covering)) - (set.empty? (value@ /.#actual_coverage not_covering))) - (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.empty? (value@ /.#actual_coverage covering)))))))) + (and (and (set.empty? (the /.#expected_coverage not_covering)) + (set.empty? (the /.#actual_coverage not_covering))) + (and (not (set.empty? (the /.#expected_coverage covering))) + (set.empty? (the /.#actual_coverage covering)))))))) (do random.monad [not_covering (/.covering .._ (/.test "" true)) covering (/.covering .._ (/.cover [..dummy_target] true))] @@ -188,10 +188,10 @@ [[not_covering _] not_covering [covering _] covering] (/.cover' [/.cover] - (and (and (not (set.empty? (value@ /.#expected_coverage not_covering))) - (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target)))) - (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target)))))))) + (and (and (not (set.empty? (the /.#expected_coverage not_covering))) + (not (set.member? (the /.#actual_coverage not_covering) (symbol ..dummy_target)))) + (and (not (set.empty? (the /.#expected_coverage covering))) + (set.member? (the /.#actual_coverage covering) (symbol ..dummy_target)))))))) (do random.monad [not_covering (/.covering .._ (/.test "" true)) covering (/.covering .._ (in (/.cover' [..dummy_target] true)))] @@ -199,10 +199,10 @@ [[not_covering _] not_covering [covering _] covering] (/.cover' [/.cover'] - (and (and (not (set.empty? (value@ /.#expected_coverage not_covering))) - (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target)))) - (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target)))))))) + (and (and (not (set.empty? (the /.#expected_coverage not_covering))) + (not (set.member? (the /.#actual_coverage not_covering) (symbol ..dummy_target)))) + (and (not (set.empty? (the /.#expected_coverage covering))) + (set.member? (the /.#actual_coverage covering) (symbol ..dummy_target)))))))) (do random.monad [not_covering (/.covering .._ (/.test "" true)) covering (/.covering .._ (/.for [..dummy_target] (/.test "" true)))] @@ -210,10 +210,10 @@ [[not_covering _] not_covering [covering _] covering] (/.cover' [/.for] - (and (and (not (set.empty? (value@ /.#expected_coverage not_covering))) - (not (set.member? (value@ /.#actual_coverage not_covering) (symbol ..dummy_target)))) - (and (not (set.empty? (value@ /.#expected_coverage covering))) - (set.member? (value@ /.#actual_coverage covering) (symbol ..dummy_target)))))))) + (and (and (not (set.empty? (the /.#expected_coverage not_covering))) + (not (set.member? (the /.#actual_coverage not_covering) (symbol ..dummy_target)))) + (and (not (set.empty? (the /.#expected_coverage covering))) + (set.member? (the /.#actual_coverage covering) (symbol ..dummy_target)))))))) )) (def: .public test @@ -240,10 +240,10 @@ (/.cover' [/.test] (and (text.ends_with? (%.text expected_message/0) success_message) (text.ends_with? (%.text expected_message/0) failure_message) - (and (n.= 1 (value@ /.#successes success_tally)) - (n.= 0 (value@ /.#failures success_tally))) - (and (n.= 0 (value@ /.#successes failure_tally)) - (n.= 1 (value@ /.#failures failure_tally)))))))) + (and (n.= 1 (the /.#successes success_tally)) + (n.= 0 (the /.#failures success_tally))) + (and (n.= 0 (the /.#successes failure_tally)) + (n.= 1 (the /.#failures failure_tally)))))))) (do ! [tt (/.and (/.test expected_message/0 true) (/.test expected_message/1 true)) @@ -274,18 +274,18 @@ (text.contains? expected_message/0 success_message)) (and (text.contains? expected_context failure_message) (text.contains? expected_message/0 failure_message)) - (and (n.= 1 (value@ /.#successes success_tally)) - (n.= 0 (value@ /.#failures success_tally))) - (and (n.= 0 (value@ /.#successes failure_tally)) - (n.= 1 (value@ /.#failures failure_tally)))))))) + (and (n.= 1 (the /.#successes success_tally)) + (n.= 0 (the /.#failures success_tally))) + (and (n.= 0 (the /.#successes failure_tally)) + (n.= 1 (the /.#failures failure_tally)))))))) (do ! [failure_assertion (/.failure expected_message/0)] (in (do async.monad [[failure_tally failure_message] failure_assertion] (/.cover' [/.failure] (and (text.contains? expected_message/0 failure_message) - (and (n.= 0 (value@ /.#successes failure_tally)) - (n.= 1 (value@ /.#failures failure_tally)))))))) + (and (n.= 0 (the /.#successes failure_tally)) + (n.= 1 (the /.#failures failure_tally)))))))) (do ! [success_assertion (/.lifted expected_message/0 (in true)) failure_assertion (/.lifted expected_message/0 (in false))] @@ -295,10 +295,10 @@ (/.cover' [/.lifted] (and (text.contains? expected_message/0 success_message) (text.contains? expected_message/0 failure_message) - (and (n.= 1 (value@ /.#successes success_tally)) - (n.= 0 (value@ /.#failures success_tally))) - (and (n.= 0 (value@ /.#successes failure_tally)) - (n.= 1 (value@ /.#failures failure_tally)))))))) + (and (n.= 1 (the /.#successes success_tally)) + (n.= 0 (the /.#failures success_tally))) + (and (n.= 0 (the /.#successes failure_tally)) + (n.= 1 (the /.#failures failure_tally)))))))) ..times ..in_parallel ..coverage diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux index ee058760a..7ca3c4b12 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis.lux @@ -253,10 +253,10 @@ location/0 /location.random location/1 /location.random configuration ($configuration.random 5) - .let [state/0 (with@ .#location location/0 - (/.state (/.info version/0 host/0 configuration))) - state/1 (with@ .#location location/1 - (/.state (/.info version/1 host/1 configuration)))]] + .let [state/0 (has .#location location/0 + (/.state (/.info version/0 host/0 configuration))) + state/1 (has .#location location/1 + (/.state (/.info version/1 host/1 configuration)))]] ($_ _.and (_.cover [/.set_state] (|> (do phase.monad @@ -335,30 +335,30 @@ expected_code (random.ascii/lower 13) configuration ($configuration.random 5) - .let [state (with@ .#location location - (/.state (/.info version host configuration)))]] + .let [state (has .#location location + (/.state (/.info version host configuration)))]] ($_ _.and (_.cover [/.info] (let [it (/.info version host configuration)] (and (text#= (version.format version) - (value@ .#version it)) + (the .#version it)) (same? host - (value@ .#target it)) - (..tagged? .#Build (value@ .#mode it)) - (same? configuration (value@ .#configuration it))))) + (the .#target it)) + (..tagged? .#Build (the .#mode it)) + (same? configuration (the .#configuration it))))) (_.cover [/.state] (let [info (/.info version host configuration) it (/.state info)] (and (same? info - (value@ .#info it)) + (the .#info it)) (same? location.dummy - (value@ .#location it)) - (..tagged? .#None (value@ .#current_module it)) - (..tagged? .#None (value@ .#expected it)) - (list.empty? (value@ .#modules it)) - (list.empty? (value@ .#scopes it)) - (list.empty? (value@ [.#type_context .#var_bindings] it)) - (case (value@ .#source it) + (the .#location it)) + (..tagged? .#None (the .#current_module it)) + (..tagged? .#None (the .#expected it)) + (list.empty? (the .#modules it)) + (list.empty? (the .#scopes it)) + (list.empty? (the [.#type_context .#var_bindings] it)) + (case (the .#source it) [location 0 ""] (same? location.dummy location) @@ -367,7 +367,7 @@ (_.cover [/.set_current_module] (|> (do phase.monad [_ (/.set_current_module expected_module)] - (extension.read (|>> (value@ .#current_module) (maybe.else "")))) + (extension.read (|>> (the .#current_module) (maybe.else "")))) (phase.result [extension.#bundle extension.empty extension.#state state]) (case> {try.#Success actual} @@ -376,7 +376,7 @@ _ false))) (_.cover [/.with_current_module] - (let [current_module (extension.read (|>> (value@ .#current_module) (maybe.else "")))] + (let [current_module (extension.read (|>> (the .#current_module) (maybe.else "")))] (|> (do phase.monad [_ (/.set_current_module expected_module) pre current_module @@ -393,7 +393,7 @@ (let [expected (/.location expected_file)] (|> (do phase.monad [_ (/.set_location expected)] - (extension.read (value@ .#location))) + (extension.read (the .#location))) (phase.result [extension.#bundle extension.empty extension.#state state]) (case> {try.#Success actual} @@ -404,7 +404,7 @@ (_.cover [/.with_location] (let [expected (/.location expected_file) dummy (/.location expected_code) - location (extension.read (value@ .#location))] + location (extension.read (the .#location))] (|> (do phase.monad [_ (/.set_location expected) pre location @@ -421,7 +421,7 @@ (let [expected (/.source expected_file expected_code)] (|> (do phase.monad [_ (/.set_source_code expected)] - (extension.read (value@ .#source))) + (extension.read (the .#source))) (phase.result [extension.#bundle extension.empty extension.#state state]) (case> {try.#Success actual} @@ -432,7 +432,7 @@ (_.cover [/.with_source_code] (let [expected (/.source expected_file expected_code) dummy (/.source expected_code expected_file) - source (extension.read (value@ .#source))] + source (extension.read (the .#source))] (|> (do phase.monad [_ (/.set_source_code expected) pre source diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux index 63038413d..aa9f91e78 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux @@ -79,7 +79,7 @@ false {try.#Failure error} - (text.contains? (value@ exception.#label exception) error))) + (text.contains? (the exception.#label exception) error))) (def: .public simple_parameter (Random [Type Code]) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux index d3f1ff62d..e3dd8a53f 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/macro.lux @@ -89,7 +89,7 @@ (meta.result lux) (case> {try.#Failure it} (and (text.contains? expected_error it) - (text.contains? (value@ exception.#label /.expansion_failed) it)) + (text.contains? (the exception.#label /.expansion_failed) it)) _ false))) @@ -102,7 +102,7 @@ (|> (/.single_expansion ..expander name multiple (list mono)) (meta.result lux) (case> {try.#Failure it} - (text.contains? (value@ exception.#label /.must_have_single_expansion) it) + (text.contains? (the exception.#label /.must_have_single_expansion) it) _ false))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux index 69e7970f8..904bd4dd7 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/module.lux @@ -46,11 +46,11 @@ (def: (new? hash it) (-> Nat .Module Bit) - (and (same? hash (value@ .#module_hash it)) - (list.empty? (value@ .#module_aliases it)) - (list.empty? (value@ .#definitions it)) - (list.empty? (value@ .#imports it)) - (case (value@ .#module_state it) + (and (same? hash (the .#module_hash it)) + (list.empty? (the .#module_aliases it)) + (list.empty? (the .#definitions it)) + (list.empty? (the .#imports it)) + (case (the .#module_state it) {.#Active} true @@ -120,7 +120,7 @@ (/.alias expected_alias expected_import)))] (in it)) (/phase.result state) - (try#each (|>> (value@ .#module_aliases) + (try#each (|>> (the .#module_aliases) (case> (^ (list [actual_alias actual_import])) (and (same? expected_alias actual_alias) (same? expected_import actual_import)) @@ -168,7 +168,7 @@ false {try.#Failure error} - (text.contains? (value@ exception.#label /.can_only_change_state_of_active_module) error)))] + (text.contains? (the exception.#label /.can_only_change_state_of_active_module) error)))] [/.set_compiled /.set_active] [/.set_compiled /.set_compiled] @@ -185,7 +185,7 @@ false {try.#Failure error} - (text.contains? (value@ exception.#label /.unknown_module) error)))] + (text.contains? (the exception.#label /.unknown_module) error)))] [/.set_active] [/.set_compiled] @@ -310,7 +310,7 @@ false {try.#Failure error} - (text.contains? (value@ exception.#label /.cannot_declare_labels_for_anonymous_type) error)))] + (text.contains? (the exception.#label /.cannot_declare_labels_for_anonymous_type) error)))] [.#Left false] [.#Right true]))))) @@ -326,7 +326,7 @@ false {try.#Failure error} - (text.contains? (value@ exception.#label /.cannot_declare_labels_for_foreign_type) error)))] + (text.contains? (the exception.#label /.cannot_declare_labels_for_foreign_type) error)))] [.#Left false] [.#Right true]))))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux index 3338cc9a2..db4902b2b 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/scope.lux @@ -127,7 +127,7 @@ (try.else false)))) (_.cover [/.drained] (|> (function (_ [bundle state]) - {try.#Success [[bundle (with@ .#scopes (list) state)] + {try.#Success [[bundle (has .#scopes (list) state)] false]}) (/.with_local [name/0 type/0]) /.with @@ -149,12 +149,12 @@ (//phase.result state) (try#each (function (_ [scope/0 var/0' scope/1 var/0'']) (and (local? type/0 0 var/0') - (n.= 0 (list.size (value@ [.#locals .#mappings] scope/0))) - (n.= 0 (list.size (value@ [.#captured .#mappings] scope/0))) + (n.= 0 (list.size (the [.#locals .#mappings] scope/0))) + (n.= 0 (list.size (the [.#captured .#mappings] scope/0))) (foreign? type/0 0 var/0'') - (n.= 0 (list.size (value@ [.#locals .#mappings] scope/1))) - (n.= 1 (list.size (value@ [.#captured .#mappings] scope/1)))))) + (n.= 0 (list.size (the [.#locals .#mappings] scope/1))) + (n.= 1 (list.size (the [.#captured .#mappings] scope/1)))))) (try.else false))) (_.cover [/.environment] (let [(^open "list#[0]") (list.equivalence //variable.equivalence)] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux index e2ee0a546..6c1e342ec 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis.lux @@ -945,7 +945,7 @@ (//module.with 0 module/0) (phase#each (|>> product.right product.right)) (phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.invalid))))] + (exception.otherwise (text.contains? (the exception.#label /.invalid))))] [(` ({#0} (~ (code.bit bit/0))))] [(` ({#0 [] #1} (~ (code.bit bit/0))))] diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux index 8ade96d8a..b08ab36de 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -120,25 +120,25 @@ _ (/.tuple :var:)] (in false)) (check.result check.fresh_context) - (exception.otherwise (text.contains? (value@ exception.#label /.non_tuple)))) + (exception.otherwise (text.contains? (the exception.#label /.non_tuple)))) (|> (do check.monad [[@var :var:] check.var _ (/.tuple (type (:var: input/0 input/1 input/2)))] (in false)) (check.result check.fresh_context) - (exception.otherwise (text.contains? (value@ exception.#label /.non_tuple)))) + (exception.otherwise (text.contains? (the exception.#label /.non_tuple)))) (|> (do check.monad [_ (/.tuple (type (input/0 input/1 input/2)))] (in false)) (check.result check.fresh_context) - (exception.otherwise (text.contains? (value@ exception.#label /.non_tuple)))) + (exception.otherwise (text.contains? (the exception.#label /.non_tuple)))) (|> (do check.monad [[@var :var:] check.var _ (check.bind input/0 @var) _ (/.tuple (type (:var: input/1 input/2)))] (in false)) (check.result check.fresh_context) - (exception.otherwise (text.contains? (value@ exception.#label /.non_tuple)))))) + (exception.otherwise (text.contains? (the exception.#label /.non_tuple)))))) ))) (def: (test|case lux [module/0 name/0] [input/0 simple/0] [input/1 simple/1] [input/2 simple/2] [$binding/0 $binding/1 $binding/2] [output/0 body/0] [output/1 body/1] [bit/0 nat/0]) @@ -262,7 +262,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label //coverage.redundancy))))))] + (exception.otherwise (text.contains? (the exception.#label //coverage.redundancy))))))] (and (redundant? (` []) (list [(` []) body/0] [(` []) body/0])) @@ -530,7 +530,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.empty_branches))))) + (exception.otherwise (text.contains? (the exception.#label /.empty_branches))))) (_.cover [/.non_exhaustive] (let [non_exhaustive? (: (-> (List [Code Code]) Bit) (function (_ branches) @@ -542,7 +542,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.non_exhaustive))))))] + (exception.otherwise (text.contains? (the exception.#label /.non_exhaustive))))))] (and (non_exhaustive? (list [simple/0 body/0])) (not (non_exhaustive? (list [simple/0 body/0] [$binding/0 body/0])))))) @@ -557,7 +557,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.invalid))))))] + (exception.otherwise (text.contains? (the exception.#label /.invalid))))))] (and (invalid? (list [(` ((~ extension/0) (~ $binding/0) (~ $binding/1) (~ $binding/2))) body/0])) (invalid? (list [(` {(~ extension/0) (~ $binding/0) (~ $binding/1) (~ $binding/2)}) @@ -590,7 +590,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.sum_has_no_case)))))) + (exception.otherwise (text.contains? (the exception.#label /.sum_has_no_case)))))) (_.cover [/.mismatch] (let [slot/0 (%.code $binding/0) slot/1 (%.code $binding/1) @@ -615,7 +615,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.mismatch)))) + (exception.otherwise (text.contains? (the exception.#label /.mismatch)))) (|> (do //phase.monad [_ (//module.declare_labels true slots/* false :record:) analysis (|> (` (~ simple/0)) @@ -630,7 +630,7 @@ (//module.with 0 module/0) (//phase#each (|>> product.right product.right)) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.mismatch))))))) + (exception.otherwise (text.contains? (the exception.#label /.mismatch))))))) ..test|tuple )))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux index 546aa1c39..203c7a46f 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/complex.lux @@ -84,7 +84,7 @@ false {try.#Failure error} - (text.contains? (value@ exception.#label exception) error))) + (text.contains? (the exception.#label exception) error))) (def: simple_parameter (Random [Type Code]) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux index a5f5953e6..dfc9ba28d 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux @@ -191,7 +191,7 @@ (//module.with 0 module/0) (//phase#each product.right) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.cannot_analyse))))) + (exception.otherwise (text.contains? (the exception.#label /.cannot_analyse))))) ))) (def: test|apply @@ -247,7 +247,7 @@ (//module.with 0 module/0) (//phase#each product.right) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.cannot_apply))))) + (exception.otherwise (text.contains? (the exception.#label /.cannot_apply))))) ))) (def: .public test diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux index af84eb488..3c215c00b 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/reference.lux @@ -173,7 +173,7 @@ (//module.with 0 expected_module) (//phase#each product.right) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.foreign_module_has_not_been_imported))) + (exception.otherwise (text.contains? (the exception.#label /.foreign_module_has_not_been_imported))) )))] (and (scenario expected_type {.#Definition [#1 expected_type []]}) (scenario .Type {.#Type [#1 expected_type @@ -192,7 +192,7 @@ (//module.with 0 expected_module) (//phase#each product.right) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.definition_has_not_been_exported))) + (exception.otherwise (text.contains? (the exception.#label /.definition_has_not_been_exported))) )))] (and (scenario expected_type {.#Definition [#0 expected_type []]}) (scenario .Type {.#Type [#0 expected_type @@ -211,7 +211,7 @@ (//module.with 0 expected_module) (//phase#each product.right) (//phase.result state) - (exception.otherwise (text.contains? (value@ exception.#label /.labels_are_not_definitions))))))] + (exception.otherwise (text.contains? (the exception.#label /.labels_are_not_definitions))))))] (and (scenario expected_type {.#Tag [#1 expected_type (list) 0]}) (scenario expected_type {.#Slot [#1 expected_type (list) 0]})))) )))) diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux index 2d5073ecf..55a187083 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux @@ -1,30 +1,30 @@ (.using - [lux "*" - ["_" test {"+" Test}] - [abstract - ["[0]" monad {"+" do}]] - [math - ["[0]" random {"+" Random}]] - [control - [pipe {"+" case>}] - ["[0]" try]] - [data - ["[0]" product] - ["[0]" text - ["%" format {"+" format}]] - [number - ["n" nat]] - [collection - ["[0]" list ("[1]#[0]" functor mix)] - ["[0]" dictionary {"+" Dictionary}]]]] - [\\ - ["[0]" / - [//// - ["[0]" analysis] - ["[0]" synthesis {"+" Side Member Path Synthesis}] - [/// - [reference - ["[0]" variable]]]]]]) + [lux "*" + ["_" test {"+" Test}] + [abstract + ["[0]" monad {"+" do}]] + [math + ["[0]" random {"+" Random}]] + [control + [pipe {"+" case>}] + ["[0]" try]] + [data + ["[0]" product] + ["[0]" text + ["%" format {"+" format}]] + [number + ["n" nat]] + [collection + ["[0]" list ("[1]#[0]" functor mix)] + ["[0]" dictionary {"+" Dictionary}]]]] + [\\ + ["[0]" / + [//// + ["[0]" analysis] + ["[0]" synthesis {"+" Side Member Path Synthesis}] + [/// + [reference + ["[0]" variable]]]]]]) (template: (!expect <pattern> <value>) (case <value> @@ -70,9 +70,9 @@ (do ! [let? random.bit [expected_input actual_input] (..primitive_scenario context) - .let [fake_register (n.+ (value@ #redundants context) - (dictionary.size (value@ #necessary context)))] - [expected_output actual_output] (scenario (revised@ #redundants ++ context))] + .let [fake_register (n.+ (the #redundants context) + (dictionary.size (the #necessary context)))] + [expected_output actual_output] (scenario (revised #redundants ++ context))] (in [(synthesis.branch/case [expected_input {synthesis.#Seq {synthesis.#Pop} {synthesis.#Then expected_output}}]) @@ -95,7 +95,7 @@ (def: (tuple_scenario context) (Scenario Synthesis) - (let [registers (dictionary.entries (value@ #necessary context))] + (let [registers (dictionary.entries (the #necessary context))] (# random.monad in [(synthesis.tuple (list#each (|>> product.left synthesis.variable/local) registers)) (synthesis.tuple (list#each (|>> product.right synthesis.variable/local) registers))]))) @@ -110,10 +110,10 @@ (do random.monad [_ (in []) [expected_input actual_input] (scenario context) - .let [real_register (dictionary.size (value@ #necessary context)) - fake_register (n.+ (value@ #redundants context) - (dictionary.size (value@ #necessary context)))] - [expected_output actual_output] (scenario (revised@ #necessary (dictionary.has real_register fake_register) context))] + .let [real_register (dictionary.size (the #necessary context)) + fake_register (n.+ (the #redundants context) + (dictionary.size (the #necessary context)))] + [expected_output actual_output] (scenario (revised #necessary (dictionary.has real_register fake_register) context))] (in [(synthesis.branch/let [expected_input real_register expected_output]) (synthesis.branch/let [actual_input fake_register actual_output])]))) @@ -166,10 +166,10 @@ {synthesis.#Then actual_then}}])) (do [! random.monad] [_ (in []) - .let [real_register (dictionary.size (value@ #necessary context)) - fake_register (n.+ (value@ #redundants context) - (dictionary.size (value@ #necessary context)))] - [expected_then actual_then] (scenario (revised@ #necessary (dictionary.has real_register fake_register) context))] + .let [real_register (dictionary.size (the #necessary context)) + fake_register (n.+ (the #redundants context) + (dictionary.size (the #necessary context)))] + [expected_then actual_then] (scenario (revised #necessary (dictionary.has real_register fake_register) context))] (in [{synthesis.#Seq {synthesis.#Bind real_register} {synthesis.#Seq {synthesis.#Pop} {synthesis.#Then expected_then}}} @@ -238,19 +238,19 @@ (-> (Scenario Synthesis) (Scenario Synthesis)) (do [! random.monad] [_ (in []) - .let [real_start (dictionary.size (value@ #necessary context)) - fake_start (n.+ (value@ #redundants context) + .let [real_start (dictionary.size (the #necessary context)) + fake_start (n.+ (the #redundants context) real_start)] inits (random.list ..scope_arity (scenario context)) - [expected_iteration actual_iteration] (scenario (revised@ #necessary - (function (_ necessary) - (list#mix (function (_ [idx _] context) - (dictionary.has (n.+ real_start idx) - (n.+ fake_start idx) - context)) - necessary - (list.enumeration inits))) - context))] + [expected_iteration actual_iteration] (scenario (revised #necessary + (function (_ necessary) + (list#mix (function (_ [idx _] context) + (dictionary.has (n.+ real_start idx) + (n.+ fake_start idx) + context)) + necessary + (list.enumeration inits))) + context))] (in [(synthesis.loop/scope [real_start (list#each product.left inits) expected_iteration]) (synthesis.loop/scope [fake_start (list#each product.right inits) actual_iteration])]))) @@ -273,7 +273,7 @@ (-> (Scenario Synthesis) (Scenario Synthesis)) (do [! random.monad] [_ (in []) - .let [registers (dictionary.entries (value@ #necessary context)) + .let [registers (dictionary.entries (the #necessary context)) expected_environment (list#each (|>> product.left {variable.#Local}) registers) actual_environment (list#each (|>> product.right {variable.#Local}) registers)] [expected_body actual_body] (..primitive_scenario context)] diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive.lux b/stdlib/source/test/lux/tool/compiler/meta/archive.lux index 3afb5c406..7cbd76e8a 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/archive.lux @@ -53,7 +53,7 @@ [module/0 (random.ascii/lower 1) module/1 (random.ascii/lower 2) signature $/signature.random - .let [version (value@ /signature.#version signature)] + .let [version (the /signature.#version signature)] fake_version (random.only (|>> (n.= version) not) random.nat) content/0 random.nat content/1 (random.only (|>> (n.= content/0) not) random.nat) diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive/module/descriptor.lux b/stdlib/source/test/lux/tool/compiler/meta/archive/module/descriptor.lux index 95a290b11..37c1af940 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/archive/module/descriptor.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/archive/module/descriptor.lux @@ -54,6 +54,6 @@ (|> expected (binary.result /.writer) (<binary>.result /.parser) - (try#each (|>> (# /.equivalence = (with@ /.#state {.#Cached} expected)))) + (try#each (|>> (# /.equivalence = (has /.#state {.#Cached} expected)))) (try.else false))) ))) diff --git a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux index 893f1da72..b26e16b6a 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/archive/registry.lux @@ -71,9 +71,9 @@ (let [[@it registry] (/.resource mandatory? expected_dependencies /.empty)] (case (sequence.list (/.artifacts registry)) (^ (list [artifact actual_dependencies])) - (and (same? @it (value@ artifact.#id artifact)) - (same? mandatory? (value@ artifact.#mandatory? artifact)) - (tagged? category.#Anonymous (value@ artifact.#category artifact)) + (and (same? @it (the artifact.#id artifact)) + (same? mandatory? (the artifact.#mandatory? artifact)) + (tagged? category.#Anonymous (the artifact.#category artifact)) (same? expected_dependencies actual_dependencies)) _ @@ -91,9 +91,9 @@ false) (case (sequence.list (/.artifacts registry)) (^ (list [artifact actual_dependencies])) - (and (same? @it (value@ artifact.#id artifact)) - (same? mandatory? (value@ artifact.#mandatory? artifact)) - (case (value@ artifact.#category artifact) + (and (same? @it (the artifact.#id artifact)) + (same? mandatory? (the artifact.#mandatory? artifact)) + (case (the artifact.#category artifact) {<tag> actual_name} (same? <expected> actual_name) @@ -145,7 +145,7 @@ it (/.artifacts registry)] (and (n.= expected_amount (sequence.size it)) (list.every? (function (_ [@it [it dependencies]]) - (same? @it (value@ artifact.#id it))) + (same? @it (the artifact.#id it))) (list.zipped/2 (sequence.list ids) (sequence.list it))) (# (list.equivalence <equivalence>) = expected/* (<query> registry))))] diff --git a/stdlib/source/test/lux/tool/compiler/meta/cache/purge.lux b/stdlib/source/test/lux/tool/compiler/meta/cache/purge.lux index 9a190448a..700cf75d7 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cache/purge.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cache/purge.lux @@ -52,14 +52,14 @@ content/0 ($binary.random 1) name/1 (random.ascii/lower 2) module/1 (|> ($module.random random.nat) - (# ! each (with@ [module.#descriptor descriptor.#references] - (set.of_list text.hash (list name/0))))) + (# ! each (has [module.#descriptor descriptor.#references] + (set.of_list text.hash (list name/0))))) content/1 ($binary.random 2) - .let [id/0 (value@ module.#id module/0) - id/1 (value@ module.#id module/1) - input [////.#module (value@ descriptor.#name descriptor) - ////.#file (value@ descriptor.#file descriptor) - ////.#hash (value@ descriptor.#hash descriptor) + .let [id/0 (the module.#id module/0) + id/1 (the module.#id module/1) + input [////.#module (the descriptor.#name descriptor) + ////.#file (the descriptor.#file descriptor) + ////.#hash (the descriptor.#hash descriptor) ////.#code source_code] / "/" fs (file.mock /)] @@ -69,9 +69,9 @@ ($_ _.and (_.cover [/.valid?] (and (/.valid? descriptor input) - (not (/.valid? descriptor (with@ ////.#module source_code input))) - (not (/.valid? descriptor (with@ ////.#file source_code input))) - (not (/.valid? descriptor (revised@ ////.#hash ++ input))))) + (not (/.valid? descriptor (has ////.#module source_code input))) + (not (/.valid? descriptor (has ////.#file source_code input))) + (not (/.valid? descriptor (revised ////.#hash ++ input))))) )) (_.for [/.Purge] ($_ _.and diff --git a/stdlib/source/test/lux/tool/compiler/meta/cli.lux b/stdlib/source/test/lux/tool/compiler/meta/cli.lux index b90b8a0b3..48aa9c079 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/cli.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/cli.lux @@ -63,7 +63,7 @@ (<cli>.result /.service) (try#each (|>> (case> {/.#Compilation it} (|> it - (value@ <slot>) + (the <slot>) <?>) _ @@ -85,7 +85,7 @@ (<cli>.result /.service) (try#each (|>> (case> {/.#Interpretation it} (|> it - (value@ <slot>) + (the <slot>) <?>) _ diff --git a/stdlib/source/test/lux/tool/compiler/meta/context.lux b/stdlib/source/test/lux/tool/compiler/meta/context.lux index 1d9d5b67d..30e6aa280 100644 --- a/stdlib/source/test/lux/tool/compiler/meta/context.lux +++ b/stdlib/source/test/lux/tool/compiler/meta/context.lux @@ -43,7 +43,7 @@ maximum (list.size contexts)] (`` (and (~~ (template [<amount> <slot>] [(|> contexts - (list#each (value@ <slot>)) + (list#each (the <slot>)) (set.of_list text.hash) set.size (n.= <amount>))] diff --git a/stdlib/source/test/lux/type/abstract.lux b/stdlib/source/test/lux/type/abstract.lux index 85b2a89cd..770fc60a4 100644 --- a/stdlib/source/test/lux/type/abstract.lux +++ b/stdlib/source/test/lux/type/abstract.lux @@ -1,34 +1,34 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - ["[0]" meta] - [abstract - [monad {"+" do}]] - [control - ["[0]" try] - ["[0]" exception] - [parser - ["<[0]>" code]]] - [data - ["[0]" text ("[1]#[0]" equivalence)]] - ["[0]" macro - [syntax {"+" syntax:}] - ["[0]" code] - ["[0]" template]] - ["[0]" math - ["[0]" random] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + ["[0]" meta] + [abstract + [monad {"+" do}]] + [control + ["[0]" try] + ["[0]" exception] + [parser + ["<[0]>" code]]] + [data + ["[0]" text ("[1]#[0]" equivalence)]] + ["[0]" macro + [syntax {"+" syntax:}] + ["[0]" code] + ["[0]" template]] + ["[0]" math + ["[0]" random] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) (template.with_locals [g!Foo g!Bar] (as_is (template [<syntax> <meta>] [(syntax: (<syntax> []) (do meta.monad [frame <meta>] - (in (list (code.text (value@ /.#name frame))))))] + (in (list (code.text (the /.#name frame))))))] [current /.current] [specific (/.specific (template.text [g!Foo]))] diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux index 818441adf..a99a19f5d 100644 --- a/stdlib/source/test/lux/type/check.lux +++ b/stdlib/source/test/lux/type/check.lux @@ -1,33 +1,33 @@ (.using - [library - [lux {"-" type symbol} - ["_" test {"+" Test}] - ["[0]" type ("[1]#[0]" equivalence)] - [abstract - ["[0]" monad {"+" do}] - [\\specification - ["$[0]" functor {"+" Injection Comparison}] - ["$[0]" apply] - ["$[0]" monad]]] - [control - [pipe {"+" case>}] - ["[0]" function] - ["[0]" try] - ["[0]" exception {"+" exception:}]] - [data - ["[0]" bit ("[1]#[0]" equivalence)] - ["[0]" product] - ["[0]" text ("[1]#[0]" equivalence) - ["%" format {"+" format}]] - [collection - ["[0]" list ("[1]#[0]" functor monoid)] - ["[0]" set]]] - [math - ["[0]" random {"+" Random} ("[1]#[0]" monad)] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux {"-" type symbol} + ["_" test {"+" Test}] + ["[0]" type ("[1]#[0]" equivalence)] + [abstract + ["[0]" monad {"+" do}] + [\\specification + ["$[0]" functor {"+" Injection Comparison}] + ["$[0]" apply] + ["$[0]" monad]]] + [control + [pipe {"+" case>}] + ["[0]" function] + ["[0]" try] + ["[0]" exception {"+" exception:}]] + [data + ["[0]" bit ("[1]#[0]" equivalence)] + ["[0]" product] + ["[0]" text ("[1]#[0]" equivalence) + ["%" format {"+" format}]] + [collection + ["[0]" list ("[1]#[0]" functor monoid)] + ["[0]" set]]] + [math + ["[0]" random {"+" Random} ("[1]#[0]" monad)] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) ... TODO: Remove the following 3 definitions ASAP. //.type already exists... (def: short @@ -189,7 +189,7 @@ (scenario {.#Ex ex} left) ))) (_.cover [/.invalid_type_application] - (let [scenario (scenario (text.contains? (value@ exception.#label /.invalid_type_application)))] + (let [scenario (scenario (text.contains? (the exception.#label /.invalid_type_application)))] (scenario {.#Apply left right} left))))) ))) @@ -326,9 +326,9 @@ Test ($_ _.and (_.cover [/.fresh_context] - (and (n.= 0 (value@ .#var_counter /.fresh_context)) - (n.= 0 (value@ .#ex_counter /.fresh_context)) - (list.empty? (value@ .#var_bindings /.fresh_context)))) + (and (n.= 0 (the .#var_counter /.fresh_context)) + (n.= 0 (the .#ex_counter /.fresh_context)) + (list.empty? (the .#var_bindings /.fresh_context)))) (_.cover [/.context] (and (case (/.result /.fresh_context /.context) {try.#Success actual} @@ -341,9 +341,9 @@ [_ /.var] /.context)) {try.#Success actual} - (and (n.= 1 (value@ .#var_counter actual)) - (n.= 0 (value@ .#ex_counter actual)) - (n.= 1 (list.size (value@ .#var_bindings actual)))) + (and (n.= 1 (the .#var_counter actual)) + (n.= 0 (the .#ex_counter actual)) + (n.= 1 (list.size (the .#var_bindings actual)))) {try.#Failure error} false))) @@ -353,9 +353,9 @@ [_ /.existential] /.context)) {try.#Success actual} - (and (n.= 0 (value@ .#var_counter actual)) - (n.= 1 (value@ .#ex_counter actual)) - (n.= 0 (list.size (value@ .#var_bindings actual)))) + (and (n.= 0 (the .#var_counter actual)) + (n.= 1 (the .#ex_counter actual)) + (n.= 0 (list.size (the .#var_bindings actual)))) {try.#Failure error} false)) diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux index 4240376fe..d378cb0ee 100644 --- a/stdlib/source/test/lux/world/input/keyboard.lux +++ b/stdlib/source/test/lux/world/input/keyboard.lux @@ -1,24 +1,24 @@ (.using - [library - [lux "*" - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" maybe]] - [data - ["[0]" bit ("[1]#[0]" equivalence)] - [collection - ["[0]" list] - ["[0]" set {"+" Set}]]] - [macro - ["[0]" template]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat]]]]] - [\\library - ["[0]" /]]) + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" maybe]] + [data + ["[0]" bit ("[1]#[0]" equivalence)] + [collection + ["[0]" list] + ["[0]" set {"+" Set}]]] + [macro + ["[0]" template]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) (with_expansions [<groups> (as_is [keys/commands [/.back_space @@ -160,8 +160,8 @@ [key ..random .let [sample (<function> key)]] (_.cover [<function>] - (and (bit#= <pressed?> (value@ /.#pressed? sample)) - (n.= key (value@ /.#input sample)))))] + (and (bit#= <pressed?> (the /.#pressed? sample)) + (n.= key (the /.#input sample)))))] [#0 /.release] [#1 /.press] diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index fdc32834b..919f7249e 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -39,7 +39,7 @@ {try.#Success response} (|> response product.right - (value@ //.#body) + (the //.#body) (function.on {.#None}) (# ! each (|>> (do> try.monad [] |