diff options
Diffstat (limited to 'stdlib/source/lux/control/concurrency/actor.lux')
-rw-r--r-- | stdlib/source/lux/control/concurrency/actor.lux | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/stdlib/source/lux/control/concurrency/actor.lux b/stdlib/source/lux/control/concurrency/actor.lux index f4d63c00f..9e17193b2 100644 --- a/stdlib/source/lux/control/concurrency/actor.lux +++ b/stdlib/source/lux/control/concurrency/actor.lux @@ -9,7 +9,7 @@ ["." exception (#+ exception:)] ["." io (#+ IO io)] ["<>" parser - ["<c>" code (#+ Parser)]]] + ["<.>" code (#+ Parser)]]] [data ["." product] [text @@ -213,8 +213,8 @@ (def: actor_decl^ (Parser [Text (List Text)]) - (<>.either (<c>.form (<>.and <c>.local_identifier (<>.some <c>.local_identifier))) - (<>.and <c>.local_identifier (\ <>.monad wrap (list))))) + (<>.either (<code>.form (<>.and <code>.local_identifier (<>.some <code>.local_identifier))) + (<>.and <code>.local_identifier (\ <>.monad wrap (list))))) (type: On_MailC [[Text Text Text] Code]) @@ -224,15 +224,15 @@ (def: argument (Parser Text) - <c>.local_identifier) + <code>.local_identifier) (def: behavior^ (Parser BehaviorC) (let [on_mail_args ($_ <>.and ..argument ..argument ..argument)] ($_ <>.and - (<>.maybe (<c>.form (<>.and (<c>.form (<>.after (<c>.this! (' on_mail)) on_mail_args)) - <c>.any))) - (<>.some <c>.any)))) + (<>.maybe (<code>.form (<>.and (<code>.form (<>.after (<code>.this! (' on_mail)) on_mail_args)) + <code>.any))) + (<>.some <code>.any)))) (def: (on_mail g!_ ?on_mail) (-> Code (Maybe On_MailC) Code) @@ -295,7 +295,7 @@ (~+ messages)))))))) - (syntax: #export (actor {[state_type init] (<c>.record (<>.and <c>.any <c>.any))} + (syntax: #export (actor {[state_type init] (<code>.record (<>.and <code>.any <code>.any))} {[?on_mail messages] behavior^}) (with_gensyms [g!_] (wrap (list (` (: ((~! io.IO) (..Actor (~ state_type))) @@ -315,18 +315,18 @@ (def: signature^ (Parser Signature) - (<c>.form ($_ <>.and - (<>.default (list) (<c>.tuple (<>.some <c>.local_identifier))) - <c>.local_identifier - (<>.some |input|.parser) - <c>.local_identifier - <c>.local_identifier - <c>.any))) + (<code>.form ($_ <>.and + (<>.default (list) (<code>.tuple (<>.some <code>.local_identifier))) + <code>.local_identifier + (<>.some |input|.parser) + <code>.local_identifier + <code>.local_identifier + <code>.any))) (def: reference^ (Parser [Name (List Text)]) - (<>.either (<c>.form (<>.and <c>.identifier (<>.some <c>.local_identifier))) - (<>.and <c>.identifier (\ <>.monad wrap (list))))) + (<>.either (<code>.form (<>.and <code>.identifier (<>.some <code>.local_identifier))) + (<>.and <code>.identifier (\ <>.monad wrap (list))))) (syntax: #export (message: {export |export|.parser} @@ -357,13 +357,13 @@ (..Message (~ (get@ #abstract.abstraction actor_scope)) (~ (get@ #output signature))))) (function ((~ g!_) (~ g!state) (~ g!self)) - (let [(~ g!state) (:coerce (~ (get@ #abstract.representation actor_scope)) - (~ g!state))] + (let [(~ g!state) (:as (~ (get@ #abstract.representation actor_scope)) + (~ g!state))] (|> (~ body) (: ((~! promise.Promise) ((~! try.Try) [(~ (get@ #abstract.representation actor_scope)) (~ (get@ #output signature))]))) - (:coerce ((~! promise.Promise) ((~! try.Try) [(~ (get@ #abstract.abstraction actor_scope)) - (~ (get@ #output signature))])))))))) + (:as ((~! promise.Promise) ((~! try.Try) [(~ (get@ #abstract.abstraction actor_scope)) + (~ (get@ #output signature))])))))))) )))))) (type: #export Stop |