diff options
author | Eduardo Julian | 2021-02-07 04:56:58 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-02-07 04:56:58 -0400 |
commit | d99c47989a1047cd24019fd5ce434e701b5d3519 (patch) | |
tree | 19bfb0f5e4713e5dcd0c71bbd7b88d09d75dfe5d /lux-lua | |
parent | 571d816dfd0b056a1649f5057867abbfa4421f5d (diff) |
Mo' updates, less problems.
Diffstat (limited to 'lux-lua')
-rw-r--r-- | lux-lua/source/program.lux | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index 63cc376d8..fc0e15eeb 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -120,7 +120,7 @@ (loadTextChunk [net/sandius/rembulan/Variable java/lang/String java/lang/String] - net/sandius/rembulan/runtime/LuaFunction)]) + #try net/sandius/rembulan/runtime/LuaFunction)]) (host.import: net/sandius/rembulan/compiler/CompilerChunkLoader ["#::." @@ -274,15 +274,10 @@ (#try.Success value) (#try.Failure error) - (case (read_tuple read typed_object) - (#try.Success value) - (#try.Success value) + (read_tuple read typed_object)) - (#try.Failure error) - (exception.throw ..unknown_kind_of_object host_object))) - - _ - (exception.throw ..unknown_kind_of_object host_object)) + _) + (exception.throw ..unknown_kind_of_object host_object) ))) (exception: (cannot_apply_a_non_function {object java/lang/Object}) @@ -310,16 +305,17 @@ ## (net/sandius/rembulan/impl/ImmutableTable$Builder::build (net/sandius/rembulan/impl/ImmutableTable$Builder::new)) (:coerce java/lang/Object (lux_structure (:coerce (Array java/lang/Object) lux))))) executor)] - (wrap (|> output (array.read 0) maybe.assume (:coerce java/lang/Object) ..read)))) + (|> output (array.read 0) maybe.assume (:coerce java/lang/Object) ..read))) (def: (expander baggage macro inputs lux) (-> Baggage Expander) (case (..ensure_function macro) (#.Some macro) - (case (call_macro baggage inputs lux macro) + (case (..call_macro baggage inputs lux macro) (#try.Success output) (|> output - (:coerce (Try (Try [Lux (List Code)])))) + (:coerce (Try [Lux (List Code)])) + #try.Success) (#try.Failure error) (#try.Failure error)) @@ -327,8 +323,6 @@ #.None (exception.throw ..cannot_apply_a_non_function (:coerce java/lang/Object macro)))) -(def: separator "___") - (def: host (IO [Baggage (Host _.Expression _.Statement)]) (io (let [runtime_env (net/sandius/rembulan/env/RuntimeEnvironments::system) @@ -342,8 +336,7 @@ run! (: (-> _.Statement (Try Any)) (function (_ code) (do try.monad - [#let [lua_function (net/sandius/rembulan/load/ChunkLoader::loadTextChunk variable "lux compilation" (_.code code) - loader)] + [lua_function (net/sandius/rembulan/load/ChunkLoader::loadTextChunk variable "lux compilation" (_.code code) loader) output (net/sandius/rembulan/exec/DirectCallExecutor::call state_context (:coerce java/lang/Object lua_function) (array.new 0) executor)] (case (array.read 0 output) |