aboutsummaryrefslogtreecommitdiff
path: root/new-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
parent3c93d7a3aabaa49c67f9a498bc0d70f0af7f09d0 (diff)
- Updated new-luxc to the latest stdlib changes.
Diffstat (limited to 'new-luxc')
-rw-r--r--new-luxc/project.clj16
-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
-rw-r--r--new-luxc/test/test/luxc/common.lux112
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/case.lux75
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/common.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/primitive.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/procedure/common.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/reference.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/structure.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/function.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/loop.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/case.lux48
-rw-r--r--new-luxc/test/test/luxc/lang/translation/common.lux48
-rw-r--r--new-luxc/test/test/luxc/lang/translation/function.lux48
-rw-r--r--new-luxc/test/test/luxc/lang/translation/primitive.lux48
-rw-r--r--new-luxc/test/test/luxc/lang/translation/reference.lux48
-rw-r--r--new-luxc/test/test/luxc/lang/translation/structure.lux48
-rw-r--r--new-luxc/test/tests.lux40
105 files changed, 514 insertions, 553 deletions
diff --git a/new-luxc/project.clj b/new-luxc/project.clj
index a7580b4f5..674fdc506 100644
--- a/new-luxc/project.clj
+++ b/new-luxc/project.clj
@@ -21,19 +21,19 @@
:dependencies [;; JVM Bytecode
[org.ow2.asm/asm-all "5.0.3"]
;; LUA
- ;; [net.sandius.rembulan/rembulan-runtime "0.1-SNAPSHOT"]
- ;; [net.sandius.rembulan/rembulan-stdlib "0.1-SNAPSHOT"]
- ;; [net.sandius.rembulan/rembulan-compiler "0.1-SNAPSHOT"]
+ [net.sandius.rembulan/rembulan-runtime "0.1-SNAPSHOT"]
+ [net.sandius.rembulan/rembulan-stdlib "0.1-SNAPSHOT"]
+ [net.sandius.rembulan/rembulan-compiler "0.1-SNAPSHOT"]
;; Ruby
- ;; [org.jruby/jruby-complete "9.1.16.0"]
+ [org.jruby/jruby-complete "9.1.16.0"]
;; Python
- ;; [org.python/jython-standalone "2.7.1"]
+ [org.python/jython-standalone "2.7.1"]
;; R
- ;; [org.renjin/renjin-script-engine "0.8.2527"]
+ [org.renjin/renjin-script-engine "0.8.2527"]
;; Scheme
- ;; [kawa-scheme/kawa-core "2.4"]
+ [kawa-scheme/kawa-core "2.4"]
;; Common Lisp
- ;; [org.abcl/abcl "1.5.0"]
+ [org.abcl/abcl "1.5.0"]
;; PHP 5
[org.develnext.jphp/jphp-core "0.9.2"]
[org.develnext.jphp/jphp-scripting "0.9.2"]]
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)]
diff --git a/new-luxc/test/test/luxc/common.lux b/new-luxc/test/test/luxc/common.lux
index 633263243..b5754b088 100644
--- a/new-luxc/test/test/luxc/common.lux
+++ b/new-luxc/test/test/luxc/common.lux
@@ -14,41 +14,41 @@
[".T_jvm" eval]
[".T_jvm" runtime]
[".T_jvm" statement])
- ## [js]
- ## (js [".T_js" expression]
- ## [".T_js" eval]
- ## [".T_js" runtime]
- ## [".T_js" statement])
- ## [lua]
- ## (lua [".T_lua" expression]
- ## [".T_lua" eval]
- ## [".T_lua" runtime]
- ## [".T_lua" statement])
- ## [ruby]
- ## (ruby [".T_ruby" expression]
- ## [".T_ruby" eval]
- ## [".T_ruby" runtime]
- ## [".T_ruby" statement])
- ## [python]
- ## (python [".T_python" expression]
- ## [".T_python" eval]
- ## [".T_python" runtime]
- ## [".T_python" statement])
- ## [r]
- ## (r [".T_r" expression]
- ## [".T_r" eval]
- ## [".T_r" runtime]
- ## [".T_r" statement])
- ## [scheme]
- ## (scheme [".T_scheme" expression]
- ## [".T_scheme" eval]
- ## [".T_scheme" runtime]
- ## [".T_scheme" statement])
- ## [common-lisp]
- ## (common-lisp [".T_common-lisp" expression]
- ## [".T_common-lisp" eval]
- ## [".T_common-lisp" runtime]
- ## [".T_common-lisp" statement])
+ [js]
+ (js [".T_js" expression]
+ [".T_js" eval]
+ [".T_js" runtime]
+ [".T_js" statement])
+ [lua]
+ (lua [".T_lua" expression]
+ [".T_lua" eval]
+ [".T_lua" runtime]
+ [".T_lua" statement])
+ [ruby]
+ (ruby [".T_ruby" expression]
+ [".T_ruby" eval]
+ [".T_ruby" runtime]
+ [".T_ruby" statement])
+ [python]
+ (python [".T_python" expression]
+ [".T_python" eval]
+ [".T_python" runtime]
+ [".T_python" statement])
+ [r]
+ (r [".T_r" expression]
+ [".T_r" eval]
+ [".T_r" runtime]
+ [".T_r" statement])
+ [scheme]
+ (scheme [".T_scheme" expression]
+ [".T_scheme" eval]
+ [".T_scheme" runtime]
+ [".T_scheme" statement])
+ [common-lisp]
+ (common-lisp [".T_common-lisp" expression]
+ [".T_common-lisp" eval]
+ [".T_common-lisp" runtime]
+ [".T_common-lisp" statement])
[php]
(php [".T_php" expression]
[".T_php" eval]
@@ -67,13 +67,13 @@
(wrap (initL.compiler host))))]
[init-jvm &host.init-host]
- ## [init-js js.init]
- ## [init-lua lua.init]
- ## [init-ruby ruby.init]
- ## [init-python python.init]
- ## [init-r r.init]
- ## [init-scheme scheme.init]
- ## [init-common-lisp common-lisp.init]
+ [init-js js.init]
+ [init-lua lua.init]
+ [init-ruby ruby.init]
+ [init-python python.init]
+ [init-r r.init]
+ [init-scheme scheme.init]
+ [init-common-lisp common-lisp.init]
[init-php php.init]
)
@@ -106,26 +106,26 @@
(def: #export run-jvm (runner runtimeT_jvm.translate expressionT_jvm.translate evalT_jvm.eval init-jvm))
(def: #export def-jvm (definer runtimeT_jvm.translate expressionT_jvm.translate evalT_jvm.eval init-jvm statementT_jvm.translate-def))
-## (def: #export run-js (runner runtimeT_js.translate expressionT_js.translate evalT_js.eval init-js))
-## (def: #export def-js (definer runtimeT_js.translate expressionT_js.translate evalT_js.eval init-js statementT_js.translate-def))
+(def: #export run-js (runner runtimeT_js.translate expressionT_js.translate evalT_js.eval init-js))
+(def: #export def-js (definer runtimeT_js.translate expressionT_js.translate evalT_js.eval init-js statementT_js.translate-def))
-## (def: #export run-lua (runner runtimeT_lua.translate expressionT_lua.translate evalT_lua.eval init-lua))
-## (def: #export def-lua (definer runtimeT_lua.translate expressionT_lua.translate evalT_lua.eval init-lua statementT_lua.translate-def))
+(def: #export run-lua (runner runtimeT_lua.translate expressionT_lua.translate evalT_lua.eval init-lua))
+(def: #export def-lua (definer runtimeT_lua.translate expressionT_lua.translate evalT_lua.eval init-lua statementT_lua.translate-def))
-## (def: #export run-ruby (runner runtimeT_ruby.translate expressionT_ruby.translate evalT_ruby.eval init-ruby))
-## (def: #export def-ruby (definer runtimeT_ruby.translate expressionT_ruby.translate evalT_ruby.eval init-ruby statementT_ruby.translate-def))
+(def: #export run-ruby (runner runtimeT_ruby.translate expressionT_ruby.translate evalT_ruby.eval init-ruby))
+(def: #export def-ruby (definer runtimeT_ruby.translate expressionT_ruby.translate evalT_ruby.eval init-ruby statementT_ruby.translate-def))
-## (def: #export run-python (runner runtimeT_python.translate expressionT_python.translate evalT_python.eval init-python))
-## (def: #export def-python (definer runtimeT_python.translate expressionT_python.translate evalT_python.eval init-python statementT_python.translate-def))
+(def: #export run-python (runner runtimeT_python.translate expressionT_python.translate evalT_python.eval init-python))
+(def: #export def-python (definer runtimeT_python.translate expressionT_python.translate evalT_python.eval init-python statementT_python.translate-def))
-## (def: #export run-r (runner runtimeT_r.translate expressionT_r.translate evalT_r.eval init-r))
-## (def: #export def-r (definer runtimeT_r.translate expressionT_r.translate evalT_r.eval init-r statementT_r.translate-def))
+(def: #export run-r (runner runtimeT_r.translate expressionT_r.translate evalT_r.eval init-r))
+(def: #export def-r (definer runtimeT_r.translate expressionT_r.translate evalT_r.eval init-r statementT_r.translate-def))
-## (def: #export run-scheme (runner runtimeT_scheme.translate expressionT_scheme.translate evalT_scheme.eval init-scheme))
-## (def: #export def-scheme (definer runtimeT_scheme.translate expressionT_scheme.translate evalT_scheme.eval init-scheme statementT_scheme.translate-def))
+(def: #export run-scheme (runner runtimeT_scheme.translate expressionT_scheme.translate evalT_scheme.eval init-scheme))
+(def: #export def-scheme (definer runtimeT_scheme.translate expressionT_scheme.translate evalT_scheme.eval init-scheme statementT_scheme.translate-def))
-## (def: #export run-common-lisp (runner runtimeT_common-lisp.translate expressionT_common-lisp.translate evalT_common-lisp.eval init-common-lisp))
-## (def: #export def-common-lisp (definer runtimeT_common-lisp.translate expressionT_common-lisp.translate evalT_common-lisp.eval init-common-lisp statementT_common-lisp.translate-def))
+(def: #export run-common-lisp (runner runtimeT_common-lisp.translate expressionT_common-lisp.translate evalT_common-lisp.eval init-common-lisp))
+(def: #export def-common-lisp (definer runtimeT_common-lisp.translate expressionT_common-lisp.translate evalT_common-lisp.eval init-common-lisp statementT_common-lisp.translate-def))
(def: #export run-php (runner runtimeT_php.translate expressionT_php.translate evalT_php.eval init-php))
(def: #export def-php (definer runtimeT_php.translate expressionT_php.translate evalT_php.eval init-php statementT_php.translate-def))
diff --git a/new-luxc/test/test/luxc/lang/analysis/case.lux b/new-luxc/test/test/luxc/lang/analysis/case.lux
index bcb9943bb..63dd60e14 100644
--- a/new-luxc/test/test/luxc/lang/analysis/case.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/case.lux
@@ -10,7 +10,7 @@
[text "T/" Eq<Text>]
text/format
(coll [list "L/" Monad<List>]
- ["S" set]))
+ (set ["set" unordered])))
["r" math/random "r/" Monad<Random>]
[macro #+ Monad<Meta>]
(macro [code])
@@ -136,13 +136,14 @@
variant-name (r.text +5)
record-name (|> (r.text +5) (r.filter (|>> (T/= variant-name) not)))
size (|> r.nat (:: @ map (|>> (n/% +10) (n/max +2))))
- variant-tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map S.to-list))
- record-tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map S.to-list))
+ variant-tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map set.to-list))
+ record-tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map set.to-list))
primitivesTC (r.list size gen-primitive)
#let [primitivesT (L/map product.left primitivesTC)
primitivesC (L/map product.right primitivesTC)
- variant-tags+ (L/map (|>> [module-name] code.tag) variant-tags)
- record-tags+ (L/map (|>> [module-name] code.tag) record-tags)
+ code-tag (|>> [module-name] code.tag)
+ variant-tags+ (L/map code-tag variant-tags)
+ record-tags+ (L/map code-tag record-tags)
variantTC (list.zip2 variant-tags+ primitivesC)]
inputC (input variant-tags+ record-tags+ primitivesC)
[outputT outputC] gen-primitive
@@ -165,63 +166,31 @@
(list (let [[_pattern _body] (maybe.assume (list.nth heterogeneous-idx exhaustive-branchesC))]
[_pattern heterogeneousC]))
(list.drop (n/inc heterogeneous-idx) exhaustive-branchesC)))
- ]]
+ analyse-pm (|>> (@.analyse-case analyse inputC)
+ (&.with-type outputT)
+ &.with-scope
+ (do Monad<Meta>
+ [_ (@module.declare-tags variant-tags false
+ (#.Named [module-name variant-name]
+ (type.variant primitivesT)))
+ _ (@module.declare-tags record-tags false
+ (#.Named [module-name record-name]
+ (type.tuple primitivesT)))])
+ (@module.with-module +0 module-name))]]
($_ seq
(test "Will reject empty pattern-matching (no branches)."
- (|> (&.with-scope
- (&.with-type outputT
- (@.analyse-case analyse inputC (list))))
+ (|> (analyse-pm (list))
check-failure))
(test "Can analyse exhaustive pattern-matching."
- (|> (@module.with-module +0 module-name
- (do Monad<Meta>
- [_ (@module.declare-tags variant-tags false
- (#.Named [module-name variant-name]
- (type.variant primitivesT)))
- _ (@module.declare-tags record-tags false
- (#.Named [module-name record-name]
- (type.tuple primitivesT)))]
- (&.with-scope
- (&.with-type outputT
- (@.analyse-case analyse inputC exhaustive-branchesC)))))
+ (|> (analyse-pm exhaustive-branchesC)
check-success))
(test "Will reject non-exhaustive pattern-matching."
- (|> (@module.with-module +0 module-name
- (do Monad<Meta>
- [_ (@module.declare-tags variant-tags false
- (#.Named [module-name variant-name]
- (type.variant primitivesT)))
- _ (@module.declare-tags record-tags false
- (#.Named [module-name record-name]
- (type.tuple primitivesT)))]
- (&.with-scope
- (&.with-type outputT
- (@.analyse-case analyse inputC non-exhaustive-branchesC)))))
+ (|> (analyse-pm non-exhaustive-branchesC)
check-failure))
(test "Will reject redundant pattern-matching."
- (|> (@module.with-module +0 module-name
- (do Monad<Meta>
- [_ (@module.declare-tags variant-tags false
- (#.Named [module-name variant-name]
- (type.variant primitivesT)))
- _ (@module.declare-tags record-tags false
- (#.Named [module-name record-name]
- (type.tuple primitivesT)))]
- (&.with-scope
- (&.with-type outputT
- (@.analyse-case analyse inputC redundant-branchesC)))))
+ (|> (analyse-pm redundant-branchesC)
check-failure))
(test "Will reject pattern-matching if the bodies of the branches do not all have the same type."
- (|> (@module.with-module +0 module-name
- (do Monad<Meta>
- [_ (@module.declare-tags variant-tags false
- (#.Named [module-name variant-name]
- (type.variant primitivesT)))
- _ (@module.declare-tags record-tags false
- (#.Named [module-name record-name]
- (type.tuple primitivesT)))]
- (&.with-scope
- (&.with-type outputT
- (@.analyse-case analyse inputC heterogeneous-branchesC)))))
+ (|> (analyse-pm heterogeneous-branchesC)
check-failure))
))))
diff --git a/new-luxc/test/test/luxc/lang/analysis/common.lux b/new-luxc/test/test/luxc/lang/analysis/common.lux
index cf213ccef..35212e55d 100644
--- a/new-luxc/test/test/luxc/lang/analysis/common.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/common.lux
@@ -21,7 +21,7 @@
[<generators> (do-template [<type> <code-wrapper> <value-gen>]
[(r.seq (r/wrap <type>) (r/map <code-wrapper> <value-gen>))]
- [Unit code.tuple (r.list +0 gen-unit)]
+ [Top code.tuple (r.list +0 gen-unit)]
[Bool code.bool r.bool]
[Nat code.nat r.nat]
[Int code.int r.int]
diff --git a/new-luxc/test/test/luxc/lang/analysis/primitive.lux b/new-luxc/test/test/luxc/lang/analysis/primitive.lux
index 572766820..aa3e30aab 100644
--- a/new-luxc/test/test/luxc/lang/analysis/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/primitive.lux
@@ -34,7 +34,7 @@
@.analyse-unit)
(macro.run (io.run init-jvm))
(case> (^ (#e.Success [_type (^code [])]))
- (type/= Unit _type)
+ (type/= Top _type)
_
false))
diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
index 807a9f3d8..6d176e0cd 100644
--- a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
@@ -366,12 +366,12 @@
(test "Can run an IO computation concurrently."
(check-success+ "lux process future"
(list (` ("lux function" (~' _) (~' _) (~ primC))))
- Unit))
+ Top))
(test "Can schedule an IO computation to run concurrently at some future time."
(check-success+ "lux process schedule"
(list timeC
(` ("lux function" (~' _) (~' _) (~ primC))))
- Unit))
+ Top))
))))
(context: "IO procedures"
@@ -381,7 +381,7 @@
exitC (|> r.int (:: @ map code.int))]
($_ seq
(test "Can log messages to standard output."
- (check-success+ "lux io log" (list logC) Unit))
+ (check-success+ "lux io log" (list logC) Top))
(test "Can throw a run-time error."
(check-success+ "lux io error" (list logC) Bottom))
(test "Can exit the program."
diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux
index 77fb71d27..0c27d14d1 100644
--- a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux
@@ -11,7 +11,7 @@
text/format
(coll [array]
[list "list/" Fold<List>]
- [dict]))
+ (dictionary ["dict" unordered])))
["r" math/random "r/" Monad<Random>]
[macro #+ Monad<Meta>]
(macro [code])
@@ -415,14 +415,14 @@
(code.text "allHtmlFlavor")
(`' ("lux check" (+0 "java.awt.datatransfer.DataFlavor" (+0))
("jvm object null"))))
- Unit))
+ Top))
(test "jvm member static put (final)"
(failure "jvm member static put"
(list (code.text "java.lang.System")
(code.text "out")
(`' ("lux check" (+0 "java.io.PrintStream" (+0))
("jvm object null"))))
- Unit))
+ Top))
(test "jvm member static put (inheritance in)"
(success "jvm member static put"
(list (code.text "java.awt.datatransfer.DataFlavor")
@@ -430,7 +430,7 @@
(`' ("jvm object cast"
("lux check" (+0 "javax.activation.ActivationDataFlavor" (+0))
("jvm object null")))))
- Unit))
+ Top))
))
(context: "Member [Virtual Field]."
diff --git a/new-luxc/test/test/luxc/lang/analysis/reference.lux b/new-luxc/test/test/luxc/lang/analysis/reference.lux
index 0ab23600b..9ce4a51c1 100644
--- a/new-luxc/test/test/luxc/lang/analysis/reference.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/reference.lux
@@ -40,7 +40,7 @@
(|> (do Monad<Meta>
[_ (&module.create +0 module-name)
_ (&module.define [module-name var-name]
- [ref-type (' {}) (:! Void [])])]
+ [ref-type (' {}) (:! Bottom [])])]
(@common.with-unknown-type
(@.analyse-reference [module-name var-name])))
(macro.run (io.run init-jvm))
diff --git a/new-luxc/test/test/luxc/lang/analysis/structure.lux b/new-luxc/test/test/luxc/lang/analysis/structure.lux
index cdef25448..0a94e37da 100644
--- a/new-luxc/test/test/luxc/lang/analysis/structure.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/structure.lux
@@ -10,7 +10,7 @@
[text]
text/format
(coll [list "list/" Functor<List>]
- ["S" set]))
+ (set ["set" unordered])))
["r" math/random "r/" Monad<Random>]
[macro]
(macro [code])
@@ -216,7 +216,7 @@
(<| (times +100)
(do @
[size (|> r.nat (:: @ map (|>> (n/% +10) (n/max +2))))
- tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map S.to-list))
+ tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map set.to-list))
choice (|> r.nat (:: @ map (n/% size)))
other-choice (|> r.nat (:: @ map (n/% size)) (r.filter (|>> (n/= choice) not)))
primitives (r.list size gen-primitive)
@@ -279,7 +279,7 @@
(<| (times +100)
(do @
[size (|> r.nat (:: @ map (|>> (n/% +10) (n/max +2))))
- tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map S.to-list))
+ tags (|> (r.set text.Hash<Text> size (r.text +5)) (:: @ map set.to-list))
primitives (r.list size gen-primitive)
module-name (r.text +5)
type-name (r.text +5)
diff --git a/new-luxc/test/test/luxc/lang/synthesis/function.lux b/new-luxc/test/test/luxc/lang/synthesis/function.lux
index c73793c8d..fa29b4284 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/function.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/function.lux
@@ -8,8 +8,8 @@
[number]
text/format
(coll [list "list/" Functor<List> Fold<List>]
- [dict #+ Dict]
- [set]))
+ (dictionary ["dict" unordered #+ Dict])
+ (set ["set" unordered])))
(macro [code])
["r" math/random "r/" Monad<Random>]
test)
diff --git a/new-luxc/test/test/luxc/lang/synthesis/loop.lux b/new-luxc/test/test/luxc/lang/synthesis/loop.lux
index 5d2db50a8..23641780f 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/loop.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/loop.lux
@@ -5,7 +5,7 @@
(data [bool "bool/" Eq<Bool>]
[number]
(coll [list "list/" Functor<List> Fold<List>]
- ["s" set])
+ (set ["set" unordered]))
text/format)
(macro [code])
["r" math/random "r/" Monad<Random>]
@@ -58,7 +58,7 @@
[inputA (|> r.nat (:: @ map code.nat))
num-cases (|> r.nat (:: @ map (|>> (n/% +10) (n/max +1))))
tests (|> (r.set number.Hash<Nat> num-cases r.nat)
- (:: @ map (|>> s.to-list (list/map code.nat))))
+ (:: @ map (|>> set.to-list (list/map code.nat))))
#let [bad-bodies (list.repeat num-cases (' []))]
good-body (gen-body arity output)
where-to-set (|> r.nat (:: @ map (n/% num-cases)))
diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux
index 2964edbe4..44df51014 100644
--- a/new-luxc/test/test/luxc/lang/translation/case.lux
+++ b/new-luxc/test/test/luxc/lang/translation/case.lux
@@ -97,37 +97,37 @@
false))))
)))
-## (context: "[JVM] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-jvm)))
+(context: "[JVM] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-jvm)))
-## (context: "[JS] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-js)))
+(context: "[JS] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-js)))
-## (context: "[Lua] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-lua)))
+(context: "[Lua] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-lua)))
-## (context: "[Ruby] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-ruby)))
+(context: "[Ruby] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-ruby)))
-## (context: "[Python] Function."
-## (<| (times +100)
-## (pattern-matching-spec run-python)))
+(context: "[Python] Function."
+ (<| (times +100)
+ (pattern-matching-spec run-python)))
-## (context: "[R] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-r)))
+(context: "[R] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-r)))
-## (context: "[Scheme] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-scheme)))
+(context: "[Scheme] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-scheme)))
-## (context: "[Common Lisp] Pattern-matching."
-## (<| (times +100)
-## (pattern-matching-spec run-common-lisp)))
+(context: "[Common Lisp] Pattern-matching."
+ (<| (times +100)
+ (pattern-matching-spec run-common-lisp)))
(context: "[PHP] Pattern-matching."
(<| (times +100)
diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux
index dbd7b6d50..be552f1f0 100644
--- a/new-luxc/test/test/luxc/lang/translation/common.lux
+++ b/new-luxc/test/test/luxc/lang/translation/common.lux
@@ -580,37 +580,37 @@
(process-spec run)
))
-## (context: "[JVM] Common procedures."
-## (<| (times +100)
-## (all-specs run-jvm)))
+(context: "[JVM] Common procedures."
+ (<| (times +100)
+ (all-specs run-jvm)))
-## (context: "[JS] Common procedures."
-## (<| (times +100)
-## (all-specs run-js)))
+(context: "[JS] Common procedures."
+ (<| (times +100)
+ (all-specs run-js)))
-## (context: "[Lua] Common procedures."
-## (<| (times +100)
-## (all-specs run-lua)))
+(context: "[Lua] Common procedures."
+ (<| (times +100)
+ (all-specs run-lua)))
-## (context: "[Ruby] Common procedures."
-## (<| (times +100)
-## (all-specs run-ruby)))
+(context: "[Ruby] Common procedures."
+ (<| (times +100)
+ (all-specs run-ruby)))
-## (context: "[Python] Common procedures."
-## (<| (times +100)
-## (all-specs run-python)))
+(context: "[Python] Common procedures."
+ (<| (times +100)
+ (all-specs run-python)))
-## (context: "[R] Common procedures."
-## (<| (times +100)
-## (all-specs run-r)))
+(context: "[R] Common procedures."
+ (<| (times +100)
+ (all-specs run-r)))
-## (context: "[Scheme] Common procedures."
-## (<| (times +100)
-## (all-specs run-scheme)))
+(context: "[Scheme] Common procedures."
+ (<| (times +100)
+ (all-specs run-scheme)))
-## (context: "[Common Lisp] Common procedures."
-## (<| (times +100)
-## (all-specs run-common-lisp)))
+(context: "[Common Lisp] Common procedures."
+ (<| (times +100)
+ (all-specs run-common-lisp)))
(context: "[PHP] Common procedures."
(<| (times +100)
diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux
index f671f2503..69cd174dd 100644
--- a/new-luxc/test/test/luxc/lang/translation/function.lux
+++ b/new-luxc/test/test/luxc/lang/translation/function.lux
@@ -91,37 +91,37 @@
false))))))
)))
-## (context: "[JVM] Function."
-## (<| (times +100)
-## (function-spec run-jvm)))
+(context: "[JVM] Function."
+ (<| (times +100)
+ (function-spec run-jvm)))
-## (context: "[JS] Function."
-## (<| (times +100)
-## (function-spec run-js)))
+(context: "[JS] Function."
+ (<| (times +100)
+ (function-spec run-js)))
-## (context: "[Lua] Function."
-## (<| (times +100)
-## (function-spec run-lua)))
+(context: "[Lua] Function."
+ (<| (times +100)
+ (function-spec run-lua)))
-## (context: "[Ruby] Function."
-## (<| (times +100)
-## (function-spec run-ruby)))
+(context: "[Ruby] Function."
+ (<| (times +100)
+ (function-spec run-ruby)))
-## (context: "[Python] Function."
-## (<| (times +100)
-## (function-spec run-python)))
+(context: "[Python] Function."
+ (<| (times +100)
+ (function-spec run-python)))
-## (context: "[R] Function."
-## (<| (times +100)
-## (function-spec run-r)))
+(context: "[R] Function."
+ (<| (times +100)
+ (function-spec run-r)))
-## (context: "[Scheme] Function."
-## (<| (times +100)
-## (function-spec run-scheme)))
+(context: "[Scheme] Function."
+ (<| (times +100)
+ (function-spec run-scheme)))
-## (context: "[Common Lisp] Function."
-## (<| (times +100)
-## (function-spec run-common-lisp)))
+(context: "[Common Lisp] Function."
+ (<| (times +100)
+ (function-spec run-common-lisp)))
(context: "[PHP] Function."
(<| (times +100)
diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux
index b9454ce24..e69590975 100644
--- a/new-luxc/test/test/luxc/lang/translation/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux
@@ -56,37 +56,37 @@
["text" Text code.text %text% text/=]))
))))
-## (context: "[JVM] Primitives."
-## (<| (times +100)
-## (spec run-jvm)))
+(context: "[JVM] Primitives."
+ (<| (times +100)
+ (spec run-jvm)))
-## (context: "[JS] Primitives."
-## (<| (times +100)
-## (spec run-js)))
+(context: "[JS] Primitives."
+ (<| (times +100)
+ (spec run-js)))
-## (context: "[Lua] Primitives."
-## (<| (times +100)
-## (spec run-lua)))
+(context: "[Lua] Primitives."
+ (<| (times +100)
+ (spec run-lua)))
-## (context: "[Ruby] Primitives."
-## (<| (times +100)
-## (spec run-ruby)))
+(context: "[Ruby] Primitives."
+ (<| (times +100)
+ (spec run-ruby)))
-## (context: "[Python] Primitives."
-## (<| (times +100)
-## (spec run-python)))
+(context: "[Python] Primitives."
+ (<| (times +100)
+ (spec run-python)))
-## (context: "[R] Primitives."
-## (<| (times +100)
-## (spec run-r)))
+(context: "[R] Primitives."
+ (<| (times +100)
+ (spec run-r)))
-## (context: "[Scheme] Primitives."
-## (<| (times +100)
-## (spec run-scheme)))
+(context: "[Scheme] Primitives."
+ (<| (times +100)
+ (spec run-scheme)))
-## (context: "[Common Lisp] Primitives."
-## (<| (times +100)
-## (spec run-common-lisp)))
+(context: "[Common Lisp] Primitives."
+ (<| (times +100)
+ (spec run-common-lisp)))
(context: "[PHP] Primitives."
(<| (times +100)
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
index 7364e33eb..d6c848c27 100644
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ b/new-luxc/test/test/luxc/lang/translation/reference.lux
@@ -70,37 +70,37 @@
(seq (definitions-spec define)
(variables-spec run)))
-## (context: "[JVM] References."
-## (<| (times +100)
-## (references-spec run-jvm def-jvm)))
+(context: "[JVM] References."
+ (<| (times +100)
+ (references-spec run-jvm def-jvm)))
-## (context: "[JS] References."
-## (<| (times +100)
-## (references-spec run-js def-js)))
+(context: "[JS] References."
+ (<| (times +100)
+ (references-spec run-js def-js)))
-## (context: "[Lua] References."
-## (<| (times +100)
-## (references-spec run-lua def-lua)))
+(context: "[Lua] References."
+ (<| (times +100)
+ (references-spec run-lua def-lua)))
-## (context: "[Ruby] References."
-## (<| (times +100)
-## (references-spec run-ruby def-ruby)))
+(context: "[Ruby] References."
+ (<| (times +100)
+ (references-spec run-ruby def-ruby)))
-## (context: "[Python] References."
-## (<| (times +100)
-## (references-spec run-python def-python)))
+(context: "[Python] References."
+ (<| (times +100)
+ (references-spec run-python def-python)))
-## (context: "[R] References."
-## (<| (times +100)
-## (references-spec run-r def-r)))
+(context: "[R] References."
+ (<| (times +100)
+ (references-spec run-r def-r)))
-## (context: "[Scheme] References."
-## (<| (times +100)
-## (references-spec run-scheme def-scheme)))
+(context: "[Scheme] References."
+ (<| (times +100)
+ (references-spec run-scheme def-scheme)))
-## (context: "[Common Lisp] References."
-## (<| (times +100)
-## (references-spec run-common-lisp def-common-lisp)))
+(context: "[Common Lisp] References."
+ (<| (times +100)
+ (references-spec run-common-lisp def-common-lisp)))
(context: "[PHP] References."
(<| (times +100)
diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux
index 0619d6894..2ca57cbac 100644
--- a/new-luxc/test/test/luxc/lang/translation/structure.lux
+++ b/new-luxc/test/test/luxc/lang/translation/structure.lux
@@ -77,37 +77,37 @@
(tuples-spec run)
(variants-spec run)))
-## (context: "[JVM] Structures."
-## (<| (times +100)
-## (structure-spec run-jvm)))
+(context: "[JVM] Structures."
+ (<| (times +100)
+ (structure-spec run-jvm)))
-## (context: "[JS] Structures."
-## (<| (times +100)
-## (structure-spec run-js)))
+(context: "[JS] Structures."
+ (<| (times +100)
+ (structure-spec run-js)))
-## (context: "[Lua] Structures."
-## (<| (times +100)
-## (structure-spec run-lua)))
+(context: "[Lua] Structures."
+ (<| (times +100)
+ (structure-spec run-lua)))
-## (context: "[Ruby] Structures."
-## (<| (times +100)
-## (structure-spec run-ruby)))
+(context: "[Ruby] Structures."
+ (<| (times +100)
+ (structure-spec run-ruby)))
-## (context: "[Python] Structures."
-## (<| (times +100)
-## (structure-spec run-python)))
+(context: "[Python] Structures."
+ (<| (times +100)
+ (structure-spec run-python)))
-## (context: "[R] Structures."
-## (<| (times +100)
-## (structure-spec run-r)))
+(context: "[R] Structures."
+ (<| (times +100)
+ (structure-spec run-r)))
-## (context: "[Scheme] Structures."
-## (<| (times +100)
-## (structure-spec run-scheme)))
+(context: "[Scheme] Structures."
+ (<| (times +100)
+ (structure-spec run-scheme)))
-## (context: "[Common Lisp] Structures."
-## (<| (times +100)
-## (structure-spec run-common-lisp)))
+(context: "[Common Lisp] Structures."
+ (<| (times +100)
+ (structure-spec run-common-lisp)))
(context: "[PHP] Structures."
(<| (times +100)
diff --git a/new-luxc/test/tests.lux b/new-luxc/test/tests.lux
index 586869c45..b6e6f3ca8 100644
--- a/new-luxc/test/tests.lux
+++ b/new-luxc/test/tests.lux
@@ -5,27 +5,27 @@
(concurrency [promise])
[cli #+ program:]
[test])
- (test (luxc (lang ## (analysis ["_.A" primitive]
- ## ["_.A" structure]
- ## ["_.A" reference]
- ## ["_.A" case]
- ## ["_.A" function]
- ## ["_.A" type]
- ## (procedure ["_.A" common]
- ## ["_.A" host]))
- ## (synthesis ["_.S" primitive]
- ## ["_.S" structure]
- ## (case ["_.S" special])
- ## ["_.S" function]
- ## ["_.S" procedure]
- ## ["_.S" loop])
- (translation ## ["_.T" primitive]
- ## ["_.T" structure]
- ## ["_.T" function]
- ## ["_.T" reference]
- ## ["_.T" case]
+ (test (luxc (lang (analysis ["_.A" primitive]
+ ["_.A" structure]
+ ["_.A" reference]
+ ["_.A" case]
+ ["_.A" function]
+ ["_.A" type]
+ (procedure ["_.A" common]
+ ["_.A" host]))
+ (synthesis ["_.S" primitive]
+ ["_.S" structure]
+ (case ["_.S" special])
+ ["_.S" function]
+ ["_.S" procedure]
+ ["_.S" loop])
+ (translation ["_.T" primitive]
+ ["_.T" structure]
+ ["_.T" function]
+ ["_.T" reference]
+ ["_.T" case]
["_.T" common]
- ## ["_.T" jvm]
+ ["_.T" jvm]
## ["_.T" js]
## ["_.T" lua]
## ["_.T" ruby]