diff options
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation')
5 files changed, 26 insertions, 26 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)] diff --git a/lux-jvm/source/luxc/lang/translation/jvm/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/common.lux index 283081608..b6bba249f 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/common.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/common.lux @@ -53,7 +53,7 @@ ... (function (_ (^@ def-name [def-module def-name]) def-bytecode) ... (let [normal-name (format (name.normalize def-name) (%n (text/hash def-name))) ... class-name (format (text.replace-all "/" "." def-module) "." normal-name)] -... (<| (macro.run state) +... (<| (macro.result state) ... (do macro.monad ... [_ (..store-class class-name def-bytecode) ... class (..load-class class-name)] diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux index 14d31d4e2..eaee3b51e 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux @@ -47,7 +47,7 @@ (-> Text Phase Archive s (Operation Inst))] Handler)) (function (_ extension_name phase archive input) - (case (<s>.run parser input) + (case (<s>.result parser input) (#try.Success input') (handler extension_name phase archive input') diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux index 2d94e822c..6fc52a0ab 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux @@ -5,6 +5,7 @@ [abstract ["." monad (#+ do)]] [control + ["." maybe ("#\." functor)] ["." exception (#+ exception:)] ["." function] ["<>" parser ("#\." monad) @@ -12,7 +13,6 @@ ["<.>" synthesis (#+ Parser)]]] [data ["." product] - ["." maybe ("#\." functor)] ["." text ("#\." equivalence) ["%" format (#+ format)]] [collection diff --git a/lux-jvm/source/luxc/lang/translation/jvm/function.lux b/lux-jvm/source/luxc/lang/translation/jvm/function.lux index b39157480..dfca4a6e6 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/function.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/function.lux @@ -345,11 +345,11 @@ [functionI (generate archive functionS) argsI (monad.map @ (generate archive) argsS) .let [applyI (|> argsI - (list.chunk //runtime.num_apply_variants) - (list@map (.function (_ chunkI+) + (list.sub //runtime.num_apply_variants) + (list@map (.function (_ subI+) (|>> (_.CHECKCAST //.$Function) - (_.fuse chunkI+) - (_.INVOKEVIRTUAL //.$Function //runtime.apply_method (//runtime.apply_signature (list.size chunkI+)))))) + (_.fuse subI+) + (_.INVOKEVIRTUAL //.$Function //runtime.apply_method (//runtime.apply_signature (list.size subI+)))))) _.fuse)]] (in (|>> functionI applyI)))) |