aboutsummaryrefslogtreecommitdiff
path: root/lux-scheme/source
diff options
context:
space:
mode:
authorEduardo Julian2022-03-30 15:25:06 -0400
committerEduardo Julian2022-03-30 15:25:06 -0400
commit9df5ff6abc6e95c766d1907c5a9fee00730e749a (patch)
tree8614095c2c2a3a5cd195f9e6da53f47c88891381 /lux-scheme/source
parent8ebc505f1be8e103039d220b2d824dd687777f24 (diff)
Re-named ffi.as to "is", and ffi.check to "as", to line the names up with normal type-annotation macros.
Diffstat (limited to 'lux-scheme/source')
-rw-r--r--lux-scheme/source/program.lux18
1 files changed, 9 insertions, 9 deletions
diff --git a/lux-scheme/source/program.lux b/lux-scheme/source/program.lux
index 78d96e962..7d116dfb6 100644
--- a/lux-scheme/source/program.lux
+++ b/lux-scheme/source/program.lux
@@ -139,14 +139,14 @@
(def: (variant? value)
(-> Any Bit)
- (case (ffi.check [java/lang/Object] (as java/lang/Object value))
+ (case (ffi.as [java/lang/Object] (as java/lang/Object value))
{.#Some array}
... TODO: Get rid of this coercion ASAP.
(let [array (as (Array java/lang/Object) array)]
(and (n.= 3 (array.size array))
(case (array.read! 0 array)
{.#Some tag}
- (case (ffi.check java/lang/Integer tag)
+ (case (ffi.as java/lang/Integer tag)
{.#Some _}
true
@@ -248,7 +248,7 @@
(def: (lux_value value)
(-> java/lang/Object java/lang/Object)
- (<| (case (ffi.check [java/lang/Object] value)
+ (<| (case (ffi.as [java/lang/Object] value)
{.#Some value}
... TODO: Get rid of the coercions below.
(if (variant? value)
@@ -275,7 +275,7 @@
(do try.monad
[tag (read (gnu/lists/Pair::getCar host_object))
#let [host_object (as gnu/lists/Pair (gnu/lists/Pair::getCdr host_object))
- flag (case (ffi.check java/lang/Boolean (gnu/lists/Pair::getCar host_object))
+ flag (case (ffi.as java/lang/Boolean (gnu/lists/Pair::getCar host_object))
{.#Some flag}
(as Bit flag)
@@ -302,7 +302,7 @@
(def: (read host_object)
(Reader java/lang/Object)
(`` (<| (~~ (template [<class>]
- [(case (ffi.check <class> host_object)
+ [(case (ffi.as <class> host_object)
{.#Some host_object}
{try.#Success host_object}
@@ -312,7 +312,7 @@
[gnu/mapping/Procedure] [gnu/lists/U8Vector]
))
(~~ (template [<class> <processing>]
- [(case (ffi.check <class> host_object)
+ [(case (ffi.as <class> host_object)
{.#Some host_object}
{try.#Success (<| <processing> host_object)}
@@ -329,12 +329,12 @@
[program/VariantValue program/VariantValue::getValue]
[program/TupleValue program/TupleValue::getValue]
))
- (case (ffi.check gnu/lists/Pair host_object)
+ (case (ffi.as gnu/lists/Pair host_object)
{.#Some host_object}
(read_variant read host_object)
{.#None})
- (case (ffi.check gnu/lists/FVector host_object)
+ (case (ffi.as gnu/lists/FVector host_object)
{.#Some host_object}
(read_tuple read (as (gnu/lists/FVector java/lang/Object) host_object))
@@ -344,7 +344,7 @@
(def: ensure_macro
(-> Macro (Maybe gnu/mapping/Procedure))
- (|>> (as java/lang/Object) (ffi.check gnu/mapping/Procedure)))
+ (|>> (as java/lang/Object) (ffi.as gnu/mapping/Procedure)))
(def: (expander macro inputs lux)
Expander