aboutsummaryrefslogtreecommitdiff
path: root/lux-cl/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lux-cl/source/program.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/lux-cl/source/program.lux b/lux-cl/source/program.lux
index 04df3b86d..ff6aff2e5 100644
--- a/lux-cl/source/program.lux
+++ b/lux-cl/source/program.lux
@@ -164,7 +164,7 @@
(def host_bit
(-> Bit org/armedbear/lisp/LispObject)
- (|>> (pipe.case #0 (org/armedbear/lisp/Nil::NIL)
+ (|>> (pipe.when #0 (org/armedbear/lisp/Nil::NIL)
#1 (org/armedbear/lisp/Symbol::T))))
(def (host_value value)
@@ -173,7 +173,7 @@
(function (_ sub_value)
(let [sub_value (as java/lang/Object sub_value)]
(`` (<| (,, (with_template [<type> <then>]
- [(case (ffi.is <type> sub_value)
+ [(when (ffi.is <type> sub_value)
{.#Some sub_value}
(`` (|> sub_value (,, (template.splice <then>))))
@@ -208,7 +208,7 @@
[(org/armedbear/lisp/LispObject
[] (<name> self [idx int])
org/armedbear/lisp/LispObject
- (case (array.read! (|> idx java/lang/Integer::longValue (as Nat))
+ (when (array.read! (|> idx java/lang/Integer::longValue (as Nat))
(as (Array java/lang/Object) value))
{.#Some sub}
(to_sub sub)
@@ -229,7 +229,7 @@
[tag (read (org/armedbear/lisp/LispObject::NTH +0 host_object))
value (read (org/armedbear/lisp/LispObject::NTH +2 host_object))]
(wrap [(java/lang/Long::intValue (as java/lang/Long tag))
- (case (ffi.is org/armedbear/lisp/Nil (org/armedbear/lisp/LispObject::NTH +1 host_object))
+ (when (ffi.is org/armedbear/lisp/Nil (org/armedbear/lisp/LispObject::NTH +1 host_object))
{.#Some _}
(is Any (ffi.null))
@@ -244,7 +244,7 @@
output (as (Array Any) (array.new size))])
(if (n.< size idx)
... TODO: Start using "SVREF" instead of "elt" ASAP
- (case (read (org/armedbear/lisp/LispObject::elt (.int idx) host_object))
+ (when (read (org/armedbear/lisp/LispObject::elt (.int idx) host_object))
{try.#Failure error}
{try.#Failure error}
@@ -255,7 +255,7 @@
(def (read host_object)
(Reader org/armedbear/lisp/LispObject)
(`` (<| (,, (with_template [<class> <post_processing>]
- [(case (ffi.is <class> host_object)
+ [(when (ffi.is <class> host_object)
{.#Some host_object}
(`` (|> host_object (,, (template.splice <post_processing>))))
@@ -270,7 +270,7 @@
[org/armedbear/lisp/Nil [(pipe.new {try.#Success false} [])]]
[org/armedbear/lisp/Closure [{try.#Success}]]
[program/LuxADT [program/LuxADT::getValue {try.#Success}]]))
- (case (ffi.is org/armedbear/lisp/Symbol host_object)
+ (when (ffi.is org/armedbear/lisp/Symbol host_object)
{.#Some host_object}
(if (same? (org/armedbear/lisp/Symbol::T) host_object)
{try.#Success true}
@@ -294,7 +294,7 @@
(def (expander macro inputs lux)
Expander
- (case (ensure_macro macro)
+ (when (ensure_macro macro)
{.#Some macro}
(call_macro inputs lux macro)