[plt-scheme] Re: match-let bug or feature?

From: Derick Eddington (derick.eddington at gmail.com)
Date: Sat Jan 5 01:33:43 EST 2008

I think a more clear example of the problem is:

> (match-let ([(a b) (list 1 2)]
              [(b a) (list 8 9)])
    (+ a b))
match: no matching clause for ((1 2) (8 9))

 === context ===
/home/d/plt/collects/mzlib/private/match/match-error.ss:9:4: match:error

Because the patterns (a b) and (b a) get concatenated by the match-let
macro into ((a b) (b a)) and the values get concatenated into 
((1 2) (8 9)), and because of match's match-equality-test duplicate
variable names feature, match is trying to match the second (b a)
according to what (a b) first matched, and thus the error.

: Derick

Posted on the users mailing list.