aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc
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
parent3c93d7a3aabaa49c67f9a498bc0d70f0af7f09d0 (diff)
- Updated new-luxc to the latest stdlib changes.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/cache/description.lux8
-rw-r--r--new-luxc/source/luxc/cache/io.lux10
-rw-r--r--new-luxc/source/luxc/io.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang.lux2
-rw-r--r--new-luxc/source/luxc/lang/analysis/case.lux2
-rw-r--r--new-luxc/source/luxc/lang/analysis/case/coverage.lux2
-rw-r--r--new-luxc/source/luxc/lang/analysis/primitive.lux2
-rw-r--r--new-luxc/source/luxc/lang/analysis/structure.lux4
-rw-r--r--new-luxc/source/luxc/lang/extension.lux10
-rw-r--r--new-luxc/source/luxc/lang/extension/analysis.lux2
-rw-r--r--new-luxc/source/luxc/lang/extension/analysis/common.lux10
-rw-r--r--new-luxc/source/luxc/lang/extension/analysis/host.jvm.lux8
-rw-r--r--new-luxc/source/luxc/lang/extension/statement.lux8
-rw-r--r--new-luxc/source/luxc/lang/extension/synthesis.lux2
-rw-r--r--new-luxc/source/luxc/lang/extension/translation.lux2
-rw-r--r--new-luxc/source/luxc/lang/host.jvm.lux14
-rw-r--r--new-luxc/source/luxc/lang/host/common-lisp.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/jvm.lux10
-rw-r--r--new-luxc/source/luxc/lang/host/jvm/inst.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/php.lux10
-rw-r--r--new-luxc/source/luxc/lang/host/python.lux6
-rw-r--r--new-luxc/source/luxc/lang/host/r.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/scheme.lux4
-rw-r--r--new-luxc/source/luxc/lang/init.lux4
-rw-r--r--new-luxc/source/luxc/lang/module.lux14
-rw-r--r--new-luxc/source/luxc/lang/synthesis/expression.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/js.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/js/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux12
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/lua.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/php.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/php/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/php/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/php/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/php/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/python.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/python/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/python/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/python/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/python/statement.jvm.lux2
-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
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme.lux20
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/procedure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/procedure/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/scheme/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/repl.lux6
87 files changed, 247 insertions, 255 deletions
diff --git a/new-luxc/source/luxc/cache/description.lux b/new-luxc/source/luxc/cache/description.lux
index cce2e783d..467fed765 100644
--- a/new-luxc/source/luxc/cache/description.lux
+++ b/new-luxc/source/luxc/cache/description.lux
@@ -23,12 +23,6 @@
(~ (code.text name))
(~+ (list/map write-type params))))
- #.Void
- (` "Void")
-
- #.Unit
- (` "Unit")
-
(^template [<tag> <description>]
(<tag> left right)
(` (<description> (~ (write-type left)) (~ (write-type right)))))
@@ -73,8 +67,6 @@
(function (_ read-type)
($_ p.alt
(tagged "Primitive" (p.seq s.text (p.some read-type)))
- (s.this (` "Void"))
- (s.this (` "Unit"))
(binary "Sum" read-type)
(binary "Product" read-type)
(binary "Function" read-type)
diff --git a/new-luxc/source/luxc/cache/io.lux b/new-luxc/source/luxc/cache/io.lux
index 8c4367989..62585c0bc 100644
--- a/new-luxc/source/luxc/cache/io.lux
+++ b/new-luxc/source/luxc/cache/io.lux
@@ -66,7 +66,7 @@
(wrap (list.concat root-modules))))
(def: (delete file)
- (-> File (Process Unit))
+ (-> File (Process Top))
(do io.Monad<Process>
[deleted? (file.delete file)]
(if deleted?
@@ -74,7 +74,7 @@
(io.throw Cannot-Delete-Cached-File file))))
(def: (un-install target-dir module-name)
- (-> File Text (Process Unit))
+ (-> File Text (Process Top))
(do io.Monad<Process>
[#let [module-dir (///io.file target-dir module-name)]
files (file.files module-dir)
@@ -192,7 +192,7 @@
(:: @ map (dict.from-list text.Hash<Text>)))))
(def: (set-cache cache)
- (-> //.Cache (Process Unit))
+ (-> //.Cache (Process Top))
(do io.Monad<IO>
[swapped? (atom.compare-and-swap //.empty cache ..cache)]
(if swapped?
@@ -200,13 +200,13 @@
(io.throw Cannot-Pre-Load-Cache-More-Than-Once ""))))
(def: #export (pre-load source-dirs target-dir load-def)
- (-> (List File) File Loader (Process Unit))
+ (-> (List File) File Loader (Process Top))
(do io.Monad<Process>
[loaded-cache (pre-load' source-dirs (///io.platform-target target-dir) load-def)]
(set-cache loaded-cache)))
(def: #export (clean target-dir wanted-modules)
- (-> File (Set Text) (Process Unit))
+ (-> File (Set Text) (Process Top))
(do io.Monad<Process>
[cached (cached target-dir)
_ (|> cached
diff --git a/new-luxc/source/luxc/io.jvm.lux b/new-luxc/source/luxc/io.jvm.lux
index 482250f63..79450a502 100644
--- a/new-luxc/source/luxc/io.jvm.lux
+++ b/new-luxc/source/luxc/io.jvm.lux
@@ -82,7 +82,7 @@
(file.make-directory (sanitize (platform-target target-dir)))))
(def: #export (prepare-module target-dir module-name)
- (-> File Text (Process Unit))
+ (-> File Text (Process Top))
(do io.Monad<Process>
[#let [module-path (|> module-name
(format (platform-target target-dir) "/")
@@ -98,7 +98,7 @@
"Target: " target-dir "\n"))))))
(def: #export (write target name content)
- (-> File Text Blob (Process Unit))
+ (-> File Text Blob (Process Top))
(|> name
(format (platform-target target) "/")
sanitize
diff --git a/new-luxc/source/luxc/lang.lux b/new-luxc/source/luxc/lang.lux
index b4ed9638a..bba58f421 100644
--- a/new-luxc/source/luxc/lang.lux
+++ b/new-luxc/source/luxc/lang.lux
@@ -76,7 +76,7 @@
output))))
(def: #export (infer actualT)
- (-> Type (Meta Unit))
+ (-> Type (Meta Top))
(do macro.Monad<Meta>
[expectedT macro.expected-type]
(with-type-env
diff --git a/new-luxc/source/luxc/lang/analysis/case.lux b/new-luxc/source/luxc/lang/analysis/case.lux
index a9731a1d7..d9efa2bf4 100644
--- a/new-luxc/source/luxc/lang/analysis/case.lux
+++ b/new-luxc/source/luxc/lang/analysis/case.lux
@@ -177,7 +177,7 @@
(&.with-cursor cursor
(do macro.Monad<Meta>
[_ (&.with-type-env
- (tc.check inputT Unit))
+ (tc.check inputT Top))
outputA next]
(wrap [(` ("lux case tuple" [])) outputA])))
diff --git a/new-luxc/source/luxc/lang/analysis/case/coverage.lux b/new-luxc/source/luxc/lang/analysis/case/coverage.lux
index b81a3b7a9..38f977011 100644
--- a/new-luxc/source/luxc/lang/analysis/case/coverage.lux
+++ b/new-luxc/source/luxc/lang/analysis/case/coverage.lux
@@ -8,7 +8,7 @@
["e" error "error/" Monad<Error>]
text/format
(coll [list "list/" Fold<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro "macro/" Monad<Meta>])
(luxc ["&" lang]
(lang ["la" analysis])))
diff --git a/new-luxc/source/luxc/lang/analysis/primitive.lux b/new-luxc/source/luxc/lang/analysis/primitive.lux
index 8270e7e73..ff7908669 100644
--- a/new-luxc/source/luxc/lang/analysis/primitive.lux
+++ b/new-luxc/source/luxc/lang/analysis/primitive.lux
@@ -26,5 +26,5 @@
(def: #export analyse-unit
(Meta Analysis)
(do macro.Monad<Meta>
- [_ (&.infer Unit)]
+ [_ (&.infer Top)]
(wrap (` []))))
diff --git a/new-luxc/source/luxc/lang/analysis/structure.lux b/new-luxc/source/luxc/lang/analysis/structure.lux
index c5be94df6..f9e7ad8fc 100644
--- a/new-luxc/source/luxc/lang/analysis/structure.lux
+++ b/new-luxc/source/luxc/lang/analysis/structure.lux
@@ -7,7 +7,7 @@
[product]
[maybe]
(coll [list "list/" Functor<List>]
- [dict #+ Dict])
+ (dictionary ["dict" unordered #+ Dict]))
text/format)
[macro]
(macro [code])
@@ -293,7 +293,7 @@
(case record
## empty-record = empty-tuple = unit = []
#.Nil
- (:: macro.Monad<Meta> wrap [(list) Unit])
+ (:: macro.Monad<Meta> wrap [(list) Top])
(#.Cons [head-k head-v] _)
(do macro.Monad<Meta>
diff --git a/new-luxc/source/luxc/lang/extension.lux b/new-luxc/source/luxc/lang/extension.lux
index e8121b9b6..ef7a4f864 100644
--- a/new-luxc/source/luxc/lang/extension.lux
+++ b/new-luxc/source/luxc/lang/extension.lux
@@ -4,7 +4,7 @@
["ex" exception #+ exception:])
(data ["e" error]
[text]
- (coll [dict #+ Dict]))
+ (coll (dictionary ["dict" unordered #+ Dict])))
[macro])
[//]
(// ["la" analysis]
@@ -39,7 +39,7 @@
(-> (List Code) (Meta Code)))
(type: #export Statement
- (-> (List Code) (Meta Unit)))
+ (-> (List Code) (Meta Top)))
(type: #export Extensions
{#analysis (Dict Text Analysis)
@@ -61,9 +61,9 @@
(|> compiler (get@ #.extensions) (:! Extensions))])))
(def: (set extensions)
- (-> Extensions (Meta Unit))
+ (-> Extensions (Meta Top))
(function (_ compiler)
- (#e.Success [(set@ #.extensions (:! Void extensions) compiler)
+ (#e.Success [(set@ #.extensions (:! Bottom extensions) compiler)
[]])))
(do-template [<name> <type> <category> <exception>]
@@ -99,7 +99,7 @@
(do-template [<name> <type> <category> <exception>]
[(def: #export (<name> name extension)
- (-> Text <type> (Meta Unit))
+ (-> Text <type> (Meta Top))
(do macro.Monad<Meta>
[extensions ..get
_ (//.assert <exception> name
diff --git a/new-luxc/source/luxc/lang/extension/analysis.lux b/new-luxc/source/luxc/lang/extension/analysis.lux
index cc7de89b1..79fa3af88 100644
--- a/new-luxc/source/luxc/lang/extension/analysis.lux
+++ b/new-luxc/source/luxc/lang/extension/analysis.lux
@@ -2,7 +2,7 @@
lux
(lux (data [text]
(coll [list "list/" Functor<List>]
- [dict #+ Dict])))
+ (dictionary ["dict" unordered #+ Dict]))))
[//]
[/common]
[/host])
diff --git a/new-luxc/source/luxc/lang/extension/analysis/common.lux b/new-luxc/source/luxc/lang/extension/analysis/common.lux
index 8ec031066..aa6b6a547 100644
--- a/new-luxc/source/luxc/lang/extension/analysis/common.lux
+++ b/new-luxc/source/luxc/lang/extension/analysis/common.lux
@@ -7,7 +7,7 @@
text/format
(coll [list "list/" Functor<List>]
[array]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro]
(macro [code])
(lang (type ["tc" check]))
@@ -191,7 +191,7 @@
Bundle
(<| (prefix "io")
(|> (dict.new text.Hash<Text>)
- (install "log" (unary Text Unit))
+ (install "log" (unary Text Top))
(install "error" (unary Text Bottom))
(install "exit" (unary Int Bottom))
(install "current-time" (nullary Int)))))
@@ -428,7 +428,7 @@
(do macro.Monad<Meta>
[[thread-id threadT] (&.with-type-env tc.var)
[var-id varT] (&.with-type-env tc.var)]
- ((binary varT (type (Box threadT varT)) Unit proc)
+ ((binary varT (type (Box threadT varT)) Top proc)
analyse eval args))))
(def: box-procs
@@ -445,8 +445,8 @@
(<| (prefix "process")
(|> (dict.new text.Hash<Text>)
(install "concurrency-level" (nullary Nat))
- (install "future" (unary (type (io.IO Top)) Unit))
- (install "schedule" (binary Nat (type (io.IO Top)) Unit))
+ (install "future" (unary (type (io.IO Top)) Top))
+ (install "schedule" (binary Nat (type (io.IO Top)) Top))
)))
(def: #export procedures
diff --git a/new-luxc/source/luxc/lang/extension/analysis/host.jvm.lux b/new-luxc/source/luxc/lang/extension/analysis/host.jvm.lux
index 9d9fef5ac..08ad014be 100644
--- a/new-luxc/source/luxc/lang/extension/analysis/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/extension/analysis/host.jvm.lux
@@ -13,7 +13,7 @@
["l" lexer])
(coll [list "list/" Fold<List> Functor<List> Monoid<List>]
[array]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro "macro/" Monad<Meta>]
(macro [code]
["s" syntax])
@@ -482,7 +482,7 @@
(analyse exceptionC))
exception-class (check-object exceptionT)
? (sub-class? "java.lang.Throwable" exception-class)
- _ (: (Meta Unit)
+ _ (: (Meta Top)
(if ?
(wrap [])
(&.throw Non-Throwable exception-class)))]
@@ -818,7 +818,7 @@
(case [classC fieldC]
[[_ (#.Text class)] [_ (#.Text field)]]
(do macro.Monad<Meta>
- [_ (&.infer Unit)
+ [_ (&.infer Top)
[fieldT final?] (static-field class field)
_ (&.assert Cannot-Set-Final-Field (format class "#" field)
(not final?))
@@ -1130,7 +1130,7 @@
(def: (invoke//special proc)
(-> Text ///.Analysis)
(function (_ analyse eval args)
- (case (: (e.Error [(List Code) [Text Text Code (List [Text Code]) Unit]])
+ (case (: (e.Error [(List Code) [Text Text Code (List [Text Code]) Top]])
(p.run args ($_ p.seq s.text s.text s.any (p.some (s.tuple (p.seq s.text s.any))) s.end!)))
(#e.Success [_ [class method objectC argsTC _]])
(do macro.Monad<Meta>
diff --git a/new-luxc/source/luxc/lang/extension/statement.lux b/new-luxc/source/luxc/lang/extension/statement.lux
index 81b43f205..f607ac154 100644
--- a/new-luxc/source/luxc/lang/extension/statement.lux
+++ b/new-luxc/source/luxc/lang/extension/statement.lux
@@ -5,7 +5,7 @@
(data [text]
text/format
(coll [list "list/" Functor<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro]
(lang (type ["tc" check]))
[io #+ IO])
@@ -52,7 +52,7 @@
(wrap [annsI (:! Code annsV)])))
(def: (ensure-valid-alias def-name annotations value)
- (-> Text Code Code (Meta Unit))
+ (-> Text Code Code (Meta Top))
(case [annotations value]
(^multi [[_ (#.Record pairs)] [_ (#.Symbol _)]]
(|> pairs list.size (n/= +1)))
@@ -76,7 +76,7 @@
(do @
[_ (ensure-valid-alias def-name annotationsV valueC)
_ (lang.with-scope
- (statementT.translate-def def-name Void id annotationsV))]
+ (statementT.translate-def def-name Bottom id annotationsV))]
(wrap []))
#.None
@@ -107,7 +107,7 @@
(do macro.Monad<Meta>
[[_ programA] (<| lang.with-scope
(scopeL.with-local [args (type (List Text))])
- (lang.with-type (type (IO Unit)))
+ (lang.with-type (type (IO Top)))
(expressionA.analyser evalL.eval programC))
syntheses //.all-syntheses
programI (expressionT.translate (expressionS.synthesize syntheses programA))
diff --git a/new-luxc/source/luxc/lang/extension/synthesis.lux b/new-luxc/source/luxc/lang/extension/synthesis.lux
index 32d726796..c48f3e3a5 100644
--- a/new-luxc/source/luxc/lang/extension/synthesis.lux
+++ b/new-luxc/source/luxc/lang/extension/synthesis.lux
@@ -1,7 +1,7 @@
(.module:
lux
(lux (data [text]
- (coll [dict #+ Dict])))
+ (coll (dictionary ["dict" unordered #+ Dict]))))
[//])
(def: #export defaults
diff --git a/new-luxc/source/luxc/lang/extension/translation.lux b/new-luxc/source/luxc/lang/extension/translation.lux
index 663babdb6..bc95ed1f4 100644
--- a/new-luxc/source/luxc/lang/extension/translation.lux
+++ b/new-luxc/source/luxc/lang/extension/translation.lux
@@ -1,7 +1,7 @@
(.module:
lux
(lux (data [text]
- (coll [dict #+ Dict])))
+ (coll (dictionary ["dict" unordered #+ Dict]))))
[//])
(def: #export defaults
diff --git a/new-luxc/source/luxc/lang/host.jvm.lux b/new-luxc/source/luxc/lang/host.jvm.lux
index b9261f7b0..5819e5126 100644
--- a/new-luxc/source/luxc/lang/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/host.jvm.lux
@@ -7,7 +7,7 @@
(data ["e" error]
[text]
text/format
- (coll [dict]
+ (coll (dictionary ["dict" unordered])
[array]))
[macro]
[host #+ do-to object]
@@ -97,13 +97,13 @@
(.function (_ compiler)
(let [old (:! commonT.Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Void (set@ #commonT.anchor (#.Some anchor) old))
+ (:! Bottom (set@ #commonT.anchor (#.Some anchor) old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! commonT.Host)
(set@ #commonT.anchor (get@ #commonT.anchor old))
- (:! Void))
+ (:! Bottom))
compiler')
output])
@@ -129,13 +129,13 @@
(.function (_ compiler)
(let [old (:! commonT.Host (get@ #.host compiler))]
(case (expr (set@ #.host
- (:! Void (set@ #commonT.context [(&.normalize-name name) +0] old))
+ (:! Bottom (set@ #commonT.context [(&.normalize-name name) +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! commonT.Host)
(set@ #commonT.context (get@ #commonT.context old))
- (:! Void))
+ (:! Bottom))
compiler')
output])
@@ -149,13 +149,13 @@
[old-name old-sub] (get@ #commonT.context old)
new-name (format old-name "$" (%i (nat-to-int old-sub)))]
(case (expr (set@ #.host
- (:! Void (set@ #commonT.context [new-name +0] old))
+ (:! Bottom (set@ #commonT.context [new-name +0] old))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! commonT.Host)
(set@ #commonT.context [old-name (n/inc old-sub)])
- (:! Void))
+ (:! Bottom))
compiler')
[new-name output]])
diff --git a/new-luxc/source/luxc/lang/host/common-lisp.lux b/new-luxc/source/luxc/lang/host/common-lisp.lux
index 3ab94b1a1..7ae024a07 100644
--- a/new-luxc/source/luxc/lang/host/common-lisp.lux
+++ b/new-luxc/source/luxc/lang/host/common-lisp.lux
@@ -8,8 +8,8 @@
(coll [list "list/" Functor<List> Fold<List>]))
(type abstract)))
-(abstract: #export Single {} Unit)
-(abstract: #export Poly {} Unit)
+(abstract: #export Single {} Top)
+(abstract: #export Poly {} Top)
(abstract: #export (Var kind)
{}
diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux
index c76c5144d..3fb55d2f9 100644
--- a/new-luxc/source/luxc/lang/host/jvm.lux
+++ b/new-luxc/source/luxc/lang/host/jvm.lux
@@ -80,10 +80,10 @@
#V1_8)
## [Values]
-(syntax: (config: [type s.local-symbol]
- [none s.local-symbol]
- [++ s.local-symbol]
- [options (s.tuple (p.many s.local-symbol))])
+(syntax: (config: {type s.local-symbol}
+ {none s.local-symbol}
+ {++ s.local-symbol}
+ {options (s.tuple (p.many s.local-symbol))})
(let [g!type (code.local-symbol type)
g!none (code.local-symbol none)
g!tags+ (list/map code.local-tag options)
@@ -122,7 +122,7 @@
## Labels
(def: #export new-label
- (-> Unit Label)
+ (-> Top Label)
org/objectweb/asm/Label::new)
(def: #export (simple-class name)
diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux
index f993f0c48..d088c5324 100644
--- a/new-luxc/source/luxc/lang/host/jvm/inst.lux
+++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux
@@ -18,7 +18,7 @@
(host.import #long java/lang/Object)
(host.import #long java/lang/String)
-(syntax: (declare [codes (p.many s.local-symbol)])
+(syntax: (declare {codes (p.many s.local-symbol)})
(|> codes
(list/map (function (_ code) (` ((~' #static) (~ (code.local-symbol code)) (~' int)))))
wrap))
@@ -135,7 +135,7 @@
[string Text id]
)
-(syntax: (prefix [base s.local-symbol])
+(syntax: (prefix {base s.local-symbol})
(wrap (list (code.local-symbol (format "Opcodes::" base)))))
(def: #export NULL
diff --git a/new-luxc/source/luxc/lang/host/php.lux b/new-luxc/source/luxc/lang/host/php.lux
index 6d21da21f..982989320 100644
--- a/new-luxc/source/luxc/lang/host/php.lux
+++ b/new-luxc/source/luxc/lang/host/php.lux
@@ -7,11 +7,11 @@
(coll [list "list/" Functor<List> Fold<List>]))
(type abstract)))
-(abstract: Global' {} Unit)
-(abstract: Var' {} Unit)
-(abstract: Computation' {} Unit)
-(abstract: (Expression' k) {} Unit)
-(abstract: Statement' {} Unit)
+(abstract: Global' {} Top)
+(abstract: Var' {} Top)
+(abstract: Computation' {} Top)
+(abstract: (Expression' k) {} Top)
+(abstract: Statement' {} Top)
(abstract: (Code' k)
{}
diff --git a/new-luxc/source/luxc/lang/host/python.lux b/new-luxc/source/luxc/lang/host/python.lux
index 8e42ff0a5..128de5811 100644
--- a/new-luxc/source/luxc/lang/host/python.lux
+++ b/new-luxc/source/luxc/lang/host/python.lux
@@ -7,9 +7,9 @@
(coll [list "list/" Functor<List> Fold<List>]))
(type abstract)))
-(abstract: #export Single {} Unit)
-(abstract: #export Poly {} Unit)
-(abstract: #export Keyword {} Unit)
+(abstract: #export Single {} Top)
+(abstract: #export Poly {} Top)
+(abstract: #export Keyword {} Top)
(abstract: #export (Var kind)
{}
diff --git a/new-luxc/source/luxc/lang/host/r.lux b/new-luxc/source/luxc/lang/host/r.lux
index 6af15d058..76e80d3d9 100644
--- a/new-luxc/source/luxc/lang/host/r.lux
+++ b/new-luxc/source/luxc/lang/host/r.lux
@@ -8,8 +8,8 @@
(coll [list "list/" Functor<List> Fold<List>]))
(type abstract)))
-(abstract: #export Single {} Unit)
-(abstract: #export Poly {} Unit)
+(abstract: #export Single {} Top)
+(abstract: #export Poly {} Top)
(abstract: #export (Var kind)
{}
diff --git a/new-luxc/source/luxc/lang/host/scheme.lux b/new-luxc/source/luxc/lang/host/scheme.lux
index db91b94ce..218903ca0 100644
--- a/new-luxc/source/luxc/lang/host/scheme.lux
+++ b/new-luxc/source/luxc/lang/host/scheme.lux
@@ -8,8 +8,8 @@
(coll [list "list/" Functor<List> Fold<List>]))
(type abstract)))
-(abstract: #export Single {} Unit)
-(abstract: #export Poly {} Unit)
+(abstract: #export Single {} Top)
+(abstract: #export Poly {} Top)
(abstract: #export (Var kind)
{}
diff --git a/new-luxc/source/luxc/lang/init.lux b/new-luxc/source/luxc/lang/init.lux
index a34399cc8..73b2baf0a 100644
--- a/new-luxc/source/luxc/lang/init.lux
+++ b/new-luxc/source/luxc/lang/init.lux
@@ -45,9 +45,9 @@
#.expected #.None
#.seed +0
#.scope-type-vars (list)
- #.extensions (:! Void
+ #.extensions (:! Bottom
{#extensionL.analysis analysisE.defaults
#extensionL.synthesis synthesisE.defaults
#extensionL.translation translationE.defaults
#extensionL.statement statementE.defaults})
- #.host (:! Void host)})
+ #.host (:! Bottom host)})
diff --git a/new-luxc/source/luxc/lang/module.lux b/new-luxc/source/luxc/lang/module.lux
index f60a6f462..8e24d0cf4 100644
--- a/new-luxc/source/luxc/lang/module.lux
+++ b/new-luxc/source/luxc/lang/module.lux
@@ -38,7 +38,7 @@
#.module-state #.Active})
(def: #export (set-annotations annotations)
- (-> Code (Meta Unit))
+ (-> Code (Meta Top))
(do macro.Monad<Meta>
[self-name macro.current-module-name
self macro.current-module]
@@ -57,7 +57,7 @@
"New annotations: " (%code annotations) "\n")))))
(def: #export (import module)
- (-> Text (Meta Unit))
+ (-> Text (Meta Top))
(do macro.Monad<Meta>
[self macro.current-module-name]
(function (_ compiler)
@@ -67,7 +67,7 @@
[]]))))
(def: #export (alias alias module)
- (-> Text Text (Meta Unit))
+ (-> Text Text (Meta Top))
(do macro.Monad<Meta>
[self macro.current-module-name]
(function (_ compiler)
@@ -87,7 +87,7 @@
(def: #export (define (^@ full-name [module-name def-name])
definition)
- (-> Ident Definition (Meta Unit))
+ (-> Ident Definition (Meta Top))
(function (_ compiler)
(case (&.pl-get module-name (get@ #.modules compiler))
(#.Some module)
@@ -128,7 +128,7 @@
(do-template [<flagger> <asker> <tag> <description>]
[(def: #export (<flagger> module-name)
- (-> Text (Meta Unit))
+ (-> Text (Meta Top))
(function (_ compiler)
(case (|> compiler (get@ #.modules) (&.pl-get module-name))
(#.Some module)
@@ -184,7 +184,7 @@
)
(def: (ensure-undeclared-tags module-name tags)
- (-> Text (List Text) (Meta Unit))
+ (-> Text (List Text) (Meta Top))
(do macro.Monad<Meta>
[bindings (tags-by-module module-name)
_ (monad.map @
@@ -200,7 +200,7 @@
(wrap [])))
(def: #export (declare-tags tags exported? type)
- (-> (List Text) Bool Type (Meta Unit))
+ (-> (List Text) Bool Type (Meta Top))
(do macro.Monad<Meta>
[current-module macro.current-module-name
[type-module type-name] (case type
diff --git a/new-luxc/source/luxc/lang/synthesis/expression.lux b/new-luxc/source/luxc/lang/synthesis/expression.lux
index c05f1daf9..3fa594086 100644
--- a/new-luxc/source/luxc/lang/synthesis/expression.lux
+++ b/new-luxc/source/luxc/lang/synthesis/expression.lux
@@ -7,7 +7,7 @@
[product]
text/format
(coll [list "list/" Functor<List> Fold<List> Monoid<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
(macro [code]
["s" syntax]))
(luxc (lang ["la" analysis]
diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux
index 8857a83d1..cd9214885 100644
--- a/new-luxc/source/luxc/lang/translation.lux
+++ b/new-luxc/source/luxc/lang/translation.lux
@@ -131,7 +131,7 @@
(&.throw Unrecognized-Statement (%code code))))
(def: (forgive-eof action)
- (-> (Meta Unit) (Meta Unit))
+ (-> (Meta Top) (Meta Top))
(function (_ compiler)
(case (action compiler)
(#e.Error error)
@@ -173,7 +173,7 @@
e.assume)))})
## (def: (write-module target-dir file-name module-name module artifacts)
-## (-> File Text Text Module Artifacts (Process Unit))
+## (-> File Text Text Module Artifacts (Process Top))
## (do io.Monad<Process>
## [_ (monad.map @ (product.uncurry (&io.write target-dir))
## (dict.entries artifacts))]
@@ -270,7 +270,7 @@
(translate-module sources target prelude compiler)))
(def: #export (translate-program sources target program)
- (-> (List File) File Text (Process Unit))
+ (-> (List File) File Text (Process Top))
(do io.Monad<Process>
[compiler (initialize sources target)
_ (translate-module sources target program compiler)
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp.lux b/new-luxc/source/luxc/lang/translation/common-lisp.lux
index e76e614f8..4e18c48cf 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp.lux
@@ -52,7 +52,7 @@
(type: #export Host
{#context [Text Nat]
#anchor (Maybe Anchor)
- #loader (-> Expression (Error Unit))
+ #loader (-> Expression (Error Top))
#interpreter (-> Expression (Error LispObject))
#module-buffer (Maybe StringBuilder)
#program-buffer StringBuilder})
@@ -80,12 +80,12 @@
(def: #export r-module-name Text (format "module" file-extension))
(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)
[]])))
@@ -96,13 +96,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]])
@@ -124,13 +124,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])
@@ -174,7 +174,7 @@
(#e.Success output)
(#e.Success [compiler output])))))]
- [load! #loader Unit]
+ [load! #loader Top]
[interpret #interpreter LispObject]
)
@@ -187,7 +187,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 (_.expression code))]
@@ -197,7 +197,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/common-lisp/case.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
index 576fa8cc9..d132ba0b8 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/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/common-lisp/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
index fa59ee45e..262f3f284 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
@@ -24,7 +24,7 @@
(#static forName [String] #try (Class Object)))
(def: _0
- Unit
+ Top
(case (Class::forName "org.armedbear.lisp.Symbol")
(#e.Success _)
(log! "LOADED")
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/procedure.jvm.lux
index 0b9fa3544..ed8220613 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/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 ["_" common-lisp #+ Expression])))
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux
index 42edae95b..895ed8d72 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/common.jvm.lux
@@ -8,7 +8,7 @@
text/format
[number #+ hex]
(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/common-lisp/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/procedure/host.jvm.lux
index c1b43da2f..af82491b6 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/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/common-lisp/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
index eae90e771..33f72b995 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
@@ -58,7 +58,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))
@@ -93,7 +93,7 @@
(_.defun (~ $runtime) (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)
@@ -365,7 +365,7 @@
(def: #export artifact Text (format prefix //.file-extension))
(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/common-lisp/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/statement.jvm.lux
index 17f8b4ccb..e73d88c96 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/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/js.lux b/new-luxc/source/luxc/lang/translation/js.lux
index db76a2868..b318c7fbc 100644
--- a/new-luxc/source/luxc/lang/translation/js.lux
+++ b/new-luxc/source/luxc/lang/translation/js.lux
@@ -90,12 +90,12 @@
(def: #export module-js-name Text "module.js")
(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)
[]])))
@@ -106,13 +106,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]])
@@ -134,13 +134,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])
@@ -173,7 +173,7 @@
(#e.Success [compiler (|> compiler (get@ #.host) (:! Host) (get@ #program-buffer))])))
(def: (execute code)
- (-> Expression (Meta Unit))
+ (-> Expression (Meta Top))
(function (_ compiler)
(case (|> compiler
(get@ #.host)
@@ -304,7 +304,7 @@
(:! Object)))
))
-(def: #export unit Text "\u0000")
+(def: #export unit Text "")
(def: (module-name module)
(-> Text Text)
@@ -317,7 +317,7 @@
(format (module-name module) "$" (lang.normalize-name name)))
(def: #export (save-js code)
- (-> JS (Meta Unit))
+ (-> JS (Meta Top))
(do macro.Monad<Meta>
[module-buffer module-buffer
#let [_ (Appendable::append [(:! CharSequence code)]
@@ -325,11 +325,11 @@
(execute code)))
(def: #export (save-definition name code)
- (-> Ident Expression (Meta Unit))
+ (-> Ident Expression (Meta Top))
(save-js (format "var " (definition-name name) " = " code ";\n")))
(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/js/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure.jvm.lux
index f67c1e523..cd5757663 100644
--- a/new-luxc/source/luxc/lang/translation/js/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/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 [js #+ JS Expression Statement])))
diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
index 365f730e3..8e40799f2 100644
--- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/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/js/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/host.jvm.lux
index dc6d48bd8..00c2429a4 100644
--- a/new-luxc/source/luxc/lang/translation/js/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/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/js/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
index ea1b82e98..2adb118f8 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -55,7 +55,7 @@
(-> Text (-> Text Expression) Statement)
(format "var " name " = " (definition name) ";\n"))
-(syntax: (runtime-implementation-name [runtime-name s.local-symbol])
+(syntax: (runtime-implementation-name {runtime-name s.local-symbol})
(wrap (list (code.local-symbol (format "__" runtime-name)))))
(template: (runtime: <lux-name> <js-name> <js-definition>)
@@ -911,7 +911,7 @@
(def: #export artifact Text (format prefix ".js"))
(def: #export translate
- (Meta (Process Unit))
+ (Meta (Process Top))
(do macro.Monad<Meta>
[_ //.init-module-buffer
_ (//.save-js runtime)]
diff --git a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
index 7bcd8e112..e15e4379a 100644
--- a/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/statement.jvm.lux
@@ -11,7 +11,7 @@
[".T" eval]))
(def: #export (translate-def name expressionT expressionJS 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/jvm/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux
index 579eb565c..524433214 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux
@@ -7,7 +7,7 @@
(data ["e" error #+ Error]
[text "text/" Hash<Text>]
text/format
- (coll [dict #+ Dict]))
+ (coll (dictionary ["dict" unordered #+ Dict])))
[macro]
[host]
(world [blob #+ Blob]
@@ -66,13 +66,13 @@
(case (action (update@ #.host
(|>> (:! Host)
(set@ #artifacts (dict.new text.Hash<Text>))
- (:! Void))
+ (:! Bottom))
compiler))
(#e.Success [compiler' output])
(#e.Success [(update@ #.host
(|>> (:! Host)
(set@ #artifacts (|> (get@ #.host compiler) (:! Host) (get@ #artifacts)))
- (:! Void))
+ (:! Bottom))
compiler')
[(|> compiler' (get@ #.host) (:! Host) (get@ #artifacts))
output]])
@@ -81,19 +81,19 @@
(#e.Error error))))
(def: #export (record-artifact name content)
- (-> Text Blob (Meta Unit))
+ (-> Text Blob (Meta Top))
(function (_ compiler)
(if (|> compiler (get@ #.host) (:! Host) (get@ #artifacts) (dict.contains? name))
(ex.throw Cannot-Overwrite-Artifact name)
(#e.Success [(update@ #.host
(|>> (:! Host)
(update@ #artifacts (dict.put name content))
- (:! Void))
+ (:! Bottom))
compiler)
[]]))))
(def: #export (store-class name byte-code)
- (-> Text Bytecode (Meta Unit))
+ (-> Text Bytecode (Meta Top))
(function (_ compiler)
(let [store (|> (get@ #.host compiler)
(:! Host)
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux
index 3f852d832..49c91204a 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux
@@ -4,7 +4,7 @@
["ex" exception #+ exception:])
(data [maybe]
text/format
- (coll [dict])))
+ (coll (dictionary ["dict" unordered #+ Dict]))))
(luxc ["&" lang]
(lang (host ["$" jvm])
["ls" synthesis]))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
index 158d4c788..9764045e7 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/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:])
@@ -46,7 +46,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 $.Inst) $.Inst))
@@ -81,7 +81,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/jvm/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
index f8461be45..f6a0069f5 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
@@ -9,7 +9,7 @@
(text format
["l" lexer])
(coll [list "list/" Functor<List>]
- [dict #+ Dict]))
+ (dictionary ["dict" unordered #+ Dict])))
[macro "macro/" Monad<Meta>]
(macro [code]
["s" syntax #+ syntax:])
diff --git a/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux
index 26aaaa8e9..4400c1e90 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux
@@ -37,7 +37,7 @@
(getField [String] #try Field))
(def: #export (translate-def def-name valueT valueI metaV)
- (-> Text Type $.Inst Code (Meta Unit))
+ (-> Text Type $.Inst Code (Meta Top))
(do macro.Monad<Meta>
[current-module macro.current-module-name
#let [def-ident [current-module def-name]]]
@@ -93,7 +93,7 @@
(commonT.record-artifact (format bytecode-name ".class") bytecode)))))
(def: #export (translate-program programI)
- (-> $.Inst (Meta Unit))
+ (-> $.Inst (Meta Top))
(let [nilI runtimeT.noneI
num-inputsI (|>> ($i.ALOAD +0) $i.ARRAYLENGTH)
decI (|>> ($i.int 1) $i.ISUB)
diff --git a/new-luxc/source/luxc/lang/translation/lua.lux b/new-luxc/source/luxc/lang/translation/lua.lux
index fdd66af81..5d25fb864 100644
--- a/new-luxc/source/luxc/lang/translation/lua.lux
+++ b/new-luxc/source/luxc/lang/translation/lua.lux
@@ -104,12 +104,12 @@
(def: #export lua-module-name Text "module.lua")
(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)
[]])))
@@ -120,13 +120,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]])
@@ -148,13 +148,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])
@@ -187,7 +187,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)
@@ -201,14 +201,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)
- (-> Lua (Meta Unit))
+ (-> Lua (Meta Top))
(do macro.Monad<Meta>
[module-buffer module-buffer
#let [_ (Appendable::append [(:! CharSequence code)]
@@ -216,7 +216,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/lua/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure.jvm.lux
index 9b5cb6475..eaffddfa0 100644
--- a/new-luxc/source/luxc/lang/translation/lua/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/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 [lua #+ Lua Expression Statement])))
diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux
index 9d0e22f78..91906d899 100644
--- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/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/lua/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/host.jvm.lux
index 85af96ec9..2271d354a 100644
--- a/new-luxc/source/luxc/lang/translation/lua/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/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/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
index 12a0fe6a5..e0b037bf5 100644
--- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/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)))
@@ -489,7 +489,7 @@
(def: #export artifact Text (format prefix ".lua"))
(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/lua/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux
index eb181d160..ee0725014 100644
--- a/new-luxc/source/luxc/lang/translation/lua/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/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/php.lux b/new-luxc/source/luxc/lang/translation/php.lux
index eeaa95309..8cbcaad3a 100644
--- a/new-luxc/source/luxc/lang/translation/php.lux
+++ b/new-luxc/source/luxc/lang/translation/php.lux
@@ -54,7 +54,7 @@
(type: #export Host
{#context [Text Nat]
#anchor (Maybe Anchor)
- #loader (-> Statement (Error Unit))
+ #loader (-> Statement (Error Top))
#interpreter (-> Expression (Error Object))
#module-buffer (Maybe StringBuilder)
#program-buffer StringBuilder})
@@ -77,12 +77,12 @@
(def: #export module-name Text (format "module" extension))
(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)
[]])))
@@ -93,13 +93,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]])
@@ -121,13 +121,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])
@@ -171,7 +171,7 @@
(#e.Success output)
(#e.Success [compiler output])))))]
- [load! #loader Statement Unit]
+ [load! #loader Statement Top]
[interpret #interpreter Expression Object]
)
@@ -186,7 +186,7 @@
(lang.normalize-name (format module "$" name)))
(def: #export (save code)
- (-> Statement (Meta Unit))
+ (-> Statement (Meta Top))
(do macro.Monad<Meta>
[module-buffer module-buffer
#let [_ (Appendable::append [(:! CharSequence (_.code code))]
@@ -194,7 +194,7 @@
(load! 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/php/case.jvm.lux b/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
index 0868811e7..0cfd66729 100644
--- a/new-luxc/source/luxc/lang/translation/php/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/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/php/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux
index 9748167ca..ab73cddee 100644
--- a/new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/procedure.jvm.lux
@@ -5,7 +5,7 @@
(data [maybe]
[text]
text/format
- (coll [dict])))
+ (coll (dictionary ["dict" unordered #+ Dict]))))
(luxc ["&" lang]
(lang ["ls" synthesis]
(host ["_" php #+ Expression Statement])))
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 384a88056..bcbea37cf 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
@@ -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/php/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/php/procedure/host.jvm.lux
index c1b43da2f..af82491b6 100644
--- a/new-luxc/source/luxc/lang/translation/php/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/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/php/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
index fe02cf2fc..66827025e 100644
--- a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
@@ -57,7 +57,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))
@@ -87,7 +87,7 @@
((~! list/map) _.parameter (list (~+ argsLC+)))
(~ definition))))))))))))
-(syntax: (with-vars [vars (s.tuple (p.many s.local-symbol))]
+(syntax: (with-vars {vars (s.tuple (p.many s.local-symbol))}
body)
(wrap (list (` (let [(~+ (|> vars
(list/map (function (_ var)
@@ -433,7 +433,7 @@
(def: #export artifact Text (format prefix //.extension))
(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/php/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux
index 592e579cf..afbf7e476 100644
--- a/new-luxc/source/luxc/lang/translation/php/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/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/python.lux b/new-luxc/source/luxc/lang/translation/python.lux
index 77df53332..8739c278d 100644
--- a/new-luxc/source/luxc/lang/translation/python.lux
+++ b/new-luxc/source/luxc/lang/translation/python.lux
@@ -54,7 +54,7 @@
(type: #export Host
{#context [Text Nat]
#anchor (Maybe Anchor)
- #loader (-> Statement (Error Unit))
+ #loader (-> Statement (Error Top))
#interpreter (-> Expression (Error PyObject))
#module-buffer (Maybe StringBuilder)
#program-buffer StringBuilder})
@@ -74,12 +74,12 @@
(def: #export python-module-name Text "module.py")
(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)
[]])))
@@ -90,13 +90,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]])
@@ -118,13 +118,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])
@@ -168,7 +168,7 @@
(#e.Success output)
(#e.Success [compiler output])))))]
- [load! #loader Statement Unit]
+ [load! #loader Statement Top]
[interpret #interpreter Expression PyObject]
)
@@ -191,12 +191,12 @@
module-buffer)]]
(<eval> code)))]
- [save load! python.statement Statement Unit]
+ [save load! python.statement Statement Top]
[run interpret python.expression Expression PyObject]
)
(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/python/case.jvm.lux b/new-luxc/source/luxc/lang/translation/python/case.jvm.lux
index 6769103d9..2c32b26a6 100644
--- a/new-luxc/source/luxc/lang/translation/python/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/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/python/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure.jvm.lux
index 699c0c000..f793a0165 100644
--- a/new-luxc/source/luxc/lang/translation/python/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/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 [python #+ Expression Statement])))
diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
index badca2d74..24e4197d1 100644
--- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/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/python/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/host.jvm.lux
index c1b43da2f..af82491b6 100644
--- a/new-luxc/source/luxc/lang/translation/python/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/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/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
index 6319c2121..5d0ea9186 100644
--- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
@@ -57,7 +57,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))
@@ -88,7 +88,7 @@
(list (~+ argsLC+))
(~ definition))))))))))))
-(syntax: (with-vars [vars (s.tuple (p.many s.local-symbol))]
+(syntax: (with-vars {vars (s.tuple (p.many s.local-symbol))}
body)
(wrap (list (` (let [(~+ (|> vars
(list/map (function (_ var)
@@ -576,7 +576,7 @@
(def: #export artifact Text (format prefix ".py"))
(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/python/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux
index 36fe472d3..b267f5a64 100644
--- a/new-luxc/source/luxc/lang/translation/python/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/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/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]]]
diff --git a/new-luxc/source/luxc/lang/translation/scheme.lux b/new-luxc/source/luxc/lang/translation/scheme.lux
index c32890a84..451d5f8e2 100644
--- a/new-luxc/source/luxc/lang/translation/scheme.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme.lux
@@ -55,7 +55,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 (format "module" file-extension))
(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]
)
@@ -189,7 +189,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 (scheme.expression code))]
@@ -199,7 +199,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/scheme/case.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/case.jvm.lux
index 0d67848c7..91ad5140d 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/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/scheme/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/procedure.jvm.lux
index 0876e9b19..8247baa0c 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/procedure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/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 ["_" scheme #+ Expression])))
diff --git a/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux
index f6a468f76..5d8e2ac66 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/procedure/common.jvm.lux
@@ -8,7 +8,7 @@
text/format
[number #+ hex]
(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/scheme/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/procedure/host.jvm.lux
index c1b43da2f..af82491b6 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/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/scheme/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux
index 585c80c86..816f92389 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/runtime.jvm.lux
@@ -58,7 +58,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))
@@ -107,7 +107,7 @@
(_.cdr (@@ list)))))
_.nil))
-(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)
@@ -418,7 +418,7 @@
(def: #export artifact Text (format prefix //.file-extension))
(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/scheme/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/statement.jvm.lux
index c9611cd2b..6fdb4073a 100644
--- a/new-luxc/source/luxc/lang/translation/scheme/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/scheme/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/repl.lux b/new-luxc/source/luxc/repl.lux
index 918c5c076..cdc61ab22 100644
--- a/new-luxc/source/luxc/repl.lux
+++ b/new-luxc/source/luxc/repl.lux
@@ -67,7 +67,7 @@
(|> compiler
(set@ [#.info #.mode] #.REPL)
(set@ #.extensions
- (:! Void
+ (:! Bottom
{#extensionL.analysis analysisE.defaults
#extensionL.synthesis synthesisE.defaults
#extensionL.translation translationE.defaults
@@ -279,7 +279,7 @@
code)
compiler)
(#e.Success [compiler' aliases'])
- (#e.Success [compiler' [Void []]])
+ (#e.Success [compiler' [Bottom []]])
(#e.Error error)
(if (ex.match? translationL.Unrecognized-Statement error)
@@ -295,7 +295,7 @@
(def: fresh-source Source [[repl-module +1 +0] +0 ""])
(def: #export (run source-dirs target-dir)
- (-> (List File) File (Task Unit))
+ (-> (List File) File (Task Top))
(do task.Monad<Task>
[console (promise.future console.open)
compiler (initialize source-dirs target-dir console)]