aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2021-09-10 01:21:23 -0400
committerEduardo Julian2021-09-10 01:21:23 -0400
commitcd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 (patch)
treeaf6366578f98f1a8e551f4da9f3ad230fd63a4dd /stdlib/source/test/aedifex
parentef77466323f85a3d1b65b46a3deb93652ef22085 (diff)
Migrated variants to the new syntax.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/version/value.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux4
-rw-r--r--stdlib/source/test/aedifex/cache.lux10
-rw-r--r--stdlib/source/test/aedifex/cli.lux14
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux12
-rw-r--r--stdlib/source/test/aedifex/command/build.lux46
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux8
-rw-r--r--stdlib/source/test/aedifex/command/install.lux2
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux6
-rw-r--r--stdlib/source/test/aedifex/command/test.lux12
-rw-r--r--stdlib/source/test/aedifex/command/version.lux4
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux4
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux108
-rw-r--r--stdlib/source/test/aedifex/dependency/status.lux2
-rw-r--r--stdlib/source/test/aedifex/hash.lux12
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux8
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux8
-rw-r--r--stdlib/source/test/aedifex/package.lux18
-rw-r--r--stdlib/source/test/aedifex/parser.lux4
-rw-r--r--stdlib/source/test/aedifex/pom.lux10
-rw-r--r--stdlib/source/test/aedifex/project.lux8
-rw-r--r--stdlib/source/test/aedifex/repository.lux6
-rw-r--r--stdlib/source/test/aedifex/repository/local.lux4
-rw-r--r--stdlib/source/test/aedifex/repository/remote.lux16
24 files changed, 164 insertions, 164 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux
index bccd76fac..8daf8635c 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux
@@ -54,7 +54,7 @@
(/.format (with@ #/.snapshot #///.Local sample)))
remote_format (/.format [#/.version (format version /.snapshot)
- #/.snapshot (#///.Remote stamp)])
+ #/.snapshot {#///.Remote stamp}])
remote!
(and (text.starts_with? (format version (///time.format (value@ #///stamp.time stamp)))
remote_format)
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index e76cf4259..77c312380 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -59,10 +59,10 @@
(try.else false)))
(_.cover [/.year_is_out_of_range]
(case (/.date candidate)
- (#try.Success date)
+ {#try.Success date}
(same? candidate (/.value date))
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.year_is_out_of_range error)))
(_.cover [/.epoch]
(date\= date.epoch (/.value /.epoch)))
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index fc5efcf8f..338feb5fa 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -75,7 +75,7 @@
content ..content]
(in [[#//dependency.artifact identity
#//dependency.type type]
- (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))
+ (with@ #//package.origin {#//repository/origin.Remote ""} (//package.local pom content))])))
(def: resolution
(Random Resolution)
@@ -89,13 +89,13 @@
[pom (random.one (function (_ [identity profile pom])
(|> profile
(with@ #//.dependencies (set.empty //dependency.hash))
- (with@ #//.identity (#.Some (value@ #//dependency.artifact dependency)))
+ (with@ #//.identity {#.Some (value@ #//dependency.artifact dependency)})
//pom.write
try.maybe))
..profile)
content ..content]
(in [dependency
- (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))))]
+ (with@ #//package.origin {#//repository/origin.Remote ""} (//package.local pom content))])))))]
(in (dictionary.of_list //dependency.hash (list& [main_dependency main_package] dependencies)))))
(def: singular
@@ -116,7 +116,7 @@
[_ wrote!
actual_package read!]
(in (\ //package.equivalence =
- (with@ #//package.origin (#//repository/origin.Local "") expected_package)
+ (with@ #//package.origin {#//repository/origin.Local ""} expected_package)
actual_package)))))))))
(def: plural
@@ -138,7 +138,7 @@
actual read!]
(in (\ //dependency/resolution.equivalence =
(\ dictionary.functor each
- (with@ #//package.origin (#//repository/origin.Local ""))
+ (with@ #//package.origin {#//repository/origin.Local ""})
expected)
actual)))))))))
diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux
index 9cc55fd2c..e41f3e44c 100644
--- a/stdlib/source/test/aedifex/cli.lux
+++ b/stdlib/source/test/aedifex/cli.lux
@@ -64,9 +64,9 @@
#/.POM (list "pom")
#/.Dependencies (list "deps")
#/.Install (list "install")
- (#/.Deploy repository [user password]) (list "deploy" repository user password)
- (#/.Compilation compilation) (..compilation_format compilation)
- (#/.Auto compilation) (list& "auto" (..compilation_format compilation))))
+ {#/.Deploy repository [user password]} (list "deploy" repository user password)
+ {#/.Compilation compilation} (..compilation_format compilation)
+ {#/.Auto compilation} (list& "auto" (..compilation_format compilation))))
(def: without_profile
Test
@@ -76,11 +76,11 @@
(|> expected
..format
(cli.result /.command)
- (case> (#try.Success [names actual])
+ (case> {#try.Success [names actual]}
(and (\ (list.equivalence text.equivalence) = (list //.default) names)
(\ /.equivalence = expected actual))
- (#try.Failure error)
+ {#try.Failure error}
false)))))
(def: with_profile
@@ -93,11 +93,11 @@
..format
(list& "with" expected_profile)
(cli.result /.command)
- (case> (#try.Success [actual_profile actual_command])
+ (case> {#try.Success [actual_profile actual_command]}
(and (\ (list.equivalence text.equivalence) = (list expected_profile //.default) actual_profile)
(\ /.equivalence = expected_command actual_command))
- (#try.Failure error)
+ {#try.Failure error}
false)))))
(def: .public test
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 4511d8a03..57aca92d2 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -55,7 +55,7 @@
(do [! async.monad]
[[_ actual_runs] (async.future (atom.update! ++ @runs))]
(if (n.= expected_runs actual_runs)
- (in (#try.Failure end_signal))
+ (in {#try.Failure end_signal})
(do (try.with !)
[_ (\ fs write (\ utf8.codec encoded (%.nat actual_runs)) dummy_file)
_ (\ fs modify
@@ -79,7 +79,7 @@
with_target (: (-> Profile Profile)
(with@ #///.target target))
with_program (: (-> Profile Profile)
- (with@ #///.program (#.Some program)))
+ (with@ #///.program {#.Some program}))
profile (|> empty_profile
with_program
@@ -110,17 +110,17 @@
fs
(shell.async ($build.good_shell []))
resolution)
- (\ ! each (|>> (case> (#try.Failure error)
+ (\ ! each (|>> (case> {#try.Failure error}
(same? end_signal error)
- (#try.Success _)
+ {#try.Success _}
false))))
correct_number_of_runs! (|> @runs
atom.read!
async.future
(\ ! each (n.= expected_runs)))]
- (in (#try.Success (and correct_number_of_runs!
- no_dangling_process!)))))]
+ (in {#try.Success (and correct_number_of_runs!
+ no_dangling_process!)})))]
(_.cover' [/.do!]
(try.else false verdict))))
))))
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index c856b11f5..1376d440a 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -41,7 +41,7 @@
(-> Any (Shell IO))
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
- (#try.Success
+ {#try.Success
(: (shell.Mock [])
(implementation
(def: (on_read state)
@@ -49,17 +49,17 @@
(def: (on_error state)
(exception.except shell.no_more_output []))
(def: (on_write input state)
- (#try.Failure "on_write"))
+ {#try.Failure "on_write"})
(def: (on_destroy state)
- (#try.Failure "on_destroy"))
+ {#try.Failure "on_destroy"})
(def: (on_await state)
- (#try.Success [state shell.normal]))))))))
+ {#try.Success [state shell.normal]})))})))
(def: .public bad_shell
(-> Any (Shell IO))
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
- (#try.Success
+ {#try.Success
(: (shell.Mock [])
(implementation
(def: (on_read state)
@@ -67,43 +67,43 @@
(def: (on_error state)
(exception.except shell.no_more_output []))
(def: (on_write input state)
- (#try.Failure "on_write"))
+ {#try.Failure "on_write"})
(def: (on_destroy state)
- (#try.Failure "on_destroy"))
+ {#try.Failure "on_destroy"})
(def: (on_await state)
- (#try.Success [state shell.error]))))))))
+ {#try.Success [state shell.error]})))})))
(def: .public (reader_shell error?)
(-> Bit (-> (List Text) (Shell IO)))
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
- (#try.Success
+ {#try.Success
(: (shell.Mock (List Text))
(implementation
(def: (on_read state)
(if error?
(exception.except shell.no_more_output [])
(case state
- (#.Item head tail)
- (#try.Success [tail head])
+ {#.Item head tail}
+ {#try.Success [tail head]}
#.End
(exception.except shell.no_more_output []))))
(def: (on_error state)
(if error?
(case state
- (#.Item head tail)
- (#try.Success [tail head])
+ {#.Item head tail}
+ {#try.Success [tail head]}
#.End
(exception.except shell.no_more_output []))
(exception.except shell.no_more_output [])))
(def: (on_write input state)
- (#try.Failure "on_write"))
+ {#try.Failure "on_write"})
(def: (on_destroy state)
- (#try.Failure "on_destroy"))
+ {#try.Failure "on_destroy"})
(def: (on_await state)
- (#try.Success [state shell.error]))))))))
+ {#try.Success [state shell.error]})))})))
(def: compiler
(Random Dependency)
@@ -153,7 +153,7 @@
with_target (: (-> Profile Profile)
(with@ #///.target target))
with_program (: (-> Profile Profile)
- (with@ #///.program (#.Some program)))
+ (with@ #///.program {#.Some program}))
profile (|> empty_profile
with_program
@@ -164,19 +164,19 @@
(with_target empty_profile))]
(_.cover' [/.no_specified_program]
(case outcome
- (#try.Success _)
+ {#try.Success _}
false
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.no_specified_program error)))))
(in (do async.monad
[outcome (/.do! (@version.echo "") (program.async (program.mock environment.empty home working_directory)) fs shell ///dependency/resolution.empty profile)]
(_.cover' [/.Compiler /.no_available_compiler]
(case outcome
- (#try.Success _)
+ {#try.Success _}
false
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.no_available_compiler error)))))
(do !
[.let [console (@version.echo "")]
@@ -232,10 +232,10 @@
actual/1 (\ console read_line [])
actual/2 (\ console read_line [])
end! (|> (\ console read_line [])
- (\ ! each (|>> (case> (#try.Failure error)
+ (\ ! each (|>> (case> {#try.Failure error}
true
- (#try.Success _)
+ {#try.Success _}
false)
#try.Success)))]
(in (and (text\= expected/0 actual/0)
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 3d563f540..8cf0ea05c 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -73,22 +73,22 @@
#///dependency.type ///artifact/type.lux_library]
dependee_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some dependee_artifact))
+ (with@ #///.identity {#.Some dependee_artifact})
///pom.write
try.trusted)
depender_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some depender_artifact))
+ (with@ #///.identity {#.Some depender_artifact})
(with@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
dependee_package (|> dependee_package
- (with@ #///package.origin (#///repository/origin.Remote ""))
+ (with@ #///package.origin {#///repository/origin.Remote ""})
(with@ #///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.origin {#///repository/origin.Remote ""})
(with@ #///package.pom [depender_pom
(|> depender_pom (\ xml.codec encoded) (\ utf8.codec encoded))
#///dependency/status.Unverified]))
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index 8ef29ec92..ac1a87be1 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -65,7 +65,7 @@
(<| (_.covering /._)
(do [! random.monad]
[identity $artifact.random
- sample (\ ! each (with@ #///.identity (#.Some identity))
+ sample (\ ! each (with@ #///.identity {#.Some identity})
$profile.random)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 80676974b..ac080c966 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -40,7 +40,7 @@
[.let [console (@version.echo "")]
outcome (/.do! console fs sample)]
(case outcome
- (#try.Success _)
+ {#try.Success _}
(do !
[verdict (do ///action.monad
[expected (|> (///pom.write sample)
@@ -60,10 +60,10 @@
(_.cover' [/.do! /.success]
(try.else false verdict)))
- (#try.Failure error)
+ {#try.Failure error}
(_.cover' [/.do!]
(case (value@ #///.identity sample)
- (#.Some _)
+ {#.Some _}
false
#.None
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index bbcb582b1..19ae5cd70 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -52,7 +52,7 @@
with_target (: (-> Profile Profile)
(with@ #///.target target))
with_test (: (-> Profile Profile)
- (with@ #///.test (#.Some test)))
+ (with@ #///.test {#.Some test}))
profile (|> empty_profile
with_test
@@ -83,7 +83,7 @@
[verdict (do ///action.monad
[.let [bad_shell (shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
- (#try.Success
+ {#try.Success
(: (shell.Mock [])
(implementation
(def: (on_read state)
@@ -91,13 +91,13 @@
(def: (on_error state)
(exception.except shell.no_more_output []))
(def: (on_write input state)
- (#try.Failure "on_write"))
+ {#try.Failure "on_write"})
(def: (on_destroy state)
- (#try.Failure "on_destroy"))
+ {#try.Failure "on_destroy"})
(def: (on_await state)
- (#try.Success [state (if (list.any? (text\= "build") actual_arguments)
+ {#try.Success [state (if (list.any? (text\= "build") actual_arguments)
shell.normal
- shell.error)]))))))
+ shell.error)]})))})
[])]
_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async bad_shell) resolution
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index 1b2b0aa53..6cd59b3a5 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -50,11 +50,11 @@
(exception.except ..console_is_closed! [])))
(def: (on_write input [open? state])
(if open?
- (#try.Success [open? (format state input)])
+ {#try.Success [open? (format state input)]}
(exception.except ..console_is_closed! [])))
(def: (on_close [open? buffer])
(if open?
- (#try.Success [false buffer])
+ {#try.Success [false buffer]}
(exception.except ..console_is_closed! []))))
(def: .public echo
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index 5b7869eab..7e137443b 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -68,12 +68,12 @@
(do io.monad
[_ (: (IO Any)
(case [method input]
- [#@http.Put (#.Some input)]
+ [#@http.Put {#.Some input}]
(atom.update! (dictionary.has url input) cache)
_
(in [])))]
- (in (#try.Success ..good_upload))))))
+ (in {#try.Success ..good_upload})))))
(def: (verify_one expected_deployments address package cache expected_artifact actual_artifact)
(-> Nat URL Package (Dictionary URL Binary) Artifact Artifact Bit)
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 2fe39286d..69867d5f8 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -92,9 +92,9 @@
(def: the_description
"[0]")
(def: (on_download uri state)
- (#try.Failure "NOPE"))
+ {#try.Failure "NOPE"})
(def: (on_upload uri binary state)
- (#try.Failure "NOPE"))))
+ {#try.Failure "NOPE"})))
(def: .public (single artifact package)
(-> Artifact Package (Mock Any))
@@ -115,28 +115,28 @@
(\ xml.codec encoded)
(\ utf8.codec encoded)))]
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- (#try.Success [state library])
+ {#try.Success [state library]}
(text.ends_with? ..lux_sha-1 uri)
- (#try.Success [state (..sha-1 library)])
+ {#try.Success [state (..sha-1 library)]}
(text.ends_with? ..lux_md5 uri)
- (#try.Success [state (..md5 library)])
+ {#try.Success [state (..md5 library)]}
(text.ends_with? ///artifact/extension.pom uri)
- (#try.Success [state pom])
+ {#try.Success [state pom]}
(text.ends_with? ..pom_sha-1 uri)
- (#try.Success [state (..sha-1 pom)])
+ {#try.Success [state (..sha-1 pom)]}
(text.ends_with? ..pom_md5 uri)
- (#try.Success [state (..md5 pom)])
+ {#try.Success [state (..md5 pom)]}
... else
- (#try.Failure "NOPE")))
- (#try.Failure "NOPE")))
+ {#try.Failure "NOPE"}))
+ {#try.Failure "NOPE"}))
(def: (on_upload uri binary state)
- (#try.Failure "NOPE")))))
+ {#try.Failure "NOPE"}))))
(def: (bad_sha-1 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
@@ -146,50 +146,50 @@
(def: (on_download uri state)
(if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
- product.left)])
+ product.left)]}
(text.ends_with? ..lux_sha-1 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
product.left
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..lux_md5 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
product.left
- ..md5)])
+ ..md5)]}
(text.ends_with? ///artifact/extension.pom uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
- (\ utf8.codec encoded))])
+ (\ utf8.codec encoded))]}
(text.ends_with? ..pom_sha-1 uri)
- (#try.Success [state (|> dummy_package
+ {#try.Success [state (|> dummy_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..pom_md5 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..md5)])
+ ..md5)]}
... else
- (#try.Failure "NOPE"))
- (#try.Failure "NOPE")))
+ {#try.Failure "NOPE"})
+ {#try.Failure "NOPE"}))
(def: (on_upload uri binary state)
- (#try.Failure "NOPE"))))
+ {#try.Failure "NOPE"})))
(def: (bad_md5 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
@@ -199,50 +199,50 @@
(def: (on_download uri state)
(if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
- product.left)])
+ product.left)]}
(text.ends_with? ..lux_sha-1 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
product.left
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..lux_md5 uri)
- (#try.Success [state (|> dummy_package
+ {#try.Success [state (|> dummy_package
(value@ #///package.library)
product.left
- ..md5)])
+ ..md5)]}
(text.ends_with? ///artifact/extension.pom uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
- (\ utf8.codec encoded))])
+ (\ utf8.codec encoded))]}
(text.ends_with? ..pom_sha-1 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..pom_md5 uri)
- (#try.Success [state (|> dummy_package
+ {#try.Success [state (|> dummy_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..md5)])
+ ..md5)]}
... else
- (#try.Failure "NOPE"))
- (#try.Failure "NOPE")))
+ {#try.Failure "NOPE"})
+ {#try.Failure "NOPE"}))
(def: (on_upload uri binary state)
- (#try.Failure "NOPE"))))
+ {#try.Failure "NOPE"})))
(def: one
Test
@@ -264,12 +264,12 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [/.one]
(case actual_package
- (#try.Success actual_package)
+ {#try.Success actual_package}
(\ ///package.equivalence =
- (with@ #///package.origin (#///repository/origin.Remote "") expected_package)
+ (with@ #///package.origin {#///repository/origin.Remote ""} expected_package)
actual_package)
- (#try.Failure _)
+ {#try.Failure _}
false))))
(~~ (template [<exception> <bad>]
[(in (do async.monad
@@ -278,10 +278,10 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [<exception>]
(case actual_package
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? <exception> error)
- (#try.Success _)
+ {#try.Success _}
false))))]
[/.sha-1_does_not_match bad_sha-1]
@@ -313,12 +313,12 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [/.any]
(case actual_package
- (#try.Success actual_package)
+ {#try.Success actual_package}
(\ ///package.equivalence =
- (with@ #///package.origin (#///repository/origin.Remote "") expected_package)
+ (with@ #///package.origin {#///repository/origin.Remote ""} expected_package)
actual_package)
- (#try.Failure _)
+ {#try.Failure _}
false))))
(in (do async.monad
[.let [console ($///version.echo "")]
@@ -329,10 +329,10 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [/.cannot_resolve]
(case actual_package
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.cannot_resolve error)
- (#try.Success _)
+ {#try.Success _}
false))))
)))
@@ -366,16 +366,16 @@
#///dependency.type ///artifact/type.lux_library]
dependee_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some dependee_artifact))
+ (with@ #///.identity {#.Some dependee_artifact})
///pom.write
try.trusted)
depender_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some depender_artifact))
+ (with@ #///.identity {#.Some depender_artifact})
(with@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
ignored_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some ignored_artifact))
+ (with@ #///.identity {#.Some ignored_artifact})
///pom.write
try.trusted)
diff --git a/stdlib/source/test/aedifex/dependency/status.lux b/stdlib/source/test/aedifex/dependency/status.lux
index 981f18b0e..79e59460f 100644
--- a/stdlib/source/test/aedifex/dependency/status.lux
+++ b/stdlib/source/test/aedifex/dependency/status.lux
@@ -40,7 +40,7 @@
[payload (binaryT.random 1)]
(_.cover [/.verified]
(case (/.verified payload)
- (#/.Verified sha1 md5)
+ {#/.Verified sha1 md5}
true
_
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index a3220b756..049023718 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -50,18 +50,18 @@
[expected (..random <hash>)]
(_.cover [<hash> <constructor> <exception>]
(and (case (<constructor> (/.data expected))
- (#try.Success actual)
+ {#try.Success actual}
(\ /.equivalence = expected actual)
- (#try.Failure error)
+ {#try.Failure error}
false)
(case (<constructor> (\ binary.monoid composite
(/.data expected)
(/.data expected)))
- (#try.Success actual)
+ {#try.Success actual}
false
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? <exception> error)))))]
[/.sha-1 /.as_sha-1 /.not_a_sha-1]
@@ -83,10 +83,10 @@
(case (\ <codec> decoded
(format (\ <codec> encoded expected)
"AABBCC"))
- (#try.Success actual)
+ {#try.Success actual}
false
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.not_a_hash error))))]
[/.sha-1_codec /.sha-1]
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 0f0188ea3..a1d3133c5 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -105,12 +105,12 @@
actual (/.read repository artifact)]
(_.cover' [/.write /.read]
(and (case wrote?
- (#try.Success _) true
- (#try.Failure _) false)
+ {#try.Success _} true
+ {#try.Failure _} false)
(case actual
- (#try.Success actual)
+ {#try.Success actual}
(\ /.equivalence = expected actual)
- (#try.Failure _)
+ {#try.Failure _}
false))))))
))))
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index 39d16bd27..52f7a1562 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -117,12 +117,12 @@
actual (/.read repository artifact)]
(_.cover' [/.write /.read]
(and (case wrote?
- (#try.Success _) true
- (#try.Failure _) false)
+ {#try.Success _} true
+ {#try.Failure _} false)
(case actual
- (#try.Success actual)
+ {#try.Success actual}
(\ /.equivalence = expected actual)
- (#try.Failure _)
+ {#try.Failure _}
false))))))
))))
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index 61153b8ad..69d31ddcc 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -64,9 +64,9 @@
($equivalence.spec /.equivalence (\ ! each product.right ..random)))
(_.cover [/.local?]
- (/.local? (with@ #/.origin (#//origin.Local "~/yolo") package)))
+ (/.local? (with@ #/.origin {#//origin.Local "~/yolo"} package)))
(_.cover [/.remote?]
- (/.remote? (with@ #/.origin (#//origin.Remote "https://example.com") package)))
+ (/.remote? (with@ #/.origin {#//origin.Remote "https://example.com"} package)))
(_.cover [/.local]
(let [expected_pom (|> package (value@ #/.pom) product.left)
expected_library (|> package (value@ #/.library) product.left)
@@ -76,13 +76,13 @@
[actual_pom binary_pom pom_status] (value@ #/.pom local)
[actual_library library_status] (value@ #/.library local)]
(and (case (value@ #/.origin local)
- (#//origin.Local "") true
+ {#//origin.Local ""} true
_ false)
(let [expected_sha1 (//hash.sha-1 expected_library)
expected_md5 (//hash.md5 expected_library)]
(and (same? expected_library actual_library)
(case library_status
- (#//status.Verified actual_sha1 expected_md5)
+ {#//status.Verified actual_sha1 expected_md5}
(and (//hash\= expected_sha1 actual_sha1)
(//hash\= expected_md5 expected_md5))
@@ -97,7 +97,7 @@
(in (\ xml.equivalence = actual_pom decoded_pom)))
(try.else false))
(case pom_status
- (#//status.Verified actual_sha1 expected_md5)
+ {#//status.Verified actual_sha1 expected_md5}
(and (//hash\= expected_sha1 actual_sha1)
(//hash\= expected_md5 expected_md5))
@@ -106,17 +106,17 @@
(_.cover [/.dependencies]
(let [expected (value@ #//.dependencies profile)]
(case (/.dependencies package)
- (#try.Success actual)
+ {#try.Success actual}
(\ set.equivalence = expected actual)
- (#try.Failure error)
+ {#try.Failure error}
false)))
(_.cover [/.repositories]
(let [expected (value@ #//.repositories profile)]
(case (/.repositories package)
- (#try.Success actual)
+ {#try.Success actual}
(\ set.equivalence = expected actual)
- (#try.Failure error)
+ {#try.Failure error}
false)))
))))
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index 1152a1dba..3dc073f0d 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -84,7 +84,7 @@
//format.project
list
(<code>.result /.project)
- (case> (#try.Success actual)
+ (case> {#try.Success actual}
(|> expected
..with_empty_profile
dictionary.entries
@@ -95,5 +95,5 @@
(dictionary.of_list text.hash)
(\ //project.equivalence = actual))
- (#try.Failure error)
+ {#try.Failure error}
false))))))
diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux
index 92f13bd4f..4913df25d 100644
--- a/stdlib/source/test/aedifex/pom.lux
+++ b/stdlib/source/test/aedifex/pom.lux
@@ -35,20 +35,20 @@
(_.cover [/.write /.parser]
(case [(/.write expected)
(value@ #//.identity expected)]
- [(#try.Success pom)
- (#.Some _)]
+ [{#try.Success pom}
+ {#.Some _}]
(case (<xml>.result /.parser (list pom))
- (#try.Success actual)
+ {#try.Success actual}
(\ //.equivalence =
(|> (\ //.monoid identity)
(with@ #//.dependencies (value@ #//.dependencies expected))
(with@ #//.repositories (value@ #//.repositories expected)))
actual)
- (#try.Failure error)
+ {#try.Failure error}
false)
- [(#try.Failure error)
+ [{#try.Failure error}
#.None]
(exception.match? //.no_identity error)
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index 94e61bd7c..767f8cdb3 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -84,17 +84,17 @@
(try.else false))))
(_.cover [/.unknown_profile]
(case (/.profile project fake_name)
- (#try.Success _)
+ {#try.Success _}
false
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.unknown_profile error)))
(_.cover [/.circular_dependency]
(case (/.profile circular sub_name)
- (#try.Success _)
+ {#try.Success _}
false
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.circular_dependency error)))
))
))))
diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux
index 0cbea2733..e65503ee9 100644
--- a/stdlib/source/test/aedifex/repository.lux
+++ b/stdlib/source/test/aedifex/repository.lux
@@ -72,17 +72,17 @@
"@")
(def: (on_download uri state)
(case (dictionary.value uri state)
- (#.Some content)
+ {#.Some content}
(case (binary.size content)
0 (exception.except ..not_found [uri])
- _ (#try.Success [state content]))
+ _ {#try.Success [state content]})
#.None
(exception.except ..not_found [uri])))
(def: (on_upload uri content state)
(if (dictionary.key? state uri)
(exception.except ..cannot_upload [uri])
- (#try.Success (dictionary.has uri content state)))))
+ {#try.Success (dictionary.has uri content state)})))
(def: .public test
Test
diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux
index 03c64b69a..b6d647bb9 100644
--- a/stdlib/source/test/aedifex/repository/local.lux
+++ b/stdlib/source/test/aedifex/repository/local.lux
@@ -44,8 +44,8 @@
actual (\ repo download uri)]
(_.cover' [/.repository]
(and (case before_upload
- (#try.Success _) false
- (#try.Failure _) true)
+ {#try.Success _} false
+ {#try.Failure _} true)
(|> actual
(try\each (binary\= expected))
(try.else false))))))
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index 9e405ddc5..443ab884e 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -35,7 +35,7 @@
(-> URL (@http.Body IO))
(let [url (\ utf8.codec encoded url)]
(function (_ _)
- (io.io (#try.Success [(binary.size url) url])))))
+ (io.io {#try.Success [(binary.size url) url]}))))
(def: (good_http user password)
(-> //identity.User //identity.Password (http.Client IO))
@@ -56,7 +56,7 @@
[#@http.headers (http.headers (list))
#@http.body (..url_body url)]]
- [#@http.Put (#.Some input)]
+ [#@http.Put {#.Some input}]
(if (|> headers
(dictionary.value "Authorization")
(maybe\each (text\= (//identity.basic_auth user password)))
@@ -95,8 +95,8 @@
($_ _.and
(_.cover [/.repository /.user_agent /.Address]
(let [repo (/.repository (..good_http user password)
- (#.Some [#//identity.user user
- #//identity.password password])
+ {#.Some [#//identity.user user
+ #//identity.password password]}
address)]
(and (|> (\ repo download uri)
io.run!
@@ -113,19 +113,19 @@
#.None
address)]
(case (io.run! (\ repo upload uri content))
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.upload_failure error)
- (#try.Success _)
+ {#try.Success _}
false)))
(_.cover [/.download_failure]
(let [repo (/.repository ..bad_http
#.None
address)]
(case (io.run! (\ repo download uri))
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.download_failure error)
- (#try.Success _)
+ {#try.Success _}
false)))
))))