diff options
author | Eduardo Julian | 2017-06-17 21:47:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-06-17 21:47:56 -0400 |
commit | e65917e3fe1b5794a2643058f15c7aeb5ca1a0fa (patch) | |
tree | 472c4c353ae42cca7be75bdbba9ede25cabac8c5 /stdlib/source/lux/concurrency/actor.lux | |
parent | 5bafba704f5e5b837b68bafbd02f22beaeafda02 (diff) |
- Small refactorings and name-changes.
Diffstat (limited to 'stdlib/source/lux/concurrency/actor.lux')
-rw-r--r-- | stdlib/source/lux/concurrency/actor.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux index de1c9d745..e9a6b5d37 100644 --- a/stdlib/source/lux/concurrency/actor.lux +++ b/stdlib/source/lux/concurrency/actor.lux @@ -149,11 +149,11 @@ (def: method^ (Syntax Method) (s;form (do s;Monad<Syntax> - [_ (s;this! (' method:)) + [_ (s;this (' method:)) vars (s;default (list) (s;tuple (s;some s;local-symbol))) [name args] (s;form ($_ s;seq s;local-symbol - (s;many common;typed-arg) + (s;many common;typed-input) )) return s;any body s;any] @@ -166,13 +166,13 @@ (def: stop^ (Syntax Code) (s;form (do s;Monad<Syntax> - [_ (s;this! (' stop:))] + [_ (s;this (' stop:))] s;any))) (def: actor-decl^ (Syntax [(List Text) Text (List [Text Code])]) (s;seq (s;default (list) (s;tuple (s;some s;local-symbol))) - (s;either (s;form (s;seq s;local-symbol (s;many common;typed-arg))) + (s;either (s;form (s;seq s;local-symbol (s;many common;typed-input))) (s;seq s;local-symbol (:: s;Monad<Syntax> wrap (list)))))) (def: (actor-def-decl [_vars _name _args] return-type) @@ -190,7 +190,7 @@ (list decl type))) -(syntax: #export (actor: [_ex-lev common;export-level] +(syntax: #export (actor: [_ex-lev common;export] [(^@ decl [_vars _name _args]) actor-decl^] state-type [methods (s;many method^)] @@ -264,16 +264,16 @@ type (` (-> (~@ (List/map product;right args)) (~ g!actor-name) (P;Promise (~ return))))] - (` (def: (~@ (common;gen-export-level _ex-lev)) ((~ (code;symbol ["" name])) (~@ arg-names) (~ g!self)) + (` (def: (~@ (common;gen-export _ex-lev)) ((~ (code;symbol ["" name])) (~@ arg-names) (~ g!self)) (~ type) (let [(~ g!output) (P;promise (~ return))] (exec (send ((~ (code;tag ["" name])) [[(~@ arg-names)] (~ g!output)]) (~ g!self)) (~ g!output)))))))) methods)] - (wrap (list& (` (type: (~@ (common;gen-export-level _ex-lev)) (~ g!state-name) (~ state-type))) - (` (type: (~@ (common;gen-export-level _ex-lev)) (~ g!protocol-name) (~@ protocol))) - (` (type: (~@ (common;gen-export-level _ex-lev)) (~ g!actor-name) (Actor (~ g!state-name) (~ g!protocol-name)))) - (` (def: (~@ (common;gen-export-level _ex-lev)) (~@ (actor-def-decl decl (` (Behavior (~ g!state-name) (~ g!protocol-name))))) + (wrap (list& (` (type: (~@ (common;gen-export _ex-lev)) (~ g!state-name) (~ state-type))) + (` (type: (~@ (common;gen-export _ex-lev)) (~ g!protocol-name) (~@ protocol))) + (` (type: (~@ (common;gen-export _ex-lev)) (~ g!actor-name) (Actor (~ g!state-name) (~ g!protocol-name)))) + (` (def: (~@ (common;gen-export _ex-lev)) (~@ (actor-def-decl decl (` (Behavior (~ g!state-name) (~ g!protocol-name))))) (~ g!behavior))) g!methods)) ))) |