From cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 10 Sep 2021 01:21:23 -0400 Subject: Migrated variants to the new syntax. --- lux-cl/source/program.lux | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lux-cl') diff --git a/lux-cl/source/program.lux b/lux-cl/source/program.lux index cf4ff1036..ef9c02b0e 100644 --- a/lux-cl/source/program.lux +++ b/lux-cl/source/program.lux @@ -169,7 +169,7 @@ (let [sub_value (:as java/lang/Object sub_value)] (`` (<| (~~ (template [ ] [(case (ffi.check sub_value) - (#.Some sub_value) + {#.Some sub_value} (`` (|> sub_value (~~ (template.splice )))) #.None)] @@ -204,7 +204,7 @@ org/armedbear/lisp/LispObject (case (array.read! (|> idx java/lang/Integer::longValue (:as Nat)) (:as (Array java/lang/Object) value)) - (#.Some sub) + {#.Some sub} (to_sub sub) #.None @@ -224,7 +224,7 @@ value (read (org/armedbear/lisp/LispObject::NTH +2 host_object))] (wrap [(java/lang/Long::intValue (:as java/lang/Long tag)) (case (ffi.check org/armedbear/lisp/Nil (org/armedbear/lisp/LispObject::NTH +1 host_object)) - (#.Some _) + {#.Some _} (: Any (ffi.null)) _ @@ -239,18 +239,18 @@ (if (n.< size idx) ... TODO: Start using "SVREF" instead of "elt" ASAP (case (read (org/armedbear/lisp/LispObject::elt (.int idx) host_object)) - (#try.Failure error) - (#try.Failure error) + {#try.Failure error} + {#try.Failure error} - (#try.Success member) + {#try.Success member} (recur (++ idx) (array.write! idx (:as Any member) output))) - (#try.Success output))))) + {#try.Success output})))) (def: (read host_object) (Reader org/armedbear/lisp/LispObject) (`` (<| (~~ (template [ ] [(case (ffi.check host_object) - (#.Some host_object) + {#.Some host_object} (`` (|> host_object (~~ (template.splice )))) #.None)] @@ -261,13 +261,13 @@ [org/armedbear/lisp/SimpleString [org/armedbear/lisp/SimpleString::getStringValue #try.Success]] [org/armedbear/lisp/Cons [(read_variant read)]] [org/armedbear/lisp/SimpleVector [(read_tuple read)]] - [org/armedbear/lisp/Nil [(new> (#try.Success false) [])]] + [org/armedbear/lisp/Nil [(new> {#try.Success false} [])]] [org/armedbear/lisp/Closure [#try.Success]] [program/LuxADT [program/LuxADT::getValue #try.Success]])) (case (ffi.check org/armedbear/lisp/Symbol host_object) - (#.Some host_object) + {#.Some host_object} (if (same? (org/armedbear/lisp/Symbol::T) host_object) - (#try.Success true) + {#try.Success true} (exception.throw ..unknown_kind_of_object (:as java/lang/Object host_object))) #.None) @@ -289,7 +289,7 @@ (def: (expander macro inputs lux) Expander (case (ensure_macro macro) - (#.Some macro) + {#.Some macro} (call_macro inputs lux macro) #.None @@ -381,7 +381,7 @@ (:as Try) (exec ("lux io log" "TODO: Extender") - (#try.Failure "TODO: Extender")))) + {#try.Failure "TODO: Extender"}))) @.common_lisp (def: (extender handler) -- cgit v1.2.3