aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/directive/jvm.lux21
-rw-r--r--new-luxc/source/luxc/lang/host/jvm.lux1
2 files changed, 10 insertions, 12 deletions
diff --git a/new-luxc/source/luxc/lang/directive/jvm.lux b/new-luxc/source/luxc/lang/directive/jvm.lux
index 7d39c3e41..27b1c8688 100644
--- a/new-luxc/source/luxc/lang/directive/jvm.lux
+++ b/new-luxc/source/luxc/lang/directive/jvm.lux
@@ -28,7 +28,7 @@
["." generation]
["." directive]
[phase
- ["." extension (#+ Extender)
+ ["." extension
["." bundle]
[directive
["./" lux]]]]]]]]]
@@ -511,23 +511,19 @@
phase.lift)))
(def: (def::generation extender)
- (All [anchor expression directive]
- (-> Extender (directive.Handler anchor expression directive)))
+ (-> jvm.Extender
+ (directive.Handler jvm.Anchor jvm.Inst jvm.Definition))
(function (handler extension-name phase archive inputsC+)
(case inputsC+
(^ (list nameC valueC))
(do phase.monad
[[_ _ name] (lux/.evaluate! archive Text nameC)
[_ _ pseudo-handlerV] (lux/.evaluate! archive ..Pseudo-Handler valueC)
- _ (<| directive.lift-generation
+ _ (|> pseudo-handlerV
+ (:coerce ..Pseudo-Handler)
+ ..true-handler
(extension.install extender (:coerce Text name))
- (:share [anchor expression directive]
- {(directive.Handler anchor expression directive)
- handler}
- {(generation.Handler anchor expression directive)
- (<| ..true-handler
- (:coerce ..Pseudo-Handler)
- pseudo-handlerV)}))
+ directive.lift-generation)
_ (directive.lift-generation
(generation.log! (format "Generation " (%.text (:coerce Text name)))))]
(wrap directive.no-requirements))
@@ -536,6 +532,7 @@
(phase.throw extension.invalid-syntax [extension-name %.code inputsC+]))))
(def: #export (bundle extender)
- (-> Extender directive.Bundle)
+ (-> jvm.Extender
+ (directive.Bundle jvm.Anchor jvm.Inst jvm.Definition))
(|> bundle.empty
(dictionary.put "lux def generation" (..def::generation extender))))
diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux
index a56eeeb56..d957bdb1d 100644
--- a/new-luxc/source/luxc/lang/host/jvm.lux
+++ b/new-luxc/source/luxc/lang/host/jvm.lux
@@ -76,6 +76,7 @@
[Phase generation.Phase]
[Handler generation.Handler]
[Bundle generation.Bundle]
+ [Extender generation.Extender]
)
(type: #export (Generator i)