From b0488a8a1d2d8feec729185dc8172a8df6949c09 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sat, 8 Aug 2026 19:36:38 +0200 Subject: [PATCH] csys/environ: add simple-setup function for interactive tests --- csys/environ.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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