diff options
Diffstat (limited to '')
-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) |