aboutsummaryrefslogtreecommitdiff
path: root/new-luxc
diff options
context:
space:
mode:
authorEduardo Julian2020-05-17 00:21:44 -0400
committerEduardo Julian2020-05-17 00:21:44 -0400
commit9219da9a9bf29b3a2f7f10d4865b939ded28e003 (patch)
tree95f191c27b106b0b00b79c0e2e09990bc2095c8a /new-luxc
parent9965c551e7ccd6de8c47c7b1b78f804801810dac (diff)
:share no longer relies on :assume
Diffstat (limited to 'new-luxc')
-rw-r--r--new-luxc/source/luxc/lang/directive/jvm.lux21
-rw-r--r--new-luxc/source/luxc/lang/host/jvm.lux1
-rw-r--r--new-luxc/source/program.lux2
3 files changed, 11 insertions, 13 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)
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux
index 44a09d4b9..f525d14d5 100644
--- a/new-luxc/source/program.lux
+++ b/new-luxc/source/program.lux
@@ -158,7 +158,7 @@
..platform
## generation.bundle
translation.bundle
- (directive.bundle extender)
+ (directive.bundle ..extender)
jvm/program.program
..extender
configuration