aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/translation/jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation/jvm.lux')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm.lux38
1 files changed, 19 insertions, 19 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm.lux b/lux-jvm/source/luxc/lang/translation/jvm.lux
index 46242abc7..dbf49b552 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm.lux
@@ -6,6 +6,7 @@
[monad (#+ do)]]
[control
pipe
+ ["." maybe]
["." try (#+ Try)]
["." exception (#+ exception:)]
["." io (#+ IO io)]
@@ -14,7 +15,6 @@
[data
[binary (#+ Binary)]
["." product]
- ["." maybe]
["." text ("#@." hash)
["%" format (#+ format)]]
[collection
@@ -126,25 +126,25 @@
(|>> valueI
(inst.PUTSTATIC (type.class bytecode_name (list)) ..value_field ..$Value)
inst.RETURN))))]
- (io.run (do (try.with io.monad)
- [_ (loader.store eval_class bytecode library)
- class (loader.load eval_class loader)
- value (\ io.monad in (..class_value eval_class class))]
- (in [value
- [eval_class bytecode]])))))
+ (io.run! (do (try.with io.monad)
+ [_ (loader.store eval_class bytecode library)
+ class (loader.load eval_class loader)
+ value (\ io.monad in (..class_value eval_class class))]
+ (in [value
+ [eval_class bytecode]])))))
(def: (execute! library loader [class_name class_bytecode])
(-> Library java/lang/ClassLoader Definition (Try Any))
- (io.run (do (try.with io.monad)
- [existing_class? (|> (atom.read library)
- (\ io.monad map (function (_ library)
- (dictionary.key? library class_name)))
- (try.lifted io.monad)
- (: (IO (Try Bit))))
- _ (if existing_class?
- (in [])
- (loader.store class_name class_bytecode library))]
- (loader.load class_name loader))))
+ (io.run! (do (try.with io.monad)
+ [existing_class? (|> (atom.read library)
+ (\ io.monad map (function (_ library)
+ (dictionary.key? library class_name)))
+ (try.lifted io.monad)
+ (: (IO (Try Bit))))
+ _ (if existing_class?
+ (in [])
+ (loader.store class_name class_bytecode library))]
+ (loader.load class_name loader))))
(def: (define! library loader context custom valueI)
(-> Library java/lang/ClassLoader generation.Context (Maybe Text) Inst (Try [Text Any Definition]))
@@ -175,11 +175,11 @@
[(..class_name context) bytecode])
(def: (re_learn context custom [_ bytecode])
- (io.run
+ (io.run!
(loader.store (maybe.else (..class_name context) custom) bytecode library)))
(def: (re_load context custom [directive_name bytecode])
- (io.run
+ (io.run!
(do (try.with io.monad)
[.let [class_name (maybe.else (..class_name context)
custom)]