From marcoxa at cs.nyu.edu Mon Aug 20 15:10:21 2007 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Mon, 20 Aug 2007 11:10:21 -0400 Subject: [cl-unification-devel] Re: Two UNIFICATION patches In-Reply-To: <2gy7gav5pd.fsf@ibhome.cgitftp.uiggm.nsc.ru> References: <2gy7gav5pd.fsf@ibhome.cgitftp.uiggm.nsc.ru> Message-ID: <59E2E1F8-B672-48D6-AAF3-0804B798CB72@cs.nyu.edu> 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)) > + `(progn , at otherwise-clause) > (destructuring-bind (pattern &rest body) > (car clauses) > `(handler-case (match (,pattern ,object-var) > > -- > 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.