aboutsummaryrefslogtreecommitdiff
path: root/lux-r/source
diff options
context:
space:
mode:
Diffstat (limited to 'lux-r/source')
-rw-r--r--lux-r/source/program.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/lux-r/source/program.lux b/lux-r/source/program.lux
index 68f8ef9c8..ab60ff510 100644
--- a/lux-r/source/program.lux
+++ b/lux-r/source/program.lux
@@ -182,7 +182,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 %%code
@@ -195,7 +195,7 @@
... (function (_ sub_value)
... (let [sub_value (as java/lang/Object sub_value)]
... (`` (<| (,, (with_template [<type> <then>]
- ... [(case (ffi.as <type> sub_value)
+ ... [(when (ffi.as <type> sub_value)
... {.#Some sub_value}
... (`` (|> sub_value (,, (template.splice <then>))))
... {.#None})]
@@ -367,7 +367,7 @@
(as java/lang/Object)
read)]
(wrap [(|> tag (as java/lang/Long) java/lang/Long::intValue)
- (case (|> host_object
+ (when (|> host_object
(org/renjin/sexp/ListVector::get_field runtime.variant_flag_field)
(ffi.as org/renjin/sexp/Null))
{.#Some _}
@@ -379,7 +379,7 @@
(def (read_i64 host_object)
(Reader org/renjin/sexp/ListVector)
- (case [(|> host_object
+ (when [(|> host_object
(org/renjin/sexp/ListVector::get_field runtime.i64_high_field)
(ffi.as org/renjin/sexp/IntArrayVector))
(|> host_object
@@ -398,7 +398,7 @@
(loop (again [idx 0
output (as (Array Any) (array.new size))])
(if (n.< size idx)
- (case (|> host_object (org/renjin/sexp/ListVector::get_index (.int idx)) (as java/lang/Object) read)
+ (when (|> host_object (org/renjin/sexp/ListVector::get_index (.int idx)) (as java/lang/Object) read)
{try.#Failure error}
{try.#Failure error}
@@ -418,14 +418,14 @@
(Reader java/lang/Object)
(exec
... (debug.log! (exception.construct ..unknown_kind_of_object [host_object]))
- (`` (<| (case (ffi.as org/renjin/sexp/ListVector host_object)
+ (`` (<| (when (ffi.as org/renjin/sexp/ListVector host_object)
{.#Some host_object}
- (<| (case (..read_variant read host_object)
+ (<| (when (..read_variant read host_object)
{try.#Success output}
{try.#Success output}
{try.#Failure _})
- (case (..read_i64 host_object)
+ (when (..read_i64 host_object)
{try.#Success output}
{try.#Success output}
@@ -434,7 +434,7 @@
{.#None})
(,, (with_template [<class> <post_processing>]
- [(case (ffi.as <class> host_object)
+ [(when (ffi.as <class> host_object)
{.#Some host_object}
(`` (|> host_object (,, (template.splice <post_processing>))))
@@ -461,7 +461,7 @@
(-> org/renjin/script/RenjinScriptEngine (List Code) Lux org/renjin/sexp/Closure (Try (Try [Lux (List Code)])))
(let [_ (debug.log! "@call_macro 0")
r_inputs (is org/renjin/sexp/PairList
- (case (ffi.try (|> (org/renjin/sexp/PairList$Builder::new)
+ (when (ffi.try (|> (org/renjin/sexp/PairList$Builder::new)
(org/renjin/sexp/PairList$Builder::add (..host_value inputs))
(org/renjin/sexp/PairList$Builder::add (..host_value lux))
org/renjin/sexp/PairList$Builder::build
@@ -488,7 +488,7 @@
(def (expander interpreter macro inputs lux)
(-> org/renjin/script/RenjinScriptEngine Expander)
- (case (ensure_macro macro)
+ (when (ensure_macro macro)
{.#Some macro}
(call_macro interpreter inputs lux macro)