aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/program.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-08-02 20:26:21 -0400
committerEduardo Julian2021-08-02 20:26:21 -0400
commiteff4c59794868b89d60fdc411f9b544a270b817e (patch)
treee88c4dd09acdf1e83c8683940c0496a844096dfe /lux-jvm/source/program.lux
parentbcd70df3568d71f14763959f454c15d8164e2d15 (diff)
Fixed a bug in the new compiler which allowed the same module to be imported more than once.
Diffstat (limited to 'lux-jvm/source/program.lux')
-rw-r--r--lux-jvm/source/program.lux44
1 files changed, 22 insertions, 22 deletions
diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux
index 60fb953aa..6442a87e7 100644
--- a/lux-jvm/source/program.lux
+++ b/lux-jvm/source/program.lux
@@ -212,19 +212,19 @@
(do phase.monad
[instanceG (function.function' (#.Some [0 (.nat -1)]) expression.translate archive [(list) 4 ..how_to_wrap_a_phase])
phase_wrapper (generation.evaluate! [0 (.nat -2)] instanceG)]
- (wrap (function (_ phase)
- (<| try.assumed
- (: (Try java/lang/Object))
- (do try.monad
- [apply_method (|> phase_wrapper
- (:as java/lang/Object)
- (java/lang/Object::getClass)
- (java/lang/Class::getMethod runtime.apply_method _apply1_args))]
- (java/lang/reflect/Method::invoke
- (:as java/lang/Object phase_wrapper)
- (|> (ffi.array java/lang/Object 1)
- (ffi.array_write 0 (:as java/lang/Object phase)))
- apply_method)))))))
+ (in (function (_ phase)
+ (<| try.assumed
+ (: (Try java/lang/Object))
+ (do try.monad
+ [apply_method (|> phase_wrapper
+ (:as java/lang/Object)
+ (java/lang/Object::getClass)
+ (java/lang/Class::getMethod runtime.apply_method _apply1_args))]
+ (java/lang/reflect/Method::invoke
+ (:as java/lang/Object phase_wrapper)
+ (|> (ffi.array java/lang/Object 1)
+ (ffi.array_write 0 (:as java/lang/Object phase)))
+ apply_method)))))))
(def: #export platform
## (IO (Platform Anchor (Bytecode Any) Definition))
@@ -233,15 +233,15 @@
(do io.monad
[## host jvm/host.host
[loader host] jvm.host]
- (wrap [loader
- {#platform.&file_system (file.async file.default)
- #platform.host host
- ## #platform.phase jvm.generate
- #platform.phase expression.translate
- ## #platform.runtime runtime.generate
- #platform.runtime runtime.translate
- #platform.phase_wrapper ..phase_wrapper
- #platform.write product.right}])))
+ (in [loader
+ {#platform.&file_system (file.async file.default)
+ #platform.host host
+ ## #platform.phase jvm.generate
+ #platform.phase expression.translate
+ ## #platform.runtime runtime.generate
+ #platform.runtime runtime.translate
+ #platform.phase_wrapper ..phase_wrapper
+ #platform.write product.right}])))
(def: (extender phase_wrapper)
(-> platform.Phase_Wrapper Extender)