aboutsummaryrefslogtreecommitdiff
path: root/lux-js/source
diff options
context:
space:
mode:
Diffstat (limited to 'lux-js/source')
-rw-r--r--lux-js/source/program.lux33
1 files changed, 15 insertions, 18 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux
index 665b4e8aa..ad7ee51f7 100644
--- a/lux-js/source/program.lux
+++ b/lux-js/source/program.lux
@@ -627,21 +627,18 @@
(..evaluate! context (_.var (reference.artifact context)))))))))
))
-(def (phase_wrapper archive)
- (-> Archive (runtime.Operation phase.Wrapper))
- (do phase.monad
- []
- (in (as phase.Wrapper
- (for @.jvm
- ... The implementation for @.jvm is technically incorrect.
- ... However, the JS compiler runs fast enough on Node to be fully hosted there.
- ... And running the JS compiler on the JVM (on top of Nashorn) is impractically slow.
- ... This means that in practice, only the @.js implementation matters.
- ... And since no cross-language boundary needs to be handled, it's a correct implementation.
- (|>>)
-
- @.js
- (|>>))))))
+(def phase_wrapper
+ phase.Wrapper
+ (for @.jvm
+ ... The implementation for @.jvm is technically incorrect.
+ ... However, the JS compiler runs fast enough on Node to be fully hosted there.
+ ... And running the JS compiler on the JVM (on top of Nashorn) is impractically slow.
+ ... This means that in practice, only the @.js implementation matters.
+ ... And since no cross-language boundary needs to be handled, it's a correct implementation.
+ (|>>)
+
+ @.js
+ (|>>)))
(def platform
(IO (Platform [Register Text] _.Expression _.Statement))
@@ -676,8 +673,8 @@
(_.string "")))))
(for @.jvm
- (def (extender phase_wrapper)
- (-> phase.Wrapper Extender)
+ (def extender
+ Extender
... TODO: Stop relying on coercions ASAP.
(<| (as Extender)
(function (@self handler))
@@ -735,7 +732,7 @@
analysis.bundle
(io.io platform)
generation.bundle
- (function.constant extension/bundle.empty)
+ extension/bundle.empty
..lux_program
(reference.constant js/reference.system)
[(And Register Text) _.Expression _.Statement]