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/case.jvm.lux | 10 +++++----- new-luxc/source/luxc/lang/translation/python/eval.jvm.lux | 14 +++++++------- .../source/luxc/lang/translation/python/primitive.jvm.lux | 4 ++-- .../source/luxc/lang/translation/python/statement.jvm.lux | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/python') diff --git a/new-luxc/source/luxc/lang/translation/python/case.jvm.lux b/new-luxc/source/luxc/lang/translation/python/case.jvm.lux index f51acc402..aedf2a6e1 100644 --- a/new-luxc/source/luxc/lang/translation/python/case.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/case.jvm.lux @@ -38,7 +38,7 @@ (let [method (if tail? runtimeT.product//right runtimeT.product//left)] - (method source (python.int (:! Int idx))))) + (method source (python.int (:coerce Int idx))))) valueO pathP)))) @@ -115,23 +115,23 @@ [_ ( value)] (meta/wrap (python.when! (python.not (python.= (|> value ) cursor-top)) fail-pm!))) - ([#.Nat (<| python.int (:! Int))] + ([#.Nat (<| python.int (:coerce Int))] [#.Int python.int] - [#.Deg (<| python.int (:! Int))] + [#.Deg (<| python.int (:coerce Int))] [#.Bool python.bool] [#.Frac python.float] [#.Text python.string]) (^template [ ] (^code ( (~ [_ (#.Nat idx)]))) - (meta/wrap (push-cursor! ( cursor-top (python.int (:! Int idx)))))) + (meta/wrap (push-cursor! ( cursor-top (python.int (:coerce Int idx)))))) (["lux case tuple left" runtimeT.product//left] ["lux case tuple right" runtimeT.product//right]) (^template [ ] (^code ( (~ [_ (#.Nat idx)]))) (meta/wrap ($_ python.then! - (python.set! (list $temp) (runtimeT.sum//get cursor-top (python.int (:! Int idx)) )) + (python.set! (list $temp) (runtimeT.sum//get cursor-top (python.int (:coerce Int idx)) )) (python.if! (python.= python.none (@@ $temp)) fail-pm! (push-cursor! (@@ $temp)))))) 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" diff --git a/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux index 7b2ba1786..f1cf731a2 100644 --- a/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux @@ -13,11 +13,11 @@ (def: #export translate-nat (-> Nat (Meta Expression)) - (|>> (:! Int) python.int meta/wrap)) + (|>> (:coerce Int) python.int meta/wrap)) (def: #export translate-deg (-> Deg (Meta Expression)) - (|>> (:! Int) python.int meta/wrap)) + (|>> (:coerce Int) python.int meta/wrap)) (def: #export translate-frac (-> Frac (Meta Expression)) diff --git a/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux index 23b51371c..c241afa8a 100644 --- a/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux @@ -34,7 +34,7 @@ (wrap []) tags - (moduleL.declare-tags tags (macro.export? metaV) (:! Type expressionV))) + (moduleL.declare-tags tags (macro.export? metaV) (:coerce Type expressionV))) (wrap [])) #let [_ (log! (format "DEF " (%ident def-ident)))]] (wrap [])) -- cgit v1.2.3