aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/r
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/r.lux36
-rw-r--r--new-luxc/source/luxc/lang/translation/r/case.jvm.lux10
-rw-r--r--new-luxc/source/luxc/lang/translation/r/eval.jvm.lux44
-rw-r--r--new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/r/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby.lux34
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux10
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux30
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux2
10 files changed, 88 insertions, 88 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r.lux b/new-luxc/source/luxc/lang/translation/r.lux
index 4864cc286..e9c984636 100644
--- a/new-luxc/source/luxc/lang/translation/r.lux
+++ b/new-luxc/source/luxc/lang/translation/r.lux
@@ -74,7 +74,7 @@
#interpreter (function (_ code)
(do e.Monad<Error>
[output (ScriptEngine::eval [(r.expression code)] interpreter)]
- (wrap (maybe.default (:! Object [])
+ (wrap (maybe.default (:coerce Object [])
output))))
#module-buffer #.None
#program-buffer (StringBuilder::new [])})))
@@ -85,26 +85,26 @@
(Meta Any)
(function (_ compiler)
(#e.Success [(update@ #.host
- (|>> (:! Host)
+ (|>> (:coerce Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Nothing))
+ (:coerce Nothing))
compiler)
[]])))
(def: #export (with-sub-context expr)
(All [a] (-> (Meta a) (Meta [Text a])))
(function (_ compiler)
- (let [old (:! Host (get@ #.host compiler))
+ (let [old (:coerce Host (get@ #.host compiler))
[old-name old-sub] (get@ #context old)
new-name (format old-name "f___" (%i (.int old-sub)))]
(case (expr (set@ #.host
- (:! Nothing (set@ #context [new-name +0] old))
+ (:coerce Nothing (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
- (|>> (:! Host)
+ (|>> (:coerce Host)
(set@ #context [old-name (inc old-sub)])
- (:! Nothing))
+ (:coerce Nothing))
compiler')
[new-name output]])
@@ -116,7 +116,7 @@
(function (_ compiler)
(#e.Success [compiler
(|> (get@ #.host compiler)
- (:! Host)
+ (:coerce Host)
(get@ #context)
(let> [name sub]
name))])))
@@ -124,15 +124,15 @@
(def: #export (with-anchor anchor expr)
(All [a] (-> Anchor (Meta a) (Meta a)))
(function (_ compiler)
- (let [old (:! Host (get@ #.host compiler))]
+ (let [old (:coerce Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Nothing (set@ #anchor (#.Some anchor) old))
+ (:coerce Nothing (set@ #anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
- (|>> (:! Host)
+ (|>> (:coerce Host)
(set@ #anchor (get@ #anchor old))
- (:! Nothing))
+ (:coerce Nothing))
compiler')
output])
@@ -142,7 +142,7 @@
(def: #export anchor
(Meta Anchor)
(function (_ compiler)
- (case (|> compiler (get@ #.host) (:! Host) (get@ #anchor))
+ (case (|> compiler (get@ #.host) (:coerce Host) (get@ #anchor))
(#.Some anchor)
(#e.Success [compiler anchor])
@@ -152,7 +152,7 @@
(def: #export module-buffer
(Meta StringBuilder)
(function (_ compiler)
- (case (|> compiler (get@ #.host) (:! Host) (get@ #module-buffer))
+ (case (|> compiler (get@ #.host) (:coerce Host) (get@ #module-buffer))
#.None
((lang.throw No-Active-Module-Buffer "") compiler)
@@ -162,13 +162,13 @@
(def: #export program-buffer
(Meta StringBuilder)
(function (_ compiler)
- (#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))])))
+ (#e.Success [compiler (|> compiler (get@ #.host) (:coerce Host) (get@ #program-buffer))])))
(do-template [<name> <field> <outputT>]
[(def: (<name> code)
(-> Expression (Meta <outputT>))
(function (_ compiler)
- (let [runner (|> compiler (get@ #.host) (:! Host) (get@ <field>))]
+ (let [runner (|> compiler (get@ #.host) (:coerce Host) (get@ <field>))]
(case (runner code)
(#e.Error error)
((lang.throw Cannot-Execute error) compiler)
@@ -197,7 +197,7 @@
(-> Expression (Meta Any))
(do macro.Monad<Meta>
[module-buffer module-buffer
- #let [_ (Appendable::append [(:! CharSequence (r.expression code))]
+ #let [_ (Appendable::append [(:coerce CharSequence (r.expression code))]
module-buffer)]]
(load! code)))
@@ -210,7 +210,7 @@
module-buffer module-buffer
program-buffer program-buffer
#let [module-code (StringBuilder::toString [] module-buffer)
- _ (Appendable::append [(:! CharSequence (format module-code "\n"))]
+ _ (Appendable::append [(:coerce CharSequence (format module-code "\n"))]
program-buffer)]]
(wrap (ioC.write target
(format (lang.normalize-name module) "/" r-module-name)
diff --git a/new-luxc/source/luxc/lang/translation/r/case.jvm.lux b/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
index 21d8f1def..3aa3d4a8a 100644
--- a/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
@@ -39,7 +39,7 @@
(let [method (if tail?
runtimeT.product//right
runtimeT.product//left)]
- (method source (r.int (:! Int idx)))))
+ (method source (r.int (:coerce Int idx)))))
valueO
pathP))))
@@ -124,20 +124,20 @@
[_ (<tag> value)]
(meta/wrap (r.when (r.not (runtimeT.int//= (|> value <format>) cursor-top))
fail-pm!)))
- ([#.Nat (<| runtimeT.int (:! Int))]
+ ([#.Nat (<| runtimeT.int (:coerce Int))]
[#.Int runtimeT.int]
- [#.Deg (<| runtimeT.int (:! Int))])
+ [#.Deg (<| runtimeT.int (:coerce Int))])
(^template [<pm> <getter>]
(^code (<pm> (~ [_ (#.Nat idx)])))
- (meta/wrap (push-cursor! (<getter> cursor-top (r.int (:! Int idx))))))
+ (meta/wrap (push-cursor! (<getter> cursor-top (r.int (:coerce Int idx))))))
(["lux case tuple left" runtimeT.product//left]
["lux case tuple right" runtimeT.product//right])
(^template [<pm> <flag>]
(^code (<pm> (~ [_ (#.Nat idx)])))
(meta/wrap ($_ r.then
- (r.set! $temp (runtimeT.sum//get cursor-top (r.int (:! Int idx)) <flag>))
+ (r.set! $temp (runtimeT.sum//get cursor-top (r.int (:coerce Int idx)) <flag>))
(r.if (r.= r.null (@@ $temp))
fail-pm!
(push-cursor! (@@ $temp))))))
diff --git a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux
index e3a255e41..eb20d73c5 100644
--- a/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/eval.jvm.lux
@@ -51,21 +51,21 @@
(def: (parse-tuple lux-object host-object)
(-> (-> Object (Error Any)) ListVector (Error Any))
- (let [size (:! Nat (ListVector::length [] host-object))]
+ (let [size (:coerce Nat (ListVector::length [] host-object))]
(loop [idx +0
- output (:! (Array Any) (array.new size))]
+ output (:coerce (Array Any) (array.new size))]
(if (n/< size idx)
- (case (ListVector::getElementAsSEXP [(:! Int idx)] host-object)
+ (case (ListVector::getElementAsSEXP [(:coerce Int idx)] host-object)
(#e.Error error)
(#e.Error error)
(#e.Success value)
- (case (lux-object (:! Object value))
+ (case (lux-object (:coerce Object value))
(#e.Error error)
(#e.Error error)
(#e.Success lux-value)
- (recur (inc idx) (array.write idx (:! Any lux-value) output))))
+ (recur (inc idx) (array.write idx (:coerce Any lux-value) output))))
(#e.Success output)))))
(def: (parse-variant lux-object host-object)
@@ -74,9 +74,9 @@
[tag (ListVector::get-field-sexp [//.variant-tag-field] host-object)
flag (ListVector::get-field-sexp [//.variant-flag-field] host-object)
value (ListVector::get-field-sexp [//.variant-value-field] host-object)
- value (lux-object (:! Object value))]
+ value (lux-object (:coerce Object value))]
(wrap [(|> tag
- (:! IntArrayVector)
+ (:coerce IntArrayVector)
(IntArrayVector::getElementAsInt [0])
(Long::intValue []))
(: Any
@@ -90,35 +90,35 @@
(do e.Monad<Error>
[high (ListVector::get-field-sexp [//.int-high-field] host-object)
low (ListVector::get-field-sexp [//.int-low-field] host-object)
- #let [get-int-32 (|>> (IntArrayVector::getElementAsInt [0]) (:! Nat))
- high (get-int-32 (:! IntArrayVector high))
- low (get-int-32 (:! IntArrayVector low))]]
- (wrap (:! Int
+ #let [get-int-32 (|>> (IntArrayVector::getElementAsInt [0]) (:coerce Nat))
+ high (get-int-32 (:coerce IntArrayVector high))
+ low (get-int-32 (:coerce IntArrayVector low))]]
+ (wrap (:coerce Int
(n/+ (|> high (bit.left-shift +32))
- (if (i/< 0 (:! Int low))
+ (if (i/< 0 (:coerce Int low))
(|> low (bit.left-shift +32) (bit.logical-right-shift +32))
low))))))
(def: (lux-object host-object)
(-> Object (Error Any))
(cond (host.instance? StringArrayVector host-object)
- (#e.Success (StringArrayVector::getElementAsString [0] (:! StringArrayVector host-object)))
+ (#e.Success (StringArrayVector::getElementAsString [0] (:coerce StringArrayVector host-object)))
(host.instance? LogicalArrayVector host-object)
- (#e.Success (i/= 1 (LogicalArrayVector::getElementAsRawLogical [0] (:! LogicalArrayVector host-object))))
+ (#e.Success (i/= 1 (LogicalArrayVector::getElementAsRawLogical [0] (:coerce LogicalArrayVector host-object))))
(host.instance? IntArrayVector host-object)
- (#e.Success (IntArrayVector::getElementAsInt [0] (:! IntArrayVector host-object)))
+ (#e.Success (IntArrayVector::getElementAsInt [0] (:coerce IntArrayVector host-object)))
(host.instance? DoubleArrayVector host-object)
- (#e.Success (DoubleArrayVector::getElementAsDouble [0] (:! DoubleArrayVector host-object)))
+ (#e.Success (DoubleArrayVector::getElementAsDouble [0] (:coerce DoubleArrayVector host-object)))
(host.instance? ListVector host-object)
- (case (parse-int (:! ListVector host-object))
+ (case (parse-int (:coerce ListVector host-object))
(#e.Error error)
- (case (parse-variant lux-object (:! ListVector host-object))
+ (case (parse-variant lux-object (:coerce ListVector host-object))
(#e.Error error)
- (parse-tuple lux-object (:! ListVector host-object))
+ (parse-tuple lux-object (:coerce ListVector host-object))
output
output)
@@ -127,14 +127,14 @@
output)
## else
- (let [object-class (:! Text (Object::toString [] (Object::getClass [] (:! Object host-object))))
- text-representation (:! Text (Object::toString [] (:! Object host-object)))]
+ (let [object-class (:coerce Text (Object::toString [] (Object::getClass [] (:coerce Object host-object))))
+ text-representation (:coerce Text (Object::toString [] (:coerce Object host-object)))]
(ex.throw Unknown-Kind-Of-Host-Object (format object-class " --- " text-representation)))))
(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/r/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux
index a6101f749..ad89f2e31 100644
--- a/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/primitive.jvm.lux
@@ -15,11 +15,11 @@
(def: #export translate-nat
(-> Nat (Meta Expression))
- (|>> (:! Int) runtimeT.int meta/wrap))
+ (|>> (:coerce Int) runtimeT.int meta/wrap))
(def: #export translate-deg
(-> Deg (Meta Expression))
- (|>> (:! Int) runtimeT.int meta/wrap))
+ (|>> (:coerce Int) runtimeT.int meta/wrap))
(def: #export translate-frac
(-> Frac (Meta Expression))
diff --git a/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux
index 62349abcf..e09410f40 100644
--- a/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/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 []))
diff --git a/new-luxc/source/luxc/lang/translation/ruby.lux b/new-luxc/source/luxc/lang/translation/ruby.lux
index 808d8105c..1ed9f30e1 100644
--- a/new-luxc/source/luxc/lang/translation/ruby.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby.lux
@@ -71,26 +71,26 @@
(Meta Any)
(function (_ compiler)
(#e.Success [(update@ #.host
- (|>> (:! Host)
+ (|>> (:coerce Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Nothing))
+ (:coerce Nothing))
compiler)
[]])))
(def: #export (with-sub-context expr)
(All [a] (-> (Meta a) (Meta [Text a])))
(function (_ compiler)
- (let [old (:! Host (get@ #.host compiler))
+ (let [old (:coerce Host (get@ #.host compiler))
[old-name old-sub] (get@ #context old)
new-name (format old-name "___" (%i (.int old-sub)))]
(case (expr (set@ #.host
- (:! Nothing (set@ #context [new-name +0] old))
+ (:coerce Nothing (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
- (|>> (:! Host)
+ (|>> (:coerce Host)
(set@ #context [old-name (inc old-sub)])
- (:! Nothing))
+ (:coerce Nothing))
compiler')
[new-name output]])
@@ -102,7 +102,7 @@
(function (_ compiler)
(#e.Success [compiler
(|> (get@ #.host compiler)
- (:! Host)
+ (:coerce Host)
(get@ #context)
(let> [name sub]
name))])))
@@ -110,15 +110,15 @@
(def: #export (with-anchor anchor expr)
(All [a] (-> Anchor (Meta a) (Meta a)))
(function (_ compiler)
- (let [old (:! Host (get@ #.host compiler))]
+ (let [old (:coerce Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Nothing (set@ #anchor (#.Some anchor) old))
+ (:coerce Nothing (set@ #anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
- (|>> (:! Host)
+ (|>> (:coerce Host)
(set@ #anchor (get@ #anchor old))
- (:! Nothing))
+ (:coerce Nothing))
compiler')
output])
@@ -128,7 +128,7 @@
(def: #export anchor
(Meta Anchor)
(function (_ compiler)
- (case (|> compiler (get@ #.host) (:! Host) (get@ #anchor))
+ (case (|> compiler (get@ #.host) (:coerce Host) (get@ #anchor))
(#.Some anchor)
(#e.Success [compiler anchor])
@@ -138,7 +138,7 @@
(def: #export module-buffer
(Meta StringBuilder)
(function (_ compiler)
- (case (|> compiler (get@ #.host) (:! Host) (get@ #module-buffer))
+ (case (|> compiler (get@ #.host) (:coerce Host) (get@ #module-buffer))
#.None
((lang.throw No-Active-Module-Buffer "") compiler)
@@ -148,12 +148,12 @@
(def: #export program-buffer
(Meta StringBuilder)
(function (_ compiler)
- (#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))])))
+ (#e.Success [compiler (|> compiler (get@ #.host) (:coerce Host) (get@ #program-buffer))])))
(def: (execute 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)
((lang.throw Cannot-Execute error) compiler)
@@ -175,7 +175,7 @@
(-> Ruby (Meta Any))
(do macro.Monad<Meta>
[module-buffer module-buffer
- #let [_ (Appendable::append [(:! CharSequence code)]
+ #let [_ (Appendable::append [(:coerce CharSequence code)]
module-buffer)]]
(execute code)))
@@ -186,7 +186,7 @@
module-buffer module-buffer
program-buffer program-buffer
#let [module-code (StringBuilder::toString [] module-buffer)
- _ (Appendable::append [(:! CharSequence (format module-code "\n"))]
+ _ (Appendable::append [(:coerce CharSequence (format module-code "\n"))]
program-buffer)]]
(wrap (ioC.write target
(format (lang.normalize-name module) "/" ruby-module-name)
diff --git a/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux
index d76b2a757..b7b1f131d 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/case.jvm.lux
@@ -38,7 +38,7 @@
(let [method (if tail?
runtimeT.product//right
runtimeT.product//left)]
- (method source (ruby.int (:! Int idx)))))
+ (method source (ruby.int (:coerce Int idx)))))
valueO
path))))
@@ -107,22 +107,22 @@
[_ (<tag> value)]
(meta/wrap (ruby.when! (ruby.not (ruby.= (|> value <format>) cursor-top))
(ruby.raise pm-error))))
- ([#.Nat (<| ruby.int (:! Int))]
+ ([#.Nat (<| ruby.int (:coerce Int))]
[#.Int ruby.int]
- [#.Deg (<| ruby.int (:! Int))]
+ [#.Deg (<| ruby.int (:coerce Int))]
[#.Bool ruby.bool]
[#.Frac ruby.float]
[#.Text ruby.string])
(^template [<pm> <getter>]
(^code (<pm> (~ [_ (#.Nat idx)])))
- (meta/wrap (push-cursor! (<getter> cursor-top (ruby.int (:! Int idx))))))
+ (meta/wrap (push-cursor! (<getter> cursor-top (ruby.int (:coerce Int idx))))))
(["lux case tuple left" runtimeT.product//left]
["lux case tuple right" runtimeT.product//right])
(^template [<pm> <flag>]
(^code (<pm> (~ [_ (#.Nat idx)])))
- (meta/wrap (ruby.block! (list (ruby.set! (list "temp") (runtimeT.sum//get cursor-top (ruby.int (:! Int idx)) <flag>))
+ (meta/wrap (ruby.block! (list (ruby.set! (list "temp") (runtimeT.sum//get cursor-top (ruby.int (:coerce Int idx)) <flag>))
(ruby.if! (ruby.= ruby.nil "temp")
(ruby.raise pm-error)
(push-cursor! "temp"))))))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux
index 7d43e5460..3c590e8ee 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/eval.jvm.lux
@@ -37,11 +37,11 @@
(def: (tuple lux-object host-object)
(-> (-> Object (Error Any)) RubyArray (Error Any))
- (let [size (:! Nat (RubyArray::getLength [] host-object))]
+ (let [size (:coerce Nat (RubyArray::getLength [] host-object))]
(loop [idx +0
- output (:! (Array Any) (array.new size))]
+ output (:coerce (Array Any) (array.new size))]
(if (n/< size idx)
- (case (RubyArray::get [(:! Int idx)] host-object)
+ (case (RubyArray::get [(:coerce Int idx)] host-object)
#.None
(recur (inc idx) output)
@@ -56,13 +56,13 @@
(def: (variant lux-object host-object)
(-> (-> Object (Error Any)) RubyHash (Error Any))
- (case [(RubyHash::get [(:! Object //.variant-tag-field)] host-object)
- (RubyHash::get [(:! Object //.variant-flag-field)] host-object)
- (RubyHash::get [(:! Object //.variant-value-field)] host-object)]
+ (case [(RubyHash::get [(:coerce Object //.variant-tag-field)] host-object)
+ (RubyHash::get [(:coerce Object //.variant-flag-field)] host-object)
+ (RubyHash::get [(:coerce Object //.variant-value-field)] host-object)]
(^multi [(#.Some tag) ?flag (#.Some value)]
[(lux-object value)
(#.Some value)])
- (#e.Success [(Long::intValue [] (:! Long tag))
+ (#e.Success [(Long::intValue [] (:coerce Long tag))
(: Any (case ?flag (#.Some _) "" #.None (host.null)))
value])
@@ -81,28 +81,28 @@
(ex.return host-object)
(host.instance? org/jruby/RubyArray host-object)
- (tuple lux-object (:! RubyArray host-object))
+ (tuple lux-object (:coerce RubyArray host-object))
(host.instance? org/jruby/RubyHash host-object)
- (case (variant lux-object (:! RubyHash host-object))
+ (case (variant lux-object (:coerce RubyHash host-object))
(#e.Success value)
(#e.Success value)
_
- (let [object-class (:! Text (Object::toString [] (Object::getClass [] (:! Object host-object))))
- text-representation (:! Text (Object::toString [] (:! Object host-object)))]
+ (let [object-class (:coerce Text (Object::toString [] (Object::getClass [] (:coerce Object host-object))))
+ text-representation (:coerce Text (Object::toString [] (:coerce Object host-object)))]
(ex.throw Unknown-Kind-Of-Host-Object (format object-class " --- " text-representation))))
## else
- (let [object-class (:! Text (Object::toString [] (Object::getClass [] (:! Object host-object))))
- text-representation (:! Text (Object::toString [] (:! Object host-object)))]
+ (let [object-class (:coerce Text (Object::toString [] (Object::getClass [] (:coerce Object host-object))))
+ text-representation (:coerce Text (Object::toString [] (:coerce Object host-object)))]
(ex.throw Unknown-Kind-Of-Host-Object (format object-class " --- " text-representation)))
)))
(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"
@@ -111,7 +111,7 @@
((lang.throw Cannot-Evaluate error) compiler))
(#e.Success output)
- (case (lux-object (:! Object output))
+ (case (lux-object (:coerce Object output))
(#e.Success parsed-output)
(exec ## (log! (format "eval #e.Success\n"
## "<< " code))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux
index 1e76ef9e4..1f05cf2fd 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/primitive.jvm.lux
@@ -16,11 +16,11 @@
(def: #export translate-nat
(-> Nat (Meta Expression))
- (|>> (:! Int) %i meta/wrap))
+ (|>> (:coerce Int) %i meta/wrap))
(def: #export translate-deg
(-> Deg (Meta Expression))
- (|>> (:! Int) %i meta/wrap))
+ (|>> (:coerce Int) %i meta/wrap))
(def: #export translate-frac
(-> Frac (Meta Expression))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux
index 135a09039..83792921d 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/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 []))