Update of /project/cl-unification/cvsroot/cl-unification In directory common-lisp.net:/tmp/cvs-serv24008
Modified Files: templates-hierarchy.lisp Log Message: Fixed bugs in COLLECT-TEMPLATE-VARS for NUMBER-TEMPLATEs. If a variable was present, then the method was not returning a list. The treatment of constants like PI was also incorrect, as the numeric value was returned. Retunrning () seems the right thing to do instead.
Date: Wed Apr 27 22:44:25 2005 Author: mantoniotti
Index: cl-unification/templates-hierarchy.lisp diff -u cl-unification/templates-hierarchy.lisp:1.1.1.1 cl-unification/templates-hierarchy.lisp:1.2 --- cl-unification/templates-hierarchy.lisp:1.1.1.1 Wed Nov 17 23:19:54 2004 +++ cl-unification/templates-hierarchy.lisp Wed Apr 27 22:44:25 2005 @@ -485,10 +485,13 @@ (let ((template (number-template-number template))) (etypecase template (number ()) - (symbol (cond ((variablep template) template) + (symbol (cond ((and (variablep template) (not (variable-any-p template))) + (list template)) ((and (boundp template) (numberp (symbol-value template))) - (symbol-value template)) + ;; This handles cases like #T(number pi) + ;; It may be too broad, but for the time being it seems ok. + nil) (t (error "Invalid number template ~S." template)))))))
cl-unification-cvs@common-lisp.net