diff --git a/csys/environ.lisp b/csys/environ.lisp index ade31ac..6cbc0f0 100644 --- a/csys/environ.lisp +++ b/csys/environ.lisp @@ -9,7 +9,7 @@ (:shape :scopes/shape) (:util :scopes/util)) (:export #:*env* - #:create #:simple-proc + #:create #:simple-setup #:simple-proc #:actions #:send-value #:send-connect)) @@ -27,12 +27,18 @@ (create-contact-cells eff-contacts env (cells scope)) env)) +(defun simple-setup (cfg) + (destructuring-bind (prg &key (zero-cat :c00) eff-contacts) cfg + (let ((env (create #'simple-proc (csys:printer) :eff-contacts eff-contacts))) + (csys:create-zero prg env :categ (list :csys zero-cat)) + env))) + (defun simple-proc (msg scope) (util:mv-bind (nmsg (scope scope)) (csys:handle-action msg scope :actions (actions)) (util:lgi msg nmsg) (when nmsg - (actor:send (env scope) nmsg)))) + (actor:send (csys:environ scope) nmsg)))) ;;;; eff contact cells