Tue Mar 29 22:59:37 UTC 2011 mantoniotti@common-lisp.net * Added debugging functions DUMP-FRAME and DUMP-ENVIRONMENT. diff -rN -u old-cl-unification/substitutions.lisp new-cl-unification/substitutions.lisp --- old-cl-unification/substitutions.lisp 2015-12-09 07:07:32.000000000 +0000 +++ new-cl-unification/substitutions.lisp 2015-12-09 07:07:32.000000000 +0000 @@ -187,6 +187,18 @@ (mapcan #'frame-values (environment-frames env))) +;;;--------------------------------------------------------------------------- +;;; Simple debugging. +(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))) ;;;; end of file -- substitutions.lisp --