Fri Jan 15 07:59:02 UTC 2010 pix@kepibu.org * Make MATCHING agree with MATCH[F][-CASE] about the conditions of failure Rather than skipping to the next clause on any error, UNIFICATION-FAILUREs--and /only/ UNIFICATION-FAILUREs--skip to the next clause. diff -rN -u old-cl-unification/match-block.lisp new-cl-unification/match-block.lisp --- old-cl-unification/match-block.lisp 2016-02-07 12:11:17.000000000 +0000 +++ new-cl-unification/match-block.lisp 2016-02-07 12:11:17.000000000 +0000 @@ -167,7 +167,7 @@ (let ((template (%template-for-match template)) ) `((setf ,clause-var - (unify* ,template ,object ,substitution)) + (unify** ,template ,object ,substitution)) ,(%wrap-var-bindings template clause-var forms)) )) diff -rN -u old-cl-unification/unifier.lisp new-cl-unification/unifier.lisp --- old-cl-unification/unifier.lisp 2016-02-07 12:11:17.000000000 +0000 +++ new-cl-unification/unifier.lisp 2016-02-07 12:11:17.000000000 +0000 @@ -859,6 +859,11 @@ (defun unify* (a b &optional (env (make-empty-environment))) (ignore-errors (unify a b env))) +(defun unify** (a b &optional (env (make-empty-environment))) + (handler-case + (unify a b env) + (unification-failure (c) (values nil c)))) + (defun unify-equations (eqns &optional (env (make-empty-environment))) (loop for (a b) in eqns