[plt-dev] define-match-expander <-> unlib.plt doesn't compile

From: John Clements (clements at brinckerhoff.org)
Date: Thu Nov 12 13:46:29 EST 2009

Unlib.plt doesn't compile, as you (Sam) reported several weeks ago. I  
tried to fix the problem, and started wondering whether the underlying  
problem was whether 'define-match-expander' was working incorrectly.   
For instance, what should this program produce?

foo.ss:

#lang scheme

(define-match-expander my-cons
   (error 'dontcare "aagh!")
   cons)

(provide (rename-out [my-cons cons]))

bar.ss:

#lang scheme

(require "foo.ss")

(cons 3 4)

Reading the docs, it looks like it should produce the pair containing  
3 and 4, but it actually signals the error. It appears to me that the  
untyped folks are (mis?)reading the docs in the same way I am.

Am I wrong, or is define-match-expander broken, or is something else  
going on?

Thanks,

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20091112/c90d70b9/attachment.p7s>

Posted on the dev mailing list.