aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/analyser.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/analyser.lux32
1 files changed, 16 insertions, 16 deletions
diff --git a/new-luxc/source/luxc/analyser.lux b/new-luxc/source/luxc/analyser.lux
index ba6003440..97312b805 100644
--- a/new-luxc/source/luxc/analyser.lux
+++ b/new-luxc/source/luxc/analyser.lux
@@ -1,11 +1,11 @@
(;module:
lux
(lux (control monad)
- (data ["R" result]
+ (data ["e" error]
text/format)
- [macro]
- [type]
- (type ["tc" check]))
+ [meta]
+ (meta [type]
+ (type ["tc" check])))
(luxc ["&" base]
(lang ["la" analysis])
["&;" module])
@@ -19,13 +19,13 @@
["&&;" procedure]))
(def: (to-branches raw)
- (-> (List Code) (Lux (List [Code Code])))
+ (-> (List Code) (Meta (List [Code Code])))
(case raw
(^ (list))
- (:: macro;Monad<Lux> wrap (list))
+ (:: meta;Monad<Meta> wrap (list))
(^ (list& patternH bodyH inputT))
- (do macro;Monad<Lux>
+ (do meta;Monad<Meta>
[outputT (to-branches inputT)]
(wrap (list& [patternH bodyH] outputT)))
@@ -34,7 +34,7 @@
(def: #export (analyser eval)
(-> &;Eval &;Analyser)
- (: (-> Code (Lux la;Analysis))
+ (: (-> Code (Meta la;Analysis))
(function analyse [ast]
(let [[cursor ast'] ast]
## The cursor must be set in the compiler for the sake
@@ -85,7 +85,7 @@
(^ (#;Form (list& [_ (#;Symbol ["" "_lux_case"])]
input
branches)))
- (do macro;Monad<Lux>
+ (do meta;Monad<Meta>
[paired (to-branches branches)]
(&&case;analyse-case analyse input paired))
@@ -102,23 +102,23 @@
[#;Tag &&structure;analyse-tagged-sum])
(^ (#;Form (list& func args)))
- (do macro;Monad<Lux>
+ (do meta;Monad<Meta>
[[funcT =func] (&&common;with-unknown-type
(analyse func))]
(case =func
(#la;Definition def-name)
(do @
- [[def-type def-anns def-value] (macro;find-def def-name)]
- (if (macro;macro? def-anns)
+ [[def-type def-anns def-value] (meta;find-def def-name)]
+ (if (meta;macro? def-anns)
(do @
[## macro-expansion (function [compiler]
## (case (macro-caller def-value args compiler)
- ## (#R;Success [compiler' output])
- ## (#R;Success [compiler' output])
+ ## (#e;Success [compiler' output])
+ ## (#e;Success [compiler' output])
- ## (#R;Error error)
+ ## (#e;Error error)
## ((&;fail error) compiler)))
- macro-expansion (: (Lux (List Code))
+ macro-expansion (: (Meta (List Code))
(undefined))]
(case macro-expansion
(^ (list single-expansion))