Thanks Ivan
I will apply the patches as soon as I get a regular Internet connection. Meanwhile I will forward the message to the mailing list so that other people may patch accordingly.
Cheers
Marco
On Aug 17, 2007, at 6:03 AM, Ivan Boldyrev wrote:
Dear Marco!
I tried your UNIFICATION package and liked it very much. However, you didn't fix MATCH-CASE completely: when :errorp t, incorrect code is generated because (rest otherwise-clause) is used even if otherwise-clause is (error ...). See the patch:
--- cl-unification/match-block.lisp~ 2007-05-21 19:33:07.000000000 +0700 +++ cl-unification/match-block.lisp 2007-08-17 16:58:14.000000000 +0700 @@ -181,14 +181,14 @@ clauses)) (otherwise-clause (if otherwise-clause-present-p
(first (last clauses))
(rest (first (last clauses))) (when errorp
`(error 'unification-non-exhaustive
:format-control "Non exhaustive
matching."))))
`((error 'unification-non-exhaustive
:format-control "Non exhaustive
matching."))))) ) (labels ((generate-matchers (clauses) (if (null clauses)
`(progn ,@(rest otherwise-clause))
(destructuring-bind (pattern &rest body) (car clauses) `(handler-case (match (,pattern ,object-var)`(progn ,@otherwise-clause)
-- Ivan Boldyrev
Today is the FIRST day of the REST of your
life.
-- Marco Antoniotti, Associate Professor DISCo, Università Milano Bicocca Via Bicocca degli Arcimboldi 8, U7, 4 piano I-20126 Milan (MI) ITALY
Please note that I am not checking my Spam-box anymore.