aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/polytypic
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/polytypic')
-rw-r--r--stdlib/source/polytypic/lux/abstract/equivalence.lux2
-rw-r--r--stdlib/source/polytypic/lux/abstract/functor.lux4
-rw-r--r--stdlib/source/polytypic/lux/data/format/json.lux4
3 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/polytypic/lux/abstract/equivalence.lux b/stdlib/source/polytypic/lux/abstract/equivalence.lux
index 8de4a0a7a..a79fd9c2a 100644
--- a/stdlib/source/polytypic/lux/abstract/equivalence.lux
+++ b/stdlib/source/polytypic/lux/abstract/equivalence.lux
@@ -115,7 +115,7 @@
g!right (code.local "_____________right")]]
(in (` (is (, (@Equivalence inputT))
(function ((, g!_) (, g!left) (, g!right))
- (case [(, g!left) (, g!right)]
+ (when [(, g!left) (, g!right)]
(,* (list#conjoint (list#each (function (_ [tag g!eq])
(if (nat.= last tag)
(list (` [{(, (code.nat (-- tag))) #1 (, g!left)}
diff --git a/stdlib/source/polytypic/lux/abstract/functor.lux b/stdlib/source/polytypic/lux/abstract/functor.lux
index 31a53d407..415c0da6e 100644
--- a/stdlib/source/polytypic/lux/abstract/functor.lux
+++ b/stdlib/source/polytypic/lux/abstract/functor.lux
@@ -54,7 +54,7 @@
[_ (in [])
membersC (<type>.variant (<>.many (Arg<?> valueC)))
.let [last (-- (list.size membersC))]]
- (in (` (case (, valueC)
+ (in (` (when (, valueC)
(,* (list#conjoint (list#each (function (_ [tag memberC])
(if (n.= last tag)
(list (` {(, (code.nat (-- tag))) #1 (, valueC)})
@@ -75,7 +75,7 @@
(again (++ idx)
(list#composite pairsCC (list [slotC memberC])))))
(in pairsCC)))))]
- (in (` (case (, valueC)
+ (in (` (when (, valueC)
[(,* (list#each product.left pairsCC))]
[(,* (list#each product.right pairsCC))]))))
... Functions
diff --git a/stdlib/source/polytypic/lux/data/format/json.lux b/stdlib/source/polytypic/lux/data/format/json.lux
index 53eba2b21..333f0c323 100644
--- a/stdlib/source/polytypic/lux/data/format/json.lux
+++ b/stdlib/source/polytypic/lux/data/format/json.lux
@@ -85,7 +85,7 @@
(def .public (nullable format)
(All (_ a) (-> (-> a JSON) (-> (Maybe a) JSON)))
(function (_ elem)
- (case elem
+ (when elem
{.#None} {/.#Null}
{.#Some value} (format value))))
@@ -175,7 +175,7 @@
.let [last (-- (list.size members))]]
(in (` (is (, (@JSON#encoded inputT))
(function ((, g!_) (, g!input))
- (case (, g!input)
+ (when (, g!input)
(,* (list#conjoint (list#each (function (_ [tag g!encoded])
(if (n.= last tag)
(.list (` {(, (code.nat (-- tag))) #1 (, g!input)})