Sat Apr 2 02:51:32 UTC 2011 rbrown@common-lisp.net * unifier.lisp: Allow vectors to unify with sequence templates. test/unification-tests.lisp: new test to verify the change diff -rN -u old-cl-unification/ChangeLog new-cl-unification/ChangeLog --- old-cl-unification/ChangeLog 2013-10-17 19:51:16.000000000 +0000 +++ new-cl-unification/ChangeLog 2013-10-17 19:51:17.000000000 +0000 @@ -1,3 +1,8 @@ +2011-02-24 Robert Brown + + * unifier.lisp: Allow vectors to unify with sequence templates. + * test/unification-tests.lisp: new test to verify the change + 2011-02-16 Robert Brown * cl-unification.asd: Add support for asdf:test-system. diff -rN -u old-cl-unification/test/unification-tests.lisp new-cl-unification/test/unification-tests.lisp --- old-cl-unification/test/unification-tests.lisp 2013-10-17 19:51:16.000000000 +0000 +++ new-cl-unification/test/unification-tests.lisp 2013-10-17 19:51:16.000000000 +0000 @@ -102,6 +102,8 @@ (test t (unify:environment-p (unify #C(0 1) #T(complex #C(0 1))))) (test '(42 T) (v? '?x (unify #T(number ?x) 42)) :multiple-values t) + (test '(42 T) (v? '?x (unify #(0 1 42 3 4 5) #T(sequence 0 1 ?x 3 4 5))) + :multiple-values t) (test-error (unify 42 #T(float 42.0)) :condition-type 'unification-failure diff -rN -u old-cl-unification/unifier.lisp new-cl-unification/unifier.lisp --- old-cl-unification/unifier.lisp 2013-10-17 19:51:16.000000000 +0000 +++ new-cl-unification/unifier.lisp 2013-10-17 19:51:17.000000000 +0000 @@ -476,7 +476,7 @@ :format-arguments (list a b))) -(defmethod unify ((a vector) (b vector-template) +(defmethod unify ((a vector) (b sequence-template) &optional (env (make-empty-environment)) &key &allow-other-keys) (let ((template-lambda-list (sequence-template-lambda-list b))