aboutsummaryrefslogtreecommitdiff
path: root/lux-python/source
diff options
context:
space:
mode:
Diffstat (limited to 'lux-python/source')
-rw-r--r--lux-python/source/program.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index 6f145bbbd..25a2131c5 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -187,8 +187,8 @@
{try.#Success value}])
{try.#Success [tag
(is Any
- (case (ffi.check org/python/core/PyNone
- (as java/lang/Object flag))
+ (case (ffi.as org/python/core/PyNone
+ (as java/lang/Object flag))
{.#Some _}
(as Any (ffi.null))
@@ -209,7 +209,7 @@
(def: (read host_object)
Translator
(`` (<| (~~ (template [<class> <processing>]
- [(case (ffi.check <class> (as <class> host_object))
+ [(case (ffi.as <class> (as <class> host_object))
{.#Some host_object}
{try.#Success (`` (|> host_object (~~ (template.spliced <processing>))))}
@@ -218,8 +218,8 @@
[LuxValue [LuxValue::value]]
[org/python/core/PyNone [(pipe.new [] [])]]
[org/python/core/PyBoolean [org/python/core/PyObject::__nonzero__]]
- ... [org/python/core/PyInteger [(ffi.as org/python/core/PyObject) org/python/core/PyObject::asInt]]
- [org/python/core/PyInteger [(ffi.as org/python/core/PyObject)
+ ... [org/python/core/PyInteger [(ffi.is org/python/core/PyObject) org/python/core/PyObject::asInt]]
+ [org/python/core/PyInteger [(ffi.is org/python/core/PyObject)
("jvm member invoke virtual" [] "org.python.core.PyObject" "asInt" [])
"jvm object cast"
(is (Primitive "java.lang.Integer"))]]
@@ -231,7 +231,7 @@
[[java/lang/Object] [(|>)]]
))
(~~ (template [<class> <processing>]
- [(case (ffi.check <class> host_object)
+ [(case (ffi.as <class> host_object)
{.#Some host_object}
(<| <processing> (as org/python/core/PyObject) host_object)
@@ -319,12 +319,12 @@
(::super! [index'])
{.#Some it}
- (<| (case (ffi.check [java/lang/Object] (as java/lang/Object it))
+ (<| (case (ffi.as [java/lang/Object] (as java/lang/Object it))
{.#Some it}
(to_host it)
{.#None})
- (case (ffi.check library/lux/Function (as java/lang/Object it))
+ (case (ffi.as library/lux/Function (as java/lang/Object it))
{.#Some it}
(pseudo_function to_host it)
@@ -335,7 +335,7 @@
(def: (to_host it)
(-> Any org/python/core/PyObject)
(`` (<| (~~ (template [<jvm> <python>]
- [(case (ffi.check <jvm> (as java/lang/Object it))
+ [(case (ffi.as <jvm> (as java/lang/Object it))
{.#Some it}
(as org/python/core/PyObject
(<python> [it]))
@@ -368,7 +368,7 @@
(def: python_function!
(-> Any (Maybe org/python/core/PyFunction))
(|>> (as java/lang/Object)
- (ffi.check org/python/core/PyFunction)))
+ (ffi.as org/python/core/PyFunction)))
(exception: (cannot_apply_a_non_function [object java/lang/Object])
(exception.report