From 2fa1b033eb66a985dae41b164a187ba64aff8424 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 3 Jun 2021 16:07:25 +0200 Subject: [PATCH] Use :template in send!. --- syndicate/go.rkt | 3 +-- syndicate/syntax.rkt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/syndicate/go.rkt b/syndicate/go.rkt index a5f672f..4db2410 100644 --- a/syndicate/go.rkt +++ b/syndicate/go.rkt @@ -33,8 +33,7 @@ (action (ds) (spawn (define root-facet this-facet) (at ds - (when (asserted (BoxState $value)) - (send! ds (SetBox->preserves (SetBox (+ value 1))))) + (when (asserted (BoxState $value)) (send! ds (SetBox (+ value 1)))) (during (BoxState _) (on-stop (log-info "Client detected box termination") (stop-facet root-facet))))))) diff --git a/syndicate/syntax.rkt b/syndicate/syntax.rkt index bb46454..bf5dc33 100644 --- a/syndicate/syntax.rkt +++ b/syndicate/syntax.rkt @@ -95,7 +95,7 @@ (turn-sync! this-turn peer (action (_reply) expr ...))) (define-syntax-rule (send! peer assertion) - (turn-message! this-turn peer assertion)) + (turn-message! this-turn peer (:template assertion))) (define-syntax-rule (spawn setup-expr ...) (turn-spawn! this-turn (action () setup-expr ...)))