aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/generator
diff options
context:
space:
mode:
authorEduardo Julian2017-10-11 18:57:44 -0400
committerEduardo Julian2017-10-11 18:57:44 -0400
commit74a835634fc9ee5457f3cc7109af069dad9f2d2f (patch)
treedec444467ecde32ac165627f782f315ac41567e8 /new-luxc/source/luxc/generator
parentccabfc6a5e41650788199cb8fd5d87731f094bcd (diff)
- Migrated new-luxc to latest version of stdlib.
- Some refactoring.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/generator/common.jvm.lux2
-rw-r--r--new-luxc/source/luxc/generator/eval.jvm.lux2
-rw-r--r--new-luxc/source/luxc/generator/function.jvm.lux155
-rw-r--r--new-luxc/source/luxc/generator/host/jvm.lux36
-rw-r--r--new-luxc/source/luxc/generator/host/jvm/def.lux22
-rw-r--r--new-luxc/source/luxc/generator/host/jvm/inst.lux5
-rw-r--r--new-luxc/source/luxc/generator/procedure.jvm.lux12
-rw-r--r--new-luxc/source/luxc/generator/procedure/common.jvm.lux64
-rw-r--r--new-luxc/source/luxc/generator/runtime.jvm.lux2
9 files changed, 147 insertions, 153 deletions
diff --git a/new-luxc/source/luxc/generator/common.jvm.lux b/new-luxc/source/luxc/generator/common.jvm.lux
index 1f04f5798..054d11098 100644
--- a/new-luxc/source/luxc/generator/common.jvm.lux
+++ b/new-luxc/source/luxc/generator/common.jvm.lux
@@ -21,7 +21,7 @@
(host;import java.lang.ClassLoader
(loadClass [String] (Class Object)))
-(type: #export Bytecode host;Byte-Array)
+(type: #export Bytecode (host;type (Array byte)))
(type: #export Class-Store (A;Atom (d;Dict Text Bytecode)))
diff --git a/new-luxc/source/luxc/generator/eval.jvm.lux b/new-luxc/source/luxc/generator/eval.jvm.lux
index 96f7a4917..4f02dcffb 100644
--- a/new-luxc/source/luxc/generator/eval.jvm.lux
+++ b/new-luxc/source/luxc/generator/eval.jvm.lux
@@ -54,7 +54,7 @@
(visitEnd [] void)
(visitField [int String String String Object] FieldVisitor)
(visitMethod [int String String String (Array String)] MethodVisitor)
- (toByteArray [] Byte-Array))
+ (toByteArray [] (Array byte)))
(def: eval-field Text "_value")
(def: $Object $;Type ($t;class "java.lang.Object" (list)))
diff --git a/new-luxc/source/luxc/generator/function.jvm.lux b/new-luxc/source/luxc/generator/function.jvm.lux
index 135daf47e..e3582e183 100644
--- a/new-luxc/source/luxc/generator/function.jvm.lux
+++ b/new-luxc/source/luxc/generator/function.jvm.lux
@@ -2,7 +2,7 @@
lux
(lux (control [monad #+ do])
(data text/format
- (coll [list "L/" Functor<List> Monoid<List>]))
+ (coll [list "list/" Functor<List> Monoid<List>]))
[macro])
(luxc ["&" base]
(lang ["la" analysis]
@@ -68,7 +68,7 @@
(def: (inputsI start amount)
(-> $;Register Nat $;Inst)
(|> (list;n.range start (n.+ start (n.dec amount)))
- (L/map $i;ALOAD)
+ (list/map $i;ALOAD)
$i;fuse))
(def: (applysI start amount)
@@ -96,26 +96,26 @@
(def: (with-captured env)
(-> (List ls;Variable) $;Def)
(|> (list;enumerate env)
- (L/map (function [[env-idx env-source]]
- ($d;field #$;Private $;finalF (captured env-idx) $Object)))
+ (list/map (function [[env-idx env-source]]
+ ($d;field #$;Private $;finalF (captured env-idx) $Object)))
$d;fuse))
(def: (with-partial arity)
(-> ls;Arity $;Def)
(if (poly-arg? arity)
(|> (list;n.range +0 (n.- +2 arity))
- (L/map (function [idx]
- ($d;field #$;Private $;finalF (partial idx) $Object)))
+ (list/map (function [idx]
+ ($d;field #$;Private $;finalF (partial idx) $Object)))
$d;fuse)
id))
(def: (instance class arity env)
(-> Text ls;Arity (List ls;Variable) $;Inst)
(let [captureI (|> env
- (L/map (function [source]
- (if (function;captured? source)
- ($i;GETFIELD class (captured (function;captured-idx source)) $Object)
- ($i;ALOAD (int-to-nat source)))))
+ (list/map (function [source]
+ (if (function;captured? source)
+ ($i;GETFIELD class (captured (function;captured-idx source)) $Object)
+ ($i;ALOAD (int-to-nat source)))))
$i;fuse)
argsI (if (poly-arg? arity)
(|> (nullsI (n.dec arity))
@@ -136,9 +136,9 @@
captureI (|> (case env-size
+0 (list)
_ (list;n.range +0 (n.dec env-size)))
- (L/map (function [source]
- (|>. ($i;ALOAD +0)
- ($i;GETFIELD class (captured source) $Object))))
+ (list/map (function [source]
+ (|>. ($i;ALOAD +0)
+ ($i;GETFIELD class (captured source) $Object))))
$i;fuse)
argsI (|> (nullsI (n.dec arity))
(list ($i;int 0))
@@ -179,18 +179,18 @@
store-capturedI (|> (case env-size
+0 (list)
_ (list;n.range +0 (n.dec env-size)))
- (L/map (function [register]
- (|>. ($i;ALOAD +0)
- ($i;ALOAD (n.inc register))
- ($i;PUTFIELD class (captured register) $Object))))
+ (list/map (function [register]
+ (|>. ($i;ALOAD +0)
+ ($i;ALOAD (n.inc register))
+ ($i;PUTFIELD class (captured register) $Object))))
$i;fuse)
store-partialI (if (poly-arg? arity)
(|> (list;n.range +0 (n.- +2 arity))
- (L/map (function [idx]
- (let [register (offset-partial idx)]
- (|>. ($i;ALOAD +0)
- ($i;ALOAD (n.inc register))
- ($i;PUTFIELD class (partial idx) $Object)))))
+ (list/map (function [idx]
+ (let [register (offset-partial idx)]
+ (|>. ($i;ALOAD +0)
+ ($i;ALOAD (n.inc register))
+ ($i;PUTFIELD class (partial idx) $Object)))))
$i;fuse)
id)]
($d;method #$;Public $;noneM "<init>" (init-method env arity)
@@ -200,69 +200,62 @@
store-partialI
$i;RETURN))))
-(def: (when test f)
- (All [a] (-> Bool (-> a a) (-> a a)))
- (function [value]
- (if test
- (f value)
- value)))
-
(def: (with-apply class env function-arity @begin bodyI apply-arity)
(-> Text (List ls;Variable) ls;Arity $;Label $;Inst ls;Arity
$;Def)
(let [num-partials (n.dec function-arity)
@default ($;new-label [])
- @labels (L/map $;new-label (list;repeat num-partials []))
+ @labels (list/map $;new-label (list;repeat num-partials []))
arity-over-extent (|> (nat-to-int function-arity) (i.- (nat-to-int apply-arity)))
- casesI (|> (L/append @labels (list @default))
+ casesI (|> (list/compose @labels (list @default))
(list;zip2 (list;n.range +0 num-partials))
- (L/map (function [[stage @label]]
- (let [load-partialsI (if (n.> +0 stage)
- (|> (list;n.range +0 (n.dec stage))
- (L/map (|>. partial (load-fieldI class)))
- $i;fuse)
- id)]
- (cond (i.= arity-over-extent (nat-to-int stage))
- (|>. ($i;label @label)
- ($i;ALOAD +0)
- (when (n.> +0 stage)
- ($i;INVOKEVIRTUAL class "reset" (reset-method class) false))
- load-partialsI
- (inputsI +1 apply-arity)
- ($i;INVOKEVIRTUAL class "impl" (implementation-method function-arity) false)
- $i;ARETURN)
+ (list/map (function [[stage @label]]
+ (let [load-partialsI (if (n.> +0 stage)
+ (|> (list;n.range +0 (n.dec stage))
+ (list/map (|>. partial (load-fieldI class)))
+ $i;fuse)
+ id)]
+ (cond (i.= arity-over-extent (nat-to-int stage))
+ (|>. ($i;label @label)
+ ($i;ALOAD +0)
+ (when (n.> +0 stage)
+ ($i;INVOKEVIRTUAL class "reset" (reset-method class) false))
+ load-partialsI
+ (inputsI +1 apply-arity)
+ ($i;INVOKEVIRTUAL class "impl" (implementation-method function-arity) false)
+ $i;ARETURN)
- (i.> arity-over-extent (nat-to-int stage))
- (let [args-to-completion (|> function-arity (n.- stage))
- args-left (|> apply-arity (n.- args-to-completion))]
- (|>. ($i;label @label)
- ($i;ALOAD +0)
- ($i;INVOKEVIRTUAL class "reset" (reset-method class) false)
- load-partialsI
- (inputsI +1 args-to-completion)
- ($i;INVOKEVIRTUAL class "impl" (implementation-method function-arity) false)
- (applysI (n.inc args-to-completion) args-left)
- $i;ARETURN))
+ (i.> arity-over-extent (nat-to-int stage))
+ (let [args-to-completion (|> function-arity (n.- stage))
+ args-left (|> apply-arity (n.- args-to-completion))]
+ (|>. ($i;label @label)
+ ($i;ALOAD +0)
+ ($i;INVOKEVIRTUAL class "reset" (reset-method class) false)
+ load-partialsI
+ (inputsI +1 args-to-completion)
+ ($i;INVOKEVIRTUAL class "impl" (implementation-method function-arity) false)
+ (applysI (n.inc args-to-completion) args-left)
+ $i;ARETURN))
- ## (i.< arity-over-extent (nat-to-int stage))
- (let [env-size (list;size env)
- load-capturedI (|> (case env-size
- +0 (list)
- _ (list;n.range +0 (n.dec env-size)))
- (L/map (|>. captured (load-fieldI class)))
- $i;fuse)]
- (|>. ($i;label @label)
- ($i;NEW class)
- $i;DUP
- load-capturedI
- get-amount-of-partialsI
- (inc-intI apply-arity)
- load-partialsI
- (inputsI +1 apply-arity)
- (nullsI (|> num-partials (n.- apply-arity) (n.- stage)))
- ($i;INVOKESPECIAL class "<init>" (init-method env function-arity) false)
- $i;ARETURN))
- ))))
+ ## (i.< arity-over-extent (nat-to-int stage))
+ (let [env-size (list;size env)
+ load-capturedI (|> (case env-size
+ +0 (list)
+ _ (list;n.range +0 (n.dec env-size)))
+ (list/map (|>. captured (load-fieldI class)))
+ $i;fuse)]
+ (|>. ($i;label @label)
+ ($i;NEW class)
+ $i;DUP
+ load-capturedI
+ get-amount-of-partialsI
+ (inc-intI apply-arity)
+ load-partialsI
+ (inputsI +1 apply-arity)
+ (nullsI (|> num-partials (n.- apply-arity) (n.- stage)))
+ ($i;INVOKESPECIAL class "<init>" (init-method env function-arity) false)
+ $i;ARETURN))
+ ))))
$i;fuse)]
($d;method #$;Public $;noneM &runtime;apply-method (&runtime;apply-signature apply-arity)
(|>. get-amount-of-partialsI
@@ -286,7 +279,7 @@
(if (poly-arg? arity)
(|> (n.min arity &runtime;num-apply-variants)
(list;n.range +1)
- (L/map (with-apply class env arity @begin bodyI))
+ (list/map (with-apply class env arity @begin bodyI))
(list& (with-implementation arity @begin bodyI))
$d;fuse)
($d;method #$;Public $;strictM &runtime;apply-method (&runtime;apply-signature +1)
@@ -332,10 +325,10 @@
[functionI (generate functionS)
argsI (monad;map @ generate argsS)
#let [applyI (|> (segment &runtime;num-apply-variants argsI)
- (L/map (function [chunkI+]
- (|>. ($i;CHECKCAST &runtime;function-class)
- ($i;fuse chunkI+)
- ($i;INVOKEVIRTUAL &runtime;function-class &runtime;apply-method (&runtime;apply-signature (list;size chunkI+)) false))))
+ (list/map (function [chunkI+]
+ (|>. ($i;CHECKCAST &runtime;function-class)
+ ($i;fuse chunkI+)
+ ($i;INVOKEVIRTUAL &runtime;function-class &runtime;apply-method (&runtime;apply-signature (list;size chunkI+)) false))))
$i;fuse)]]
(wrap (|>. functionI
applyI))))
diff --git a/new-luxc/source/luxc/generator/host/jvm.lux b/new-luxc/source/luxc/generator/host/jvm.lux
index 149fbf123..4fb3fa77d 100644
--- a/new-luxc/source/luxc/generator/host/jvm.lux
+++ b/new-luxc/source/luxc/generator/host/jvm.lux
@@ -2,7 +2,7 @@
[lux #- Type Def]
(lux (control monad
["p" parser])
- (data (coll [list "L/" Functor<List>]))
+ (data (coll [list "list/" Functor<List>]))
[macro]
(macro [code]
["s" syntax #+ syntax:])
@@ -86,32 +86,32 @@
[options (s;tuple (p;many s;local-symbol))])
(let [g!type (code;local-symbol type)
g!none (code;local-symbol none)
- g!tags+ (L/map code;local-tag options)
+ g!tags+ (list/map code;local-tag options)
g!_left (code;local-symbol "_left")
g!_right (code;local-symbol "_right")
- g!options+ (L/map (function [option]
- (` (def: (~' #export) (~ (code;local-symbol option))
- (~ g!type)
- (|> (~ g!none)
- (set@ (~ (code;local-tag option)) true)))))
- options)]
+ g!options+ (list/map (function [option]
+ (` (def: (~' #export) (~ (code;local-symbol option))
+ (~ g!type)
+ (|> (~ g!none)
+ (set@ (~ (code;local-tag option)) true)))))
+ options)]
(wrap (list& (` (type: (~' #export) (~ g!type)
- (~ (code;record (L/map (function [tag]
- [tag (` ;Bool)])
- g!tags+)))))
+ (~ (code;record (list/map (function [tag]
+ [tag (` ;Bool)])
+ g!tags+)))))
(` (def: (~' #export) (~ g!none)
(~ g!type)
- (~ (code;record (L/map (function [tag]
- [tag (` false)])
- g!tags+)))))
+ (~ (code;record (list/map (function [tag]
+ [tag (` false)])
+ g!tags+)))))
(` (def: (~' #export) ((~ (code;local-symbol ++)) (~ g!_left) (~ g!_right))
(-> (~ g!type) (~ g!type) (~ g!type))
- (~ (code;record (L/map (function [tag]
- [tag (` (and (get@ (~ tag) (~ g!_left))
- (get@ (~ tag) (~ g!_right))))])
- g!tags+)))))
+ (~ (code;record (list/map (function [tag]
+ [tag (` (and (get@ (~ tag) (~ g!_left))
+ (get@ (~ tag) (~ g!_right))))])
+ g!tags+)))))
g!options+))))
diff --git a/new-luxc/source/luxc/generator/host/jvm/def.lux b/new-luxc/source/luxc/generator/host/jvm/def.lux
index 18cd4f945..7dd78ceb3 100644
--- a/new-luxc/source/luxc/generator/host/jvm/def.lux
+++ b/new-luxc/source/luxc/generator/host/jvm/def.lux
@@ -4,7 +4,7 @@
text/format
[product]
(coll ["a" array]
- [list "L/" Functor<List>]))
+ [list "list/" Functor<List>]))
[host #+ do-to])
["$" ..]
(.. ["$t" type]))
@@ -56,13 +56,13 @@
(visitEnd [] void)
(visitField [int String String String Object] FieldVisitor)
(visitMethod [int String String String (Array String)] MethodVisitor)
- (toByteArray [] Byte-Array))
+ (toByteArray [] (Array byte)))
## [Defs]
(def: (string-array values)
(-> (List Text) (a;Array Text))
(let [output (host;array String (list;size values))]
- (exec (L/map (function [[idx value]]
+ (exec (list/map (function [[idx value]]
(host;array-write idx value output))
(list;enumerate values))
output)))
@@ -70,7 +70,7 @@
(def: exceptions-array
(-> $;Method (a;Array Text))
(|>. (get@ #$;exceptions)
- (L/map (|>. #$;Generic $t;descriptor))
+ (list/map (|>. #$;Generic $t;descriptor))
string-array))
(def: (version-flag version)
@@ -127,7 +127,7 @@
(format name
(param-signature super)
(|> interfaces
- (L/map param-signature)
+ (list/map param-signature)
(text;join-with ""))))
(def: (parameters-signature parameters super interfaces)
@@ -137,13 +137,13 @@
""
(format "<"
(|> parameters
- (L/map formal-param)
+ (list/map formal-param)
(text;join-with ""))
">"))]
(format formal-params
(|> super class-to-type $t;signature)
(|> interfaces
- (L/map (|>. class-to-type $t;signature))
+ (list/map (|>. class-to-type $t;signature))
(text;join-with "")))))
(def: class-computes
@@ -156,7 +156,7 @@
[(def: #export (<name> version visibility config name parameters super interfaces
definitions)
(-> $;Version $;Visibility $;Class-Config Text (List $;Parameter) $;Class (List $;Class) $;Def
- host;Byte-Array)
+ (host;type (Array byte)))
(let [writer (|> (do-to (ClassWriter.new class-computes)
(ClassWriter.visit [(version-flag version)
($_ i.+
@@ -168,7 +168,7 @@
(parameters-signature parameters super interfaces)
(|> super product;left $t;binary-name)
(|> interfaces
- (L/map (|>. product;left $t;binary-name))
+ (list/map (|>. product;left $t;binary-name))
string-array)]))
definitions)
_ (ClassWriter.visitEnd [] writer)]
@@ -183,7 +183,7 @@
(def: #export (interface version visibility config name parameters interfaces
definitions)
(-> $;Version $;Visibility $;Class-Config Text (List $;Parameter) (List $;Class) $;Def
- host;Byte-Array)
+ (host;type (Array byte)))
(let [writer (|> (do-to (ClassWriter.new class-computes)
(ClassWriter.visit [(version-flag version)
($_ i.+
@@ -195,7 +195,7 @@
(parameters-signature parameters $Object interfaces)
(|> $Object product;left $t;binary-name)
(|> interfaces
- (L/map (|>. product;left $t;binary-name))
+ (list/map (|>. product;left $t;binary-name))
string-array)]))
definitions)
_ (ClassWriter.visitEnd [] writer)]
diff --git a/new-luxc/source/luxc/generator/host/jvm/inst.lux b/new-luxc/source/luxc/generator/host/jvm/inst.lux
index 02027294a..aa9a852dd 100644
--- a/new-luxc/source/luxc/generator/host/jvm/inst.lux
+++ b/new-luxc/source/luxc/generator/host/jvm/inst.lux
@@ -2,8 +2,9 @@
[lux #- char]
(lux (control monad
["p" parser])
- (data text/format
+ (data [maybe]
["R" result]
+ text/format
(coll [list "L/" Functor<List>]))
[host #+ do-to]
[macro]
@@ -262,7 +263,7 @@
_ (loop [idx +0]
(if (n.< num-labels idx)
(exec (host;array-write idx
- (assume (list;nth idx labels))
+ (maybe;assume (list;nth idx labels))
labels-array)
(recur (n.inc idx)))
[]))]
diff --git a/new-luxc/source/luxc/generator/procedure.jvm.lux b/new-luxc/source/luxc/generator/procedure.jvm.lux
index 77828c952..524513eb5 100644
--- a/new-luxc/source/luxc/generator/procedure.jvm.lux
+++ b/new-luxc/source/luxc/generator/procedure.jvm.lux
@@ -2,8 +2,8 @@
(;module:
lux
(lux (control [monad #+ do])
- (data text/format
- [maybe]
+ (data [maybe]
+ text/format
(coll ["d" dict])))
(luxc ["&" base]
(lang ["ls" synthesis])
@@ -13,7 +13,7 @@
(def: #export (generate-procedure generate name args)
(-> (-> ls;Synthesis (Lux $;Inst)) Text (List ls;Synthesis)
(Lux $;Inst))
- (default (&;fail (format "Unknown procedure: " (%t name)))
- (do maybe;Monad<Maybe>
- [proc (d;get name &&common;procedures)]
- (wrap (proc generate args)))))
+ (<| (maybe;default (&;fail (format "Unknown procedure: " (%t name))))
+ (do maybe;Monad<Maybe>
+ [proc (d;get name &&common;procedures)]
+ (wrap (proc generate args)))))
diff --git a/new-luxc/source/luxc/generator/procedure/common.jvm.lux b/new-luxc/source/luxc/generator/procedure/common.jvm.lux
index 9f8afdbb2..ffbe69708 100644
--- a/new-luxc/source/luxc/generator/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/generator/procedure/common.jvm.lux
@@ -3,9 +3,9 @@
(lux (control [monad #+ do])
(data [text]
text/format
- (coll [list "L/" Functor<List> Monoid<List>]
- ["D" dict]))
- [macro #+ Monad<Lux> with-gensyms]
+ (coll [list "list/" Functor<List>]
+ [dict #+ Dict]))
+ [macro #+ with-gensyms]
(macro [code]
["s" syntax #+ syntax:])
[host])
@@ -41,7 +41,7 @@
(-> Generator (List ls;Synthesis) (Lux $;Inst)))
(type: Bundle
- (D;Dict Text Proc))
+ (Dict Text Proc))
(syntax: (Vector [size s;nat] elemT)
(wrap (list (` [(~@ (list;repeat size elemT))]))))
@@ -61,7 +61,7 @@
(def: (install name unnamed)
(-> Text (-> Text Proc)
(-> Bundle Bundle))
- (D;put name (unnamed name)))
+ (dict;put name (unnamed name)))
(def: (wrong-amount-error proc expected actual)
(-> Text Nat Nat Text)
@@ -82,8 +82,8 @@
(^ (list (~@ g!input+)))
(do macro;Monad<Lux>
[(~@ (|> g!input+
- (L/map (function [g!input]
- (list g!input (` ((~ g!generate) (~ g!input))))))
+ (list/map (function [g!input]
+ (list g!input (` ((~ g!generate) (~ g!input))))))
list;concat))]
((~' wrap) ((~ g!proc) [(~@ g!input+)])))
@@ -527,13 +527,13 @@
## [Bundles]
(def: lux-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "lux is" (binary lux//is))
(install "lux try" (unary lux//try))))
(def: bit-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "bit count" (unary bit//count))
(install "bit and" (binary bit//and))
(install "bit or" (binary bit//or))
@@ -545,7 +545,7 @@
(def: nat-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "nat +" (binary nat//add))
(install "nat -" (binary nat//sub))
(install "nat *" (binary nat//mul))
@@ -560,7 +560,7 @@
(def: int-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "int +" (binary int//add))
(install "int -" (binary int//sub))
(install "int *" (binary int//mul))
@@ -575,7 +575,7 @@
(def: deg-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "deg +" (binary deg//add))
(install "deg -" (binary deg//sub))
(install "deg *" (binary deg//mul))
@@ -591,7 +591,7 @@
(def: frac-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "frac +" (binary frac//add))
(install "frac -" (binary frac//sub))
(install "frac *" (binary frac//mul))
@@ -612,7 +612,7 @@
(def: text-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "text =" (binary text//eq))
(install "text <" (binary text//lt))
(install "text append" (binary text//append))
@@ -626,7 +626,7 @@
(def: array-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "array new" (unary array//new))
(install "array get" (binary array//get))
(install "array put" (trinary array//put))
@@ -636,7 +636,7 @@
(def: math-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "math cos" (unary math//cos))
(install "math sin" (unary math//sin))
(install "math tan" (unary math//tan))
@@ -659,7 +659,7 @@
(def: io-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "io log" (unary io//log))
(install "io error" (unary io//error))
(install "io exit" (unary io//exit))
@@ -667,14 +667,14 @@
(def: atom-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "atom new" (unary atom//new))
(install "atom read" (unary atom//read))
(install "atom compare-and-swap" (trinary atom//compare-and-swap))))
(def: process-procs
Bundle
- (|> (D;new text;Hash<Text>)
+ (|> (dict;new text;Hash<Text>)
(install "process concurrency-level" (nullary process//concurrency-level))
(install "process future" (unary process//future))
(install "process schedule" (binary process//schedule))
@@ -682,17 +682,17 @@
(def: #export procedures
Bundle
- (|> (D;new text;Hash<Text>)
- (D;merge lux-procs)
- (D;merge bit-procs)
- (D;merge nat-procs)
- (D;merge int-procs)
- (D;merge deg-procs)
- (D;merge frac-procs)
- (D;merge text-procs)
- (D;merge array-procs)
- (D;merge math-procs)
- (D;merge io-procs)
- (D;merge atom-procs)
- (D;merge process-procs)
+ (|> (dict;new text;Hash<Text>)
+ (dict;merge lux-procs)
+ (dict;merge bit-procs)
+ (dict;merge nat-procs)
+ (dict;merge int-procs)
+ (dict;merge deg-procs)
+ (dict;merge frac-procs)
+ (dict;merge text-procs)
+ (dict;merge array-procs)
+ (dict;merge math-procs)
+ (dict;merge io-procs)
+ (dict;merge atom-procs)
+ (dict;merge process-procs)
))
diff --git a/new-luxc/source/luxc/generator/runtime.jvm.lux b/new-luxc/source/luxc/generator/runtime.jvm.lux
index 69f90cea0..c073e7da0 100644
--- a/new-luxc/source/luxc/generator/runtime.jvm.lux
+++ b/new-luxc/source/luxc/generator/runtime.jvm.lux
@@ -39,7 +39,7 @@
(new [int])
(visit [int int String String String (Array String)] void)
(visitEnd [] void)
- (toByteArray [] Byte-Array))
+ (toByteArray [] (Array byte)))
(def: #export runtime-class Text "LuxRuntime")
(def: #export function-class Text "LuxFunction")