From d3f5e1f4baa667bc2eb72edd542cf5d8cd3924ce Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 3 Jul 2018 18:40:16 -0400 Subject: - Re-named ":!" to ":coerce". --- new-luxc/source/luxc/lang/translation/python/eval.jvm.lux | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/python/eval.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux index df1e7004c..88fdd3173 100644 --- a/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/eval.jvm.lux @@ -46,11 +46,11 @@ (def: (tuple lux-object host-object) (-> (-> PyObject (Error Any)) PyObject (Error Any)) - (let [size (:! Nat (PyObject::__len__ [] host-object))] + (let [size (:coerce Nat (PyObject::__len__ [] host-object))] (loop [idx +0 - output (:! (Array Any) (array.new size))] + output (:coerce (Array Any) (array.new size))] (if (n/< size idx) - (case (PyObject::__getitem__ [(:! Int idx)] host-object) + (case (PyObject::__getitem__ [(:coerce Int idx)] host-object) (#e.Error error) (#e.Error error) @@ -65,7 +65,7 @@ (def: python-type (-> PyObject Text) - (|>> (PyObject::getType []) (PyType::getName []) (:! Text))) + (|>> (PyObject::getType []) (PyType::getName []) (:coerce Text))) (def: tag-field (PyString::new [//.variant-tag-field])) (def: flag-field (PyString::new [//.variant-flag-field])) @@ -84,9 +84,9 @@ (#e.Success tag)] [(lux-object value) (#e.Success value)]) - (#e.Success [(Long::intValue [] (:! Long tag)) + (#e.Success [(Long::intValue [] (:coerce Long tag)) (: Any - (case (python-type (:! PyObject flag)) + (case (python-type (:coerce PyObject flag)) "NoneType" (host.null) @@ -127,7 +127,7 @@ (def: #export (eval code) (-> Expression (Meta Any)) (function (_ compiler) - (let [interpreter (|> compiler (get@ #.host) (:! //.Host) (get@ #//.interpreter))] + (let [interpreter (|> compiler (get@ #.host) (:coerce //.Host) (get@ #//.interpreter))] (case (interpreter code) (#e.Error error) (exec (log! (format "eval #e.Error\n" -- cgit v1.2.3