aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/concurrency/actor.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/concurrency/actor.lux')
-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 ""))))))))
))
)))