X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=clnl;a=blobdiff_plain;f=src%2Fmain%2Fmain.lisp;h=5d8856e3522c9eec429a58b1d38f3c3963262919;hp=35a5961d399ec88c0753bccc207756201d0c2313;hb=f011c77;hpb=bc6386a709da76fef1393a11a7251b4be7032fda diff --git a/src/main/main.lisp b/src/main/main.lisp index 35a5961..5d8856e 100644 --- a/src/main/main.lisp +++ b/src/main/main.lisp @@ -115,14 +115,15 @@ DESCRIPTION: (defun create-proc-body (proc prims) `(,(intern (string-upcase (car proc)) *model-package*) () - ,@(cdr ; remove the progn, cuz it looks nicer - (clnl-transpiler:transpile (cadr proc) - (mapcar - (lambda (prim) - (if (getf prim :macro) ; The reason we do this is because with macros, we want to evaluate them in - ; this scope while preserving them for the generational purposes below - (append (list :macro (eval (getf prim :macro))) prim) - prim)) prims))))) + (clnl-nvm:with-stop-handler + ,@(cdr ; remove the progn, cuz it looks nicer + (clnl-transpiler:transpile (cadr proc) + (mapcar + (lambda (prim) + (if (getf prim :macro) ; The reason we do this is because with macros, we want to evaluate them in + ; this scope while preserving them for the generational purposes below + (append (list :macro (eval (getf prim :macro))) prim) + prim)) prims)))))) (defun model->single-form-lisp (model &key (seed 15) initialize-interface netlogo-callback) (multiple-value-bind