Added debugging functions DUMP-FRAME and DUMP-ENVIRONMENT.
Tue Mar 29 22:59:37 UTC 2011 mantoniotti@common-lisp.net
* Added debugging functions DUMP-FRAME and DUMP-ENVIRONMENT.
hunk ./substitutions.lisp 190
+;;;---------------------------------------------------------------------------
+;;; Simple debugging.
hunk ./substitutions.lisp 193
+(defun dump-frame (f &optional (out *standard-output*))
+ (declare (type frame f))
+ (terpri out)
+ (loop for (var . value) in (frame-bindings f)
+ do (format out "~A~VT= ~A~%" var 8 value))
+ )
+
+(defun dump-environment (env &optional (out *standard-output*))
+ (declare (type environment env))
+ (map nil #'(lambda (f) (dump-frame f out)) (environment-frames env)))