[plt-dev] define-match-expander <-> unlib.plt doesn't compile
John Clements wrote:
> Dave Gurnell wrote:
>> I've uploaded Unlib 3.19 containing a fix for the match problem.
> Awesome fixed now thanks all.
Hi all,
I haven't managed to fix this in its entirety and I'm not sure how to
go about it correctly.
The eq? match expander now looks like this:
; (_ expr pattern ...)
(define-match-expander match:eq?
(lambda (stx)
(syntax-case stx ()
[(_ expr pattern ...)
#'(? (cut eq? <> expr) pattern ...)]))
(lambda (stx)
(syntax-case stx ()
[_ #'eq?])))
However, the second transformer procedure only works if eq? is in
application position. Looking at the docs, I assume I want to use make-
rename-transformer in some way but I can't work out how in this context.
Can anyone offer any pointers?
Many thanks,
-- Dave