aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/r
diff options
context:
space:
mode:
authorEduardo Julian2018-05-06 00:45:45 -0400
committerEduardo Julian2018-05-06 00:45:45 -0400
commit8787650c4b1641832db9df2c35bc3046e886220e (patch)
tree8c14799379226aa8452d39d91e9a56896db9187f /new-luxc/source/luxc/lang/translation/r
parent3c93d7a3aabaa49c67f9a498bc0d70f0af7f09d0 (diff)
- Updated new-luxc to the latest stdlib changes.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/r.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/r/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/r/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/r/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/r/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux2
13 files changed, 38 insertions, 38 deletions
diff --git a/new-luxc/source/luxc/lang/translation/r.lux b/new-luxc/source/luxc/lang/translation/r.lux
index 446df095d..410e167bc 100644
--- a/new-luxc/source/luxc/lang/translation/r.lux
+++ b/new-luxc/source/luxc/lang/translation/r.lux
@@ -56,7 +56,7 @@
(type: #export Host
{#context [Text Nat]
#anchor (Maybe Anchor)
- #loader (-> Expression (Error Unit))
+ #loader (-> Expression (Error Top))
#interpreter (-> Expression (Error Object))
#module-buffer (Maybe StringBuilder)
#program-buffer StringBuilder})
@@ -82,12 +82,12 @@
(def: #export r-module-name Text "module.r")
(def: #export init-module-buffer
- (Meta Unit)
+ (Meta Top)
(function (_ compiler)
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Void))
+ (:! Bottom))
compiler)
[]])))
@@ -98,13 +98,13 @@
[old-name old-sub] (get@ #context old)
new-name (format old-name "f___" (%i (nat-to-int old-sub)))]
(case (expr (set@ #.host
- (:! Void (set@ #context [new-name +0] old))
+ (:! Bottom (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #context [old-name (n/inc old-sub)])
- (:! Void))
+ (:! Bottom))
compiler')
[new-name output]])
@@ -126,13 +126,13 @@
(function (_ compiler)
(let [old (:! Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Void (set@ #anchor (#.Some anchor) old))
+ (:! Bottom (set@ #anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #anchor (get@ #anchor old))
- (:! Void))
+ (:! Bottom))
compiler')
output])
@@ -176,7 +176,7 @@
(#e.Success output)
(#e.Success [compiler output])))))]
- [load! #loader Unit]
+ [load! #loader Top]
[interpret #interpreter Object]
)
@@ -194,7 +194,7 @@
(lang.normalize-name (format module "$" name)))
(def: #export (save code)
- (-> Expression (Meta Unit))
+ (-> Expression (Meta Top))
(do macro.Monad<Meta>
[module-buffer module-buffer
#let [_ (Appendable::append [(:! CharSequence (r.expression code))]
@@ -204,7 +204,7 @@
(def: #export run interpret)
(def: #export (save-module! target)
- (-> File (Meta (Process Unit)))
+ (-> File (Meta (Process Top)))
(do macro.Monad<Meta>
[module macro.current-module-name
module-buffer module-buffer
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 8a61f0263..21d8f1def 100644
--- a/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/case.jvm.lux
@@ -6,7 +6,7 @@
[text]
text/format
(coll [list "list/" Functor<List> Fold<List>]
- [set #+ Set]))
+ (set ["set" unordered #+ Set])))
[macro #+ "meta/" Monad<Meta>]
(macro [code]))
(luxc [lang]
diff --git a/new-luxc/source/luxc/lang/translation/r/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure.jvm.lux
index 0cb14d379..468d09523 100644
--- a/new-luxc/source/luxc/lang/translation/r/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/procedure.jvm.lux
@@ -4,7 +4,7 @@
["ex" exception #+ exception:])
(data [maybe]
text/format
- (coll [dict])))
+ (coll (dictionary ["dict" unordered #+ Dict]))))
(luxc ["&" lang]
(lang ["ls" synthesis]
(host [r #+ Expression])))
diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
index bc2289f6a..f190f88ed 100644
--- a/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/procedure/common.jvm.lux
@@ -8,7 +8,7 @@
text/format
[number]
(coll [list "list/" Functor<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro #+ with-gensyms]
(macro [code]
["s" syntax #+ syntax:])
@@ -33,7 +33,7 @@
(type: #export Bundle
(Dict Text Proc))
-(syntax: (Vector [size s.nat] elemT)
+(syntax: (Vector {size s.nat} elemT)
(wrap (list (` [(~+ (list.repeat size elemT))]))))
(type: #export Nullary (-> (Vector +0 Expression) Expression))
@@ -61,7 +61,7 @@
"Expected: " (|> expected nat-to-int %i) "\n"
" Actual: " (|> actual nat-to-int %i)))
-(syntax: (arity: [name s.local-symbol] [arity s.nat])
+(syntax: (arity: {name s.local-symbol} {arity s.nat})
(with-gensyms [g!_ g!proc g!name g!translate g!inputs]
(do @
[g!input+ (monad.seq @ (list.repeat arity (macro.gensym "input")))]
diff --git a/new-luxc/source/luxc/lang/translation/r/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/r/procedure/host.jvm.lux
index c1b43da2f..af82491b6 100644
--- a/new-luxc/source/luxc/lang/translation/r/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/procedure/host.jvm.lux
@@ -4,7 +4,7 @@
(data [text]
text/format
(coll [list "list/" Functor<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro "macro/" Monad<Meta>])
(luxc ["&" lang]
(lang ["la" analysis]
diff --git a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
index 30eaf2a77..7183815c7 100644
--- a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
@@ -85,7 +85,7 @@
(p.either (p.seq s.local-symbol (p/wrap (list)))
(s.form (p.seq s.local-symbol (p.some s.local-symbol)))))
-(syntax: (runtime: [[name args] declaration]
+(syntax: (runtime: {[name args] declaration}
definition)
(let [implementation (code.local-symbol (format "@@" name))
runtime (format prefix "__" (lang.normalize-name name))
@@ -121,7 +121,7 @@
(r.function (list (~+ argsLC+))
(~ definition)))))))))))))
-(syntax: #export (with-vars [vars (s.tuple (p.many s.local-symbol))]
+(syntax: #export (with-vars {vars (s.tuple (p.many s.local-symbol))}
body)
(wrap (list (` (let [(~+ (|> vars
(list/map (function (_ var)
@@ -1049,7 +1049,7 @@
(def: #export artifact Text (format prefix ".r"))
(def: #export translate
- (Meta (Process Unit))
+ (Meta (Process Top))
(do macro.Monad<Meta>
[_ //.init-module-buffer
_ (//.save runtime)]
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 04a31d687..7ff6a23e8 100644
--- a/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/statement.jvm.lux
@@ -11,7 +11,7 @@
[".T" eval]))
(def: #export (translate-def name expressionT expressionO metaV)
- (-> Text Type Expression Code (Meta Unit))
+ (-> Text Type Expression Code (Meta Top))
(do macro.Monad<Meta>
[current-module macro.current-module-name
#let [def-ident [current-module name]]]
diff --git a/new-luxc/source/luxc/lang/translation/ruby.lux b/new-luxc/source/luxc/lang/translation/ruby.lux
index e405b2b4f..16b0813d5 100644
--- a/new-luxc/source/luxc/lang/translation/ruby.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby.lux
@@ -68,12 +68,12 @@
(def: #export ruby-module-name Text "module.rb")
(def: #export init-module-buffer
- (Meta Unit)
+ (Meta Top)
(function (_ compiler)
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #module-buffer (#.Some (StringBuilder::new [])))
- (:! Void))
+ (:! Bottom))
compiler)
[]])))
@@ -84,13 +84,13 @@
[old-name old-sub] (get@ #context old)
new-name (format old-name "___" (%i (nat-to-int old-sub)))]
(case (expr (set@ #.host
- (:! Void (set@ #context [new-name +0] old))
+ (:! Bottom (set@ #context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #context [old-name (n/inc old-sub)])
- (:! Void))
+ (:! Bottom))
compiler')
[new-name output]])
@@ -112,13 +112,13 @@
(function (_ compiler)
(let [old (:! Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Void (set@ #anchor (#.Some anchor) old))
+ (:! Bottom (set@ #anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #anchor (get@ #anchor old))
- (:! Void))
+ (:! Bottom))
compiler')
output])
@@ -151,7 +151,7 @@
(#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))])))
(def: (execute code)
- (-> Expression (Meta Unit))
+ (-> Expression (Meta Top))
(function (_ compiler)
(let [interpreter (|> compiler (get@ #.host) (:! Host) (get@ #interpreter))]
(case (interpreter code)
@@ -165,14 +165,14 @@
(def: #export variant-flag-field "_lux_flag")
(def: #export variant-value-field "_lux_value")
-(def: #export unit Text "\u0000")
+(def: #export unit Text "")
(def: #export (definition-name [module name])
(-> Ident Text)
(lang.normalize-name (format module "$" name)))
(def: #export (save code)
- (-> Ruby (Meta Unit))
+ (-> Ruby (Meta Top))
(do macro.Monad<Meta>
[module-buffer module-buffer
#let [_ (Appendable::append [(:! CharSequence code)]
@@ -180,7 +180,7 @@
(execute code)))
(def: #export (save-module! target)
- (-> File (Meta (Process Unit)))
+ (-> File (Meta (Process Top)))
(do macro.Monad<Meta>
[module macro.current-module-name
module-buffer module-buffer
diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure.jvm.lux
index 0bda70ad9..036a68d0c 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/procedure.jvm.lux
@@ -4,7 +4,7 @@
["ex" exception #+ exception:])
(data [maybe]
text/format
- (coll [dict])))
+ (coll (dictionary ["dict" unordered #+ Dict]))))
(luxc ["&" lang]
(lang ["ls" synthesis]
(host [ruby #+ Ruby Expression Statement])))
diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
index 39c1f561d..8e58c06d4 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux
@@ -7,7 +7,7 @@
[text]
text/format
(coll [list "list/" Functor<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro #+ with-gensyms]
(macro [code]
["s" syntax #+ syntax:])
@@ -32,7 +32,7 @@
(type: #export Bundle
(Dict Text Proc))
-(syntax: (Vector [size s.nat] elemT)
+(syntax: (Vector {size s.nat} elemT)
(wrap (list (` [(~+ (list.repeat size elemT))]))))
(type: #export Nullary (-> (Vector +0 Expression) Expression))
@@ -60,7 +60,7 @@
"Expected: " (|> expected nat-to-int %i) "\n"
" Actual: " (|> actual nat-to-int %i)))
-(syntax: (arity: [name s.local-symbol] [arity s.nat])
+(syntax: (arity: {name s.local-symbol} {arity s.nat})
(with-gensyms [g!_ g!proc g!name g!translate g!inputs]
(do @
[g!input+ (monad.seq @ (list.repeat arity (macro.gensym "input")))]
diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/host.jvm.lux
index c1b43da2f..af82491b6 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/host.jvm.lux
@@ -4,7 +4,7 @@
(data [text]
text/format
(coll [list "list/" Functor<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro "macro/" Monad<Meta>])
(luxc ["&" lang]
(lang ["la" analysis]
diff --git a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
index 9e6383ce4..1e1e4c53a 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
@@ -55,7 +55,7 @@
(p.either (p.seq s.local-symbol (p/wrap (list)))
(s.form (p.seq s.local-symbol (p.some s.local-symbol)))))
-(syntax: (runtime: [[name args] declaration]
+(syntax: (runtime: {[name args] declaration}
definition)
(let [implementation (code.local-symbol (format "@@" name))
runtime (code.text (format "__" prefix "__" (lang.normalize-name name)))
@@ -378,7 +378,7 @@
(def: #export artifact Text (format prefix ".rb"))
(def: #export translate
- (Meta (Process Unit))
+ (Meta (Process Top))
(do macro.Monad<Meta>
[_ //.init-module-buffer
_ (//.save runtime)]
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 5f2cdef06..972a6428e 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/statement.jvm.lux
@@ -11,7 +11,7 @@
[".T" eval]))
(def: #export (translate-def name expressionT expressionO metaV)
- (-> Text Type Expression Code (Meta Unit))
+ (-> Text Type Expression Code (Meta Top))
(do macro.Monad<Meta>
[current-module macro.current-module-name
#let [def-ident [current-module name]]]