aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/extension/statement.lux7
1 files changed, 4 insertions, 3 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
index c5ae87050..29602faf7 100644
--- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
+++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux
@@ -91,16 +91,17 @@
(//.lift macro.current-module-name))
#let [full-name [current-module short-name]]
[_ annotationsT annotationsV] (evaluate! Code annotationsC)
- #let [annotationsV (:coerce Code annotationsV)]
+ #let [annotationsV (:coerce Code annotationsV)
+ type-definition? (macro.type? annotationsV)]
[value//type valueT valueN valueV] (define! full-name
- (if (macro.type? annotationsV)
+ (if type-definition?
(#.Some Type)
#.None)
valueC)
_ (statement.lift-analysis
(do @
[_ (module.define short-name [value//type annotationsV valueV])]
- (if (macro.type? annotationsV)
+ (if type-definition?
(case (macro.declared-tags annotationsV)
#.Nil
(wrap [])