aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/php.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/case.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/eval.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/function.jvm.lux8
-rw-r--r--new-luxc/source/luxc/lang/translation/php/loop.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux2
7 files changed, 14 insertions, 14 deletions
diff --git a/new-luxc/source/luxc/lang/translation/php.lux b/new-luxc/source/luxc/lang/translation/php.lux
index 50bfd5289..8ee0f9c14 100644
--- a/new-luxc/source/luxc/lang/translation/php.lux
+++ b/new-luxc/source/luxc/lang/translation/php.lux
@@ -91,14 +91,14 @@
(function (_ compiler)
(let [old (:! Host (get@ #.host compiler))
[old-name old-sub] (get@ #context old)
- new-name (format old-name "___" (%i (nat-to-int old-sub)))]
+ new-name (format old-name "___" (%i (.int old-sub)))]
(case (expr (set@ #.host
(:! Nothing (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
- (set@ #context [old-name (n/inc old-sub)])
+ (set@ #context [old-name (inc old-sub)])
(:! Nothing))
compiler')
[new-name output]])
diff --git a/new-luxc/source/luxc/lang/translation/php/case.jvm.lux b/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
index 0cfd66729..3a5eff053 100644
--- a/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
@@ -185,7 +185,7 @@
(let [outer recur]
(case pathP
(^code ("lux case bind" (~ [_ (#.Nat register)])))
- (update@ #bindings (set.add (nat-to-int register))
+ (update@ #bindings (set.add (.int register))
outer-variables)
(^or (^code ("lux case seq" (~ leftP) (~ rightP)))
@@ -218,7 +218,7 @@
(list/fold inner inner-variables))
(^code ("lux let" (~ [_ (#.Nat register)]) (~ inputS) (~ exprS)))
- (list/fold inner (update@ #bindings (set.add (nat-to-int register))
+ (list/fold inner (update@ #bindings (set.add (.int register))
inner-variables)
(list inputS exprS))
diff --git a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux
index 48c09c6c0..54ec6abc2 100644
--- a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux
@@ -69,11 +69,11 @@
(ArrayMemory::get [(LongMemory::new [idx])])
(:! ReferenceMemory) (ReferenceMemory::getValue []))]
(if (host.instance? php/runtime/memory/NullMemory value)
- (recur (i/inc idx)
+ (recur (inc idx)
(array.write (:! Nat idx) (host.null) output))
(do e.Monad<Error>
[lux-value (lux-object value)]
- (recur (i/inc idx)
+ (recur (inc idx)
(array.write (:! Nat idx) lux-value output)))))
(ex.return output)))))
diff --git a/new-luxc/source/luxc/lang/translation/php/function.jvm.lux b/new-luxc/source/luxc/lang/translation/php/function.jvm.lux
index 9a283439f..27a265566 100644
--- a/new-luxc/source/luxc/lang/translation/php/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/function.jvm.lux
@@ -25,8 +25,8 @@
(def: (input-declaration! register)
(-> Register Statement)
- (_.set! (referenceT.variable (n/inc register))
- (_.nth (|> register nat-to-int _.int)
+ (_.set! (referenceT.variable (inc register))
+ (_.nth (|> register .int _.int)
@curried)))
(def: (with-closure function-name inits function-definition!)
@@ -61,10 +61,10 @@
closureO+ (monad.map @ referenceT.translate-variable env)
#let [@function (_.var function-name)
self-init! (_.set! (referenceT.variable +0) @function)
- args-inits! (|> (list.n/range +0 (n/dec arity))
+ args-inits! (|> (list.n/range +0 (dec arity))
(list/map input-declaration!)
(list/fold _.then! self-init!))
- arityO (|> arity nat-to-int _.int)
+ arityO (|> arity .int _.int)
@num_args (_.var "num_args")]]
(with-closure function-name closureO+
(function (_ captured)
diff --git a/new-luxc/source/luxc/lang/translation/php/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/php/loop.jvm.lux
index 8a5b40261..ddc4f67ab 100644
--- a/new-luxc/source/luxc/lang/translation/php/loop.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/loop.jvm.lux
@@ -22,7 +22,7 @@
## (translate bodyS))
## #let [$loop-name (python.var loop-name)
## @loop-name (@@ $loop-name)]
-## _ (//.save (python.def! $loop-name (|> (list.n/range +0 (n/dec (list.size initsS+)))
+## _ (//.save (python.def! $loop-name (|> (list.n/range +0 (dec (list.size initsS+)))
## (list/map (|>> (n/+ offset) referenceT.variable)))
## (python.return! bodyO)))]
## (wrap (python.apply initsO+ @loop-name))))
diff --git a/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux
index b4e9737ee..be1a87761 100644
--- a/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux
@@ -58,8 +58,8 @@
(def: (wrong-arity proc expected actual)
(-> Text Nat Nat Text)
(format "Wrong number of arguments for " (%t proc) "\n"
- "Expected: " (|> expected nat-to-int %i) "\n"
- " Actual: " (|> actual nat-to-int %i)))
+ "Expected: " (|> expected .int %i) "\n"
+ " Actual: " (|> actual .int %i)))
(syntax: (arity: {name s.local-symbol} {arity s.nat})
(with-gensyms [g!_ g!proc g!name g!translate g!inputs]
diff --git a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
index 5f9745845..aeffe45e5 100644
--- a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
@@ -30,7 +30,7 @@
(def: #export (variant tag last? value)
(-> Nat Bool Expression Computation)
- (variant' (_.int (nat-to-int tag))
+ (variant' (_.int (.int tag))
(flag last?)
value))