diff options
author | Eduardo Julian | 2022-08-11 04:15:07 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-08-11 04:15:07 -0400 |
commit | 065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch) | |
tree | f2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /stdlib/source/specification/lux | |
parent | 68d78235694c633c956bb9e8a007cad7d65370bc (diff) |
Re-named the "case" macro to "when".
Diffstat (limited to 'stdlib/source/specification/lux')
-rw-r--r-- | stdlib/source/specification/lux/abstract/codec.lux | 2 | ||||
-rw-r--r-- | stdlib/source/specification/lux/world/console.lux | 6 | ||||
-rw-r--r-- | stdlib/source/specification/lux/world/file.lux | 18 | ||||
-rw-r--r-- | stdlib/source/specification/lux/world/shell.lux | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/specification/lux/abstract/codec.lux b/stdlib/source/specification/lux/abstract/codec.lux index c2dd86e90..80fa0d327 100644 --- a/stdlib/source/specification/lux/abstract/codec.lux +++ b/stdlib/source/specification/lux/abstract/codec.lux @@ -20,7 +20,7 @@ [expected generator] (_.for [/.Codec] (_.test "Isomorphism." - (case (|> expected @//encoded @//decoded) + (when (|> expected @//encoded @//decoded) {try.#Success actual} (@//= expected actual) diff --git a/stdlib/source/specification/lux/world/console.lux b/stdlib/source/specification/lux/world/console.lux index 9fc830fd2..3fbdc42af 100644 --- a/stdlib/source/specification/lux/world/console.lux +++ b/stdlib/source/specification/lux/world/console.lux @@ -32,7 +32,7 @@ ?close/bad (at console close []) .let [can_write! - (case ?write + (when ?write {try.#Success _} true @@ -40,7 +40,7 @@ false) can_read! - (case [?read ?read_line] + (when [?read ?read_line] [{try.#Success _} {try.#Success _}] true @@ -48,7 +48,7 @@ false) can_close! - (case [?close/good ?close/bad] + (when [?close/good ?close/bad] [{try.#Success _} {try.#Failure _}] true diff --git a/stdlib/source/specification/lux/world/file.lux b/stdlib/source/specification/lux/world/file.lux index b70555b6f..648449050 100644 --- a/stdlib/source/specification/lux/world/file.lux +++ b/stdlib/source/specification/lux/world/file.lux @@ -66,7 +66,7 @@ made? (at fs make_directory parent) directory_post! (at fs directory? parent)] (in (and (not directory_pre!) - (case made? + (when made? {try.#Success _} true {try.#Failure _} false) directory_post!)))) @@ -78,7 +78,7 @@ made? (at fs write path content) file_post! (at fs file? path)] (in (and (not file_pre!) - (case made? + (when made? {try.#Success _} true {try.#Failure _} false) file_post!)))) @@ -235,20 +235,20 @@ (and (not pre_dir/0) (not pre_dir/1) (not pre_dir/2) - (case made? + (when made? {try.#Success _} true {try.#Failure _} false) post_dir/0 post_dir/1 post_dir/2)) (unit.coverage [/.cannot_make_directory] - (and (case cannot_make_directory!/0 + (and (when cannot_make_directory!/0 {try.#Success _} false {try.#Failure error} (exception.match? /.cannot_make_directory error)) - (case cannot_make_directory!/1 + (when cannot_make_directory!/1 {try.#Success _} false @@ -267,11 +267,11 @@ make_file!/1 (/.make_file ! fs (utf8#encoded file/0) file/0)]) (all unit.and (unit.coverage [/.make_file] - (case make_file!/0 + (when make_file!/0 {try.#Success _} true {try.#Failure error} false)) (unit.coverage [/.cannot_make_file] - (case make_file!/1 + (when make_file!/1 {try.#Success _} false @@ -314,10 +314,10 @@ (not pre_dir/0) (not pre_dir/1) - (case made_file? + (when made_file? {try.#Success _} true {try.#Failure _} false) - (case made_dir? + (when made_dir? {try.#Success _} true {try.#Failure _} false) diff --git a/stdlib/source/specification/lux/world/shell.lux b/stdlib/source/specification/lux/world/shell.lux index be41059a0..d552c1bdb 100644 --- a/stdlib/source/specification/lux/world/shell.lux +++ b/stdlib/source/specification/lux/world/shell.lux @@ -54,13 +54,13 @@ (do async.monad [?destroy (at process destroy []) ?await (at process await [])] - (in (and (case ?destroy + (in (and (when ?destroy {try.#Success _} true {try.#Failure error} false) - (case ?await + (when ?await {try.#Success _} false @@ -77,7 +77,7 @@ (in (do [! async.monad] [?echo (at shell execute (..echo! message)) ?sleep (at shell execute (..sleep! seconds))] - (case [?echo ?sleep] + (when [?echo ?sleep] [{try.#Success echo} {try.#Success sleep}] (do ! [can_read! (..can_read! message echo) |