aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/translation
diff options
context:
space:
mode:
authorEduardo Julian2019-03-03 12:09:56 -0400
committerEduardo Julian2019-03-03 12:09:56 -0400
commitf4bb7ff1455659a766a074506b54129e0037db64 (patch)
treebbf79c07fa08088c99aca93236ce1eaa0974d333 /stdlib/source/lux/tool/compiler/phase/translation
parent539ad81bbb9034e41e6ca8f5445a9dd239c60be1 (diff)
Some refactoring around synthesis.
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/translation')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/common/reference.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/case.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/expression.lux5
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/extension/common.lux5
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/extension/host.lux5
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/function.lux2
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/loop.lux3
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/runtime.lux4
-rw-r--r--stdlib/source/lux/tool/compiler/phase/translation/js/structure.lux4
9 files changed, 19 insertions, 15 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/common/reference.lux b/stdlib/source/lux/tool/compiler/phase/translation/common/reference.lux
index 7cd24b23d..af676ad85 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/common/reference.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/common/reference.lux
@@ -9,8 +9,8 @@
[//
["/." //
["//." // ("#/." monad)
- [synthesis (#+ Synthesis)]
[//
+ [synthesis (#+ Synthesis)]
["." reference (#+ Register Variable Reference)]]]]])
(signature: #export (System expression)
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/case.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/case.lux
index 499486ff9..d989cb223 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/case.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/case.lux
@@ -19,9 +19,9 @@
[common
["common-." reference]]
["//." // ("#/." monad)
- ["." synthesis (#+ Synthesis Path)]
[//
- [reference (#+ Register)]]]]])
+ [reference (#+ Register)]
+ ["." synthesis (#+ Synthesis Path)]]]]])
(def: #export register
(common-reference.local _.var))
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/expression.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/expression.lux
index 76b206124..822f51e35 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/expression.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/expression.lux
@@ -11,8 +11,9 @@
["." case]
["." loop]
["." ///
- ["." synthesis]
- ["." extension]]])
+ ["." extension]
+ [//
+ ["." synthesis]]]])
(def: #export (translate synthesis)
Phase
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/extension/common.lux
index 3cf3fbc27..85bdb64ba 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/extension/common.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/extension/common.lux
@@ -19,9 +19,10 @@
["///." runtime (#+ Operation Phase Handler Bundle)]
["///." primitive]
["//." ///
- ["." synthesis (#+ Synthesis)]
["." extension
- ["." bundle]]]])
+ ["." bundle]]
+ [//
+ ["." synthesis (#+ Synthesis)]]]])
(syntax: (Vector {size s.nat} elemT)
(wrap (list (` [(~+ (list.repeat size elemT))]))))
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/extension/host.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/extension/host.lux
index 637cadc5f..8091f7fee 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/extension/host.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/extension/host.lux
@@ -13,9 +13,10 @@
[//
["///." runtime (#+ Handler Bundle)]
["//." ///
- ["." synthesis]
["." extension
- ["." bundle]]]]])
+ ["." bundle]]
+ [//
+ ["." synthesis]]]]])
(do-template [<name> <js>]
[(def: (<name> _) Nullary <js>)]
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/function.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/function.lux
index 89536c579..5727b737d 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/function.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/function.lux
@@ -19,10 +19,10 @@
[common
["common-." reference]]
["//." // ("#/." monad)
- [synthesis (#+ Synthesis)]
[//
[reference (#+ Register Variable)]
[analysis (#+ Variant Tuple Environment Arity Abstraction Application Analysis)]
+ [synthesis (#+ Synthesis)]
["." name]]]]])
(def: #export (apply translate [functionS argsS+])
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/loop.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/loop.lux
index 8d0cefe4e..cbb032153 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/loop.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/loop.lux
@@ -16,7 +16,8 @@
["//." case]
["/." //
["//." //
- [synthesis (#+ Scope Synthesis)]]]])
+ [//
+ [synthesis (#+ Scope Synthesis)]]]]])
(def: @scope (_.var "scope"))
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/runtime.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/runtime.lux
index e2014c064..5a37cb8ef 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/runtime.lux
@@ -17,9 +17,9 @@
["_" js (#+ Expression Var Computation Statement)]]]
["." ///
["//." //
- ["." synthesis]
[//
- ["/////." name]]]]
+ ["/////." name]
+ ["." synthesis]]]]
)
(do-template [<name> <base>]
diff --git a/stdlib/source/lux/tool/compiler/phase/translation/js/structure.lux b/stdlib/source/lux/tool/compiler/phase/translation/js/structure.lux
index 8af864654..732f48bb9 100644
--- a/stdlib/source/lux/tool/compiler/phase/translation/js/structure.lux
+++ b/stdlib/source/lux/tool/compiler/phase/translation/js/structure.lux
@@ -8,9 +8,9 @@
["//." runtime (#+ Operation Phase)]
["//." primitive]
["/." ///
- ["." synthesis (#+ Synthesis)]
[//
- [analysis (#+ Variant Tuple)]]]])
+ [analysis (#+ Variant Tuple)]
+ ["." synthesis (#+ Synthesis)]]]])
(def: #export (tuple translate elemsS+)
(-> Phase (Tuple Synthesis) (Operation Expression))