diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/control/concurrency/actor.lux | 41 | ||||
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux | 6 |
2 files changed, 23 insertions, 24 deletions
diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux index b1eb1775d..544c672d9 100644 --- a/stdlib/source/library/lux/control/concurrency/actor.lux +++ b/stdlib/source/library/lux/control/concurrency/actor.lux @@ -311,15 +311,14 @@ (<>.and <code>.symbol (at <>.monad in (list))))) (def: messageP - (Parser [Code Signature Code Code]) - (|export|.parser - (all <>.and - ..signature^ - <code>.any - <code>.any))) + (Parser [Signature Code Code]) + (all <>.and + ..signature^ + <code>.any + <code>.any)) -(def: .public message: - (syntax (_ [[export_policy signature output_type body] ..messageP]) +(def: .public message + (syntax (_ [[signature output_type body] ..messageP]) (with_symbols [g!_ g!return] (do meta.monad [actor_scope primitive.current @@ -331,19 +330,19 @@ g!inputsT (|> signature (the #inputs) (list#each product.right)) g!state (|> signature (the #state) code.local) g!self (|> signature (the #self) code.local)]] - (in (list (` (def: (~ export_policy) ((~ g!message) (~+ g!inputsC)) - (All ((~ g!_) (~+ g!all_vars)) - (-> (~+ g!inputsT) - (..Message (~ (the primitive.#abstraction actor_scope)) - (~ output_type)))) - (function ((~ g!_) (~ g!state) (~ g!self)) - (let [(~ g!state) (as (~ (the primitive.#representation actor_scope)) - (~ g!state))] - (|> (~ body) - (is ((~! async.Async) ((~! try.Try) [(~ (the primitive.#representation actor_scope)) - (~ output_type)]))) - (as ((~! async.Async) ((~! try.Try) [(~ (the primitive.#abstraction actor_scope)) - (~ output_type)])))))))) + (in (list (` (is (All ((~ g!_) (~+ g!all_vars)) + (-> (~+ g!inputsT) + (..Message (~ (the primitive.#abstraction actor_scope)) + (~ output_type)))) + (function ((~ g!message) (~+ g!inputsC)) + (function ((~ g!_) (~ g!state) (~ g!self)) + (let [(~ g!state) (as (~ (the primitive.#representation actor_scope)) + (~ g!state))] + (|> (~ body) + (is ((~! async.Async) ((~! try.Try) [(~ (the primitive.#representation actor_scope)) + (~ output_type)]))) + (as ((~! async.Async) ((~! try.Try) [(~ (the primitive.#abstraction actor_scope)) + (~ output_type)]))))))))) )))))) (type: .public Stop diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux index 6bde519da..eb9402464 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux @@ -499,9 +499,9 @@ {.#Right [source' [@where {@tag full_symbol}]]})])) ... TODO: Grammar macro for specifying syntax. -... (grammar: lux_grammar -... [expression ...] -... [form "(" [#* expression] ")"]) +... (def: lux_grammar +... (grammar [expression "..."] +... [form "(" [#* expression] ")"])) (with_expansions [<consume_1> (these where (!++ offset/0) source_code) <move_1> (these [(!forward 1 where) (!++ offset/0) source_code]) |