aboutsummaryrefslogtreecommitdiff
path: root/lux-bootstrapper
diff options
context:
space:
mode:
Diffstat (limited to 'lux-bootstrapper')
-rw-r--r--lux-bootstrapper/src/lux/analyser.clj4
-rw-r--r--lux-bootstrapper/src/lux/analyser/lux.clj10
2 files changed, 8 insertions, 6 deletions
diff --git a/lux-bootstrapper/src/lux/analyser.clj b/lux-bootstrapper/src/lux/analyser.clj
index 792006ed1..4368e1305 100644
--- a/lux-bootstrapper/src/lux/analyser.clj
+++ b/lux-bootstrapper/src/lux/analyser.clj
@@ -131,7 +131,7 @@
(|let [(&/$Cons [_ (&/$Identifier "" ?name)]
(&/$Cons ?value
(&/$Cons ?meta
- (&/$Cons [_ (&/$Bit exported?)]
+ (&/$Cons exported?
(&/$Nil)))
)) parameters]
(&/with-location location
@@ -150,7 +150,7 @@
(&/$Cons ?value
(&/$Cons ?meta
(&/$Cons [_ (&/$Tuple ?tags)]
- (&/$Cons [_ (&/$Bit exported?)]
+ (&/$Cons exported?
(&/$Nil))))
)) parameters]
(&/with-location location
diff --git a/lux-bootstrapper/src/lux/analyser/lux.clj b/lux-bootstrapper/src/lux/analyser/lux.clj
index b3c2edbd9..e71e54f4f 100644
--- a/lux-bootstrapper/src/lux/analyser/lux.clj
+++ b/lux-bootstrapper/src/lux/analyser/lux.clj
@@ -559,21 +559,23 @@
(&/with-expected-type ?expected-type
(&&/analyse-1 analyse ?expected-type ?value))
(&&/analyse-1+ analyse ?value))))
+ =exported? (&&/analyse-1 analyse &type/Bit exported?)
+ ==exported? (eval! (optimize =exported?))
=meta (&&/analyse-1 analyse &type/Code ?meta)
==meta (eval! (optimize =meta))
- def-value (compile-def ?name (optimize =value) ==meta exported?)
+ def-value (compile-def ?name (optimize =value) ==meta ==exported?)
_ &type/reset-mappings
:let [def-type (&&/expr-type* =value)
_ (println 'DEF (str module-name &/+name-separator+ ?name
" : " (&type/show-type def-type)))]]
- (return (&/T [module-name def-type def-value]))))
+ (return (&/T [module-name def-type def-value ==exported?]))))
(defn analyse-def [analyse optimize eval! compile-def ?name ?value ?meta exported?]
(|do [_ (analyse-def* analyse optimize eval! compile-def ?name ?value ?meta exported?)]
(return &/$Nil)))
(defn analyse-def-type-tagged [analyse optimize eval! compile-def ?name ?value ?meta tags* exported?]
- (|do [[module-name def-type def-value] (analyse-def* analyse optimize eval! compile-def ?name ?value ?meta exported? &type/Type)
+ (|do [[module-name def-type def-value =exported?] (analyse-def* analyse optimize eval! compile-def ?name ?value ?meta exported? &type/Type)
_ (&/assert! (&type/type= &type/Type def-type)
"[Analyser Error] Cannot define tags for non-type.")
tags (&/map% (fn [tag*]
@@ -584,7 +586,7 @@
_
(&/fail-with-loc "[Analyser Error] Incorrect format for tags.")))
tags*)
- _ (&&module/declare-tags module-name tags exported? def-value)]
+ _ (&&module/declare-tags module-name tags =exported? def-value)]
(return &/$Nil)))
(defn analyse-def-alias [?alias ?original]