aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/concurrency/actor.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-12-02 13:55:48 -0400
committerEduardo Julian2017-12-02 13:55:48 -0400
commit5c4a26c9344898c4fa958946b47b55e1c84818bd (patch)
treefe599294cc3d08ca1995a7cd58a51baa18689944 /stdlib/source/lux/concurrency/actor.lux
parent1651d847ba70ee36171f3809a25bece325fd5715 (diff)
- "gensym" went back to producing Code, instead of Ident.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/concurrency/actor.lux44
1 files changed, 22 insertions, 22 deletions
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux
index 694234d17..b326d0028 100644
--- a/stdlib/source/lux/concurrency/actor.lux
+++ b/stdlib/source/lux/concurrency/actor.lux
@@ -262,10 +262,10 @@
(do P.Monad<Promise>
[]
(~ bodyC))))))}))
- (` (def: (~+ (csw.export export)) ((~ g!new) (~@ g!init))
+ (` (def: (~+ (csw.export export)) ((~ g!new) (~ g!init))
(All [(~+ g!vars)]
(-> ((~ g!type) (~+ g!vars)) (io.IO ((~ g!actor) (~+ g!vars)))))
- (..spawn (~ g!behavior) (~@ g!init))))))
+ (..spawn (~ g!behavior) (~ g!init))))))
)))
(type: Signature
@@ -342,27 +342,27 @@
(with-message actor-name)
csw.annotations))
(All [(~+ g!all-vars)] (-> (~+ g!inputsT) (~ actorC) (T.Task (~ (get@ #output signature)))))
- (let [(~@ g!task) (T.task (~ g!outputT))]
+ (let [(~ g!task) (T.task (~ g!outputT))]
(io.run (do io.Monad<IO>
- [(~@ g!sent?) (..send (function [(~ g!state) (~ g!self)]
- (do P.Monad<Promise>
- [(~@ g!return) (: (T.Task [((~ g!type) (~+ g!actor-refs))
- (~ g!outputT)])
- (do T.Monad<Task>
- []
- (~ body)))]
- (case (~@ g!return)
- (#.Right [(~ g!state) (~@ g!return)])
- (exec (io.run (P.resolve (#.Right (~@ g!return)) (~@ g!task)))
- (T.return (~ g!state)))
-
- (#.Left (~@ g!error))
- (exec (io.run (P.resolve (#.Left (~@ g!error)) (~@ g!task)))
- (T.fail (~@ g!error))))
- ))
- (~ g!self))]
- (if (~@ g!sent?)
- ((~' wrap) (~@ g!task))
+ [(~ g!sent?) (..send (function [(~ g!state) (~ g!self)]
+ (do P.Monad<Promise>
+ [(~ g!return) (: (T.Task [((~ g!type) (~+ g!actor-refs))
+ (~ g!outputT)])
+ (do T.Monad<Task>
+ []
+ (~ body)))]
+ (case (~ g!return)
+ (#.Right [(~ g!state) (~ g!return)])
+ (exec (io.run (P.resolve (#.Right (~ g!return)) (~ g!task)))
+ (T.return (~ g!state)))
+
+ (#.Left (~ g!error))
+ (exec (io.run (P.resolve (#.Left (~ g!error)) (~ g!task)))
+ (T.fail (~ g!error))))
+ ))
+ (~ g!self))]
+ (if (~ g!sent?)
+ ((~' wrap) (~ g!task))
((~' wrap) (T.throw ..Dead ""))))))))
))
)))