diff --git a/syndicate/go.rkt b/syndicate/go.rkt index 8f96205..a5f672f 100644 --- a/syndicate/go.rkt +++ b/syndicate/go.rkt @@ -32,30 +32,12 @@ (define client (action (ds) (spawn (define root-facet this-facet) - (define count 0) (at ds (when (asserted (BoxState $value)) (send! ds (SetBox->preserves (SetBox (+ value 1))))) - ;; (during (BoxState _) - ;; (on-start (set! count (+ count 1))) - ;; (on-stop (set! count (- count 1)) - ;; (when (zero? count) - ;; (log-info "Client detected box termination") - ;; (stop-facet root-facet)))) - (assert (Observe (:pattern (BoxState _)) - (ref (entity #:assert - (action (_v _h) - (set! count (+ count 1))) - #:retract - (action (_h) - (set! count (- count 1)) - (when (zero? count) - (log-info "Client detected box termination") - (stop-facet root-facet))))))) - ;; (during (BoxState _) - ;; (on-stop (log-info "Client detected box termination") - ;; (stop-facet root-facet))) - )))) + (during (BoxState _) + (on-stop (log-info "Client detected box termination") + (stop-facet root-facet))))))) (module+ main (time diff --git a/syndicate/syntax.rkt b/syndicate/syntax.rkt index 10110e3..bb46454 100644 --- a/syndicate/syntax.rkt +++ b/syndicate/syntax.rkt @@ -166,7 +166,7 @@ (ref (let ((assertion-map (make-hash))) (entity #:assert (action (bindings handle) - (match-define (list #,(analyse-pattern-bindings #'pat)) bindings) + (match-define (list #,@(analyse-pattern-bindings #'pat)) bindings) (let ((facet (react (facet-prevent-inert-check! this-facet) expr ...)))