aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/format
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 04:15:07 -0400
committerEduardo Julian2022-08-11 04:15:07 -0400
commit065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch)
treef2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /stdlib/source/format
parent68d78235694c633c956bb9e8a007cad7d65370bc (diff)
Re-named the "case" macro to "when".
Diffstat (limited to 'stdlib/source/format')
-rw-r--r--stdlib/source/format/lux/data/binary.lux8
-rw-r--r--stdlib/source/format/lux/data/text.lux2
2 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/format/lux/data/binary.lux b/stdlib/source/format/lux/data/binary.lux
index 761176a3a..034d4edd7 100644
--- a/stdlib/source/format/lux/data/binary.lux
+++ b/stdlib/source/format/lux/data/binary.lux
@@ -96,7 +96,7 @@
(def .public (or left right)
(All (_ l r) (-> (Format l) (Format r) (Format (Or l r))))
(function (_ altV)
- (case altV
+ (when altV
(^.with_template [<number> <tag> <format>]
[{<tag> caseV}
(let [[caseS caseT] (<format> caseV)]
@@ -126,7 +126,7 @@
(def .public bit
(Format Bit)
- (|>> (pipe.case #0 0 #1 1) ..bits_8))
+ (|>> (pipe.when #0 0 #1 1) ..bits_8))
(with_template [<name> <type>]
[(def .public <name> (Format <type>) ..bits_64)]
@@ -241,7 +241,7 @@
indexed ..nat
quantified (..and (..list again) again)]
(function (_ altV)
- (case altV
+ (when altV
(^.with_template [<number> <tag> <format>]
[{<tag> caseV}
(let [[caseS caseT] (<format> caseV)]
@@ -275,7 +275,7 @@
(let [sequence (..list again)]
(..and ..location
(function (_ altV)
- (case altV
+ (when altV
(^.with_template [<number> <tag> <format>]
[{<tag> caseV}
(let [[caseS caseT] (<format> caseV)]
diff --git a/stdlib/source/format/lux/data/text.lux b/stdlib/source/format/lux/data/text.lux
index f9d79c466..7d237bea2 100644
--- a/stdlib/source/format/lux/data/text.lux
+++ b/stdlib/source/format/lux/data/text.lux
@@ -126,7 +126,7 @@
(def .public (maybe format)
(All (_ a) (-> (Format a) (Format (Maybe a))))
(function (_ value)
- (case value
+ (when value
{.#None}
"{.#None}"