aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/extension/statement.lux')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/statement.lux50
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
index 4f5bdb922..83e7320d8 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
@@ -18,25 +18,25 @@
[analysis
["." module]
["." type]]
- ["." translation]
+ ["." generation]
[//
["." analysis]
["." synthesis (#+ Synthesis)]
["." statement (#+ Operation Handler Bundle)]]]])
## TODO: Inline "evaluate!'" into "evaluate!" ASAP
-(def: (evaluate!' translate code//type codeS)
+(def: (evaluate!' generate code//type codeS)
(All [anchor expression statement]
- (-> (translation.Phase anchor expression statement)
+ (-> (generation.Phase anchor expression statement)
Type
Synthesis
(Operation anchor expression statement [Type expression Any])))
- (statement.lift-translation
- (translation.with-buffer
+ (statement.lift-generation
+ (generation.with-buffer
(do ///.monad
- [codeT (translate codeS)
- count translation.next
- codeV (translation.evaluate! (format "evaluate" (%n count)) codeT)]
+ [codeT (generate codeS)
+ count generation.next
+ codeV (generation.evaluate! (format "evaluate" (%n count)) codeT)]
(wrap [code//type codeT codeV])))))
(def: (evaluate! type codeC)
@@ -46,7 +46,7 @@
[state (//.lift ///.get-state)
#let [analyse (get@ [#statement.analysis #statement.phase] state)
synthesize (get@ [#statement.synthesis #statement.phase] state)
- translate (get@ [#statement.translation #statement.phase] state)]
+ generate (get@ [#statement.generation #statement.phase] state)]
[_ code//type codeA] (statement.lift-analysis
(analysis.with-scope
(type.with-fresh-env
@@ -56,21 +56,21 @@
(wrap [type codeA]))))))
codeS (statement.lift-synthesis
(synthesize codeA))]
- (evaluate!' translate code//type codeS)))
+ (evaluate!' generate code//type codeS)))
## TODO: Inline "definition'" into "definition" ASAP
-(def: (definition' translate name code//type codeS)
+(def: (definition' generate name code//type codeS)
(All [anchor expression statement]
- (-> (translation.Phase anchor expression statement)
+ (-> (generation.Phase anchor expression statement)
Name
Type
Synthesis
(Operation anchor expression statement [Type expression Text Any])))
- (statement.lift-translation
- (translation.with-buffer
+ (statement.lift-generation
+ (generation.with-buffer
(do ///.monad
- [codeT (translate codeS)
- codeN+V (translation.define! name codeT)]
+ [codeT (generate codeS)
+ codeN+V (generation.define! name codeT)]
(wrap [code//type codeT codeN+V])))))
(def: (definition name ?type codeC)
@@ -81,7 +81,7 @@
[state (//.lift ///.get-state)
#let [analyse (get@ [#statement.analysis #statement.phase] state)
synthesize (get@ [#statement.synthesis #statement.phase] state)
- translate (get@ [#statement.translation #statement.phase] state)]
+ generate (get@ [#statement.generation #statement.phase] state)]
[_ code//type codeA] (statement.lift-analysis
(analysis.with-scope
(type.with-fresh-env
@@ -100,7 +100,7 @@
(wrap [code//type codeA]))))))
codeS (statement.lift-synthesis
(synthesize codeA))]
- (definition' translate name code//type codeS)))
+ (definition' generate name code//type codeS)))
(def: (define short-name type annotations value)
(All [anchor expression statement]
@@ -136,8 +136,8 @@
valueC)
_ (..define short-name value//type annotationsV valueV)
#let [_ (log! (format "Definition " (%name full-name)))]]
- (statement.lift-translation
- (translation.learn full-name valueN)))
+ (statement.lift-generation
+ (generation.learn full-name valueN)))
_
(///.throw //.invalid-syntax [extension-name]))))
@@ -199,10 +199,10 @@
_
(///.throw //.invalid-syntax [extension-name]))))]
- [def::analysis analysis.Handler statement.lift-analysis]
- [def::synthesis synthesis.Handler statement.lift-synthesis]
- [def::translation (translation.Handler anchor expression statement) statement.lift-translation]
- [def::statement (statement.Handler anchor expression statement) (<|)]
+ [def::analysis analysis.Handler statement.lift-analysis]
+ [def::synthesis synthesis.Handler statement.lift-synthesis]
+ [def::generation (generation.Handler anchor expression statement) statement.lift-generation]
+ [def::statement (statement.Handler anchor expression statement) (<|)]
)
(def: bundle::def
@@ -213,7 +213,7 @@
(dictionary.put "alias" def::alias)
(dictionary.put "analysis" def::analysis)
(dictionary.put "synthesis" def::synthesis)
- (dictionary.put "translation" def::translation)
+ (dictionary.put "generation" def::generation)
(dictionary.put "statement" def::statement)
)))