From a3dfb2c5aaa45eaec797778f439f34a2a4aacb19 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 22 Apr 2018 21:03:01 +0100 Subject: [PATCH] Notice attempts to install more than one root facet in an actor --- syndicate/dataspace.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/syndicate/dataspace.rkt b/syndicate/dataspace.rkt index 8e2420e..f1d5f88 100644 --- a/syndicate/dataspace.rkt +++ b/syndicate/dataspace.rkt @@ -365,7 +365,13 @@ (seteq))) (if parent (set-facet-children! parent (set-add (facet-children parent) f)) - (set-actor-root-facet! actor f)) + (begin + (when (actor-root-facet actor) + ;; TODO: consider whether this is legit. For example, (stop-facet the-root-facet + ;; (react ...) (react ...)) should probably be admissible, so perhaps more than one + ;; root facet should be allowed? + (error 'add-facet! "INTERNAL ERROR: Attempt to add second root facet")) + (set-actor-root-facet! actor f))) (with-current-facet [ds actor f #f] (boot-proc)) (push-script! ds actor (lambda ()