aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation.lux (renamed from new-luxc/source/luxc/generator.lux)30
1 files changed, 15 insertions, 15 deletions
diff --git a/new-luxc/source/luxc/generator.lux b/new-luxc/source/luxc/lang/translation.lux
index e9b6c4d3f..4fcc3ccb2 100644
--- a/new-luxc/source/luxc/generator.lux
+++ b/new-luxc/source/luxc/lang/translation.lux
@@ -18,12 +18,12 @@
(lang ["&;" syntax]
(analysis [";A" expression]
[";A" common])
- (synthesis [";S" expression]))
- (generator ["&&;" runtime]
- ["&&;" statement]
- ["&&;" common]
- [";G" expression]
- ["&&;" eval])
+ (synthesis [";S" expression])
+ (translation [";T" runtime]
+ [";T" statement]
+ [";T" common]
+ [";T" expression]
+ [";T" eval]))
))
(def: analyse
@@ -41,8 +41,8 @@
[[_ metaA] (&;with-scope
(&;with-expected-type Code
(analyse metaC)))
- metaI (expressionG;generate (expressionS;synthesize metaA))
- metaV (&&eval;eval metaI)
+ metaI (expressionT;generate (expressionS;synthesize metaA))
+ metaV (evalT;eval metaI)
[_ valueT valueA] (&;with-scope
(if (meta;type? (:! Code metaV))
(&;with-expected-type Type
@@ -51,9 +51,9 @@
(wrap [Type valueA])))
(commonA;with-unknown-type
(analyse valueC))))
- valueI (expressionG;generate (expressionS;synthesize valueA))
+ valueI (expressionT;generate (expressionS;synthesize valueA))
_ (&;with-scope
- (&&statement;generate-def def-name valueT valueI metaI (:! Code metaV)))]
+ (statementT;generate-def def-name valueT valueI metaI (:! Code metaV)))]
(wrap []))
(^ [_ (#;Form (list [_ (#;Text "lux program")]
@@ -63,8 +63,8 @@
[[_ programA] (&;with-scope
(&;with-expected-type (type (io;IO Unit))
(analyse programC)))
- programI (expressionG;generate (expressionS;synthesize programA))]
- (&&statement;generate-program program-args programI))
+ programI (expressionT;generate (expressionS;synthesize programA))]
+ (statementT;generate-program program-args programI))
_
(&;fail (format "Unrecognized statement: " (%code code)))))
@@ -106,7 +106,7 @@
(case (meta;run' compiler
(do meta;Monad<Meta>
[[_ artifacts _] (&module;with-module module-hash module-name
- (&&common;with-artifacts
+ (commonT;with-artifacts
(with-active-compilation [module-name
file-name
file-content]
@@ -146,7 +146,7 @@
#;mode #;Build})
(def: #export (init-compiler host)
- (-> &&common;Host Compiler)
+ (-> commonT;Host Compiler)
{#;info init-info
#;source [init-cursor +0 ""]
#;cursor init-cursor
@@ -162,7 +162,7 @@
(def: #export (generate-program program target sources)
(-> Text File (List File) (T;Task Unit))
(do T;Monad<Task>
- [compiler (|> (case (&&runtime;generate (init-compiler (io;run hostL;init-host)))
+ [compiler (|> (case (runtimeT;generate (init-compiler (io;run hostL;init-host)))
(#e;Error error)
(T;fail error)