From 9219da9a9bf29b3a2f7f10d4865b939ded28e003 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 17 May 2020 00:21:44 -0400 Subject: :share no longer relies on :assume --- new-luxc/source/luxc/lang/directive/jvm.lux | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'new-luxc/source/luxc/lang/directive') 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)))) -- cgit v1.2.3