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.lux17
1 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
index 623019971..2b17c9f8a 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
@@ -130,7 +130,7 @@
(-> Expander Handler)
(function (_ extension-name phase inputsC+)
(case inputsC+
- (^ (list [_ (#.Identifier ["" short-name])] valueC annotationsC))
+ (^ (list [_ (#.Identifier ["" short-name])] valueC annotationsC [_ (#.Bit exported?)]))
(do ///.monad
[current-module (////statement.lift-analysis
(//.lift macro.current-module-name))
@@ -139,7 +139,7 @@
#let [annotations (:coerce Code annotations)]
[type valueT valueN value] (..definition full-name #.None valueC)
_ (////statement.lift-analysis
- (module.define short-name [type annotations value]))
+ (module.define short-name [exported? type annotations value]))
#let [_ (log! (format "Definition " (%name full-name)))]
_ (////statement.lift-generation
(///generation.learn full-name valueN))
@@ -168,8 +168,8 @@
(def: (def::type-tagged expander)
(-> Expander Handler)
(..custom
- [($_ p.and s.local-identifier s.any s.any (s.tuple (p.some s.text)))
- (function (_ extension-name phase [short-name valueC annotationsC tags])
+ [($_ p.and s.local-identifier s.any s.any (s.tuple (p.some s.text)) s.bit)
+ (function (_ extension-name phase [short-name valueC annotationsC tags exported?])
(do ///.monad
[current-module (////statement.lift-analysis
(//.lift macro.current-module-name))
@@ -179,8 +179,8 @@
[type valueT valueN value] (..definition full-name (#.Some .Type) valueC)
_ (////statement.lift-analysis
(do ///.monad
- [_ (module.define short-name [type annotations value])]
- (module.declare-tags tags (macro.export? annotations) (:coerce Type value))))
+ [_ (module.define short-name [exported? type annotations value])]
+ (module.declare-tags tags exported? (:coerce Type value))))
#let [_ (log! (format "Definition " (%name full-name)))]
_ (////statement.lift-generation
(///generation.learn full-name valueN))
@@ -223,9 +223,10 @@
(def: (define-alias alias original)
(-> Text Name (////analysis.Operation Any))
(do ///.monad
- [[original-type original-annotations original-value]
+ [[exported? original-type original-annotations original-value]
(//.lift (macro.find-def original))]
- (module.define alias [original-type
+ (module.define alias [false
+ original-type
(alias-annotations original)
original-value])))