[racket-dev] prop:match-expander not provided?

From: Stephen Chang (stchang at ccs.neu.edu)
Date: Tue Jan 22 02:14:23 EST 2013

Trying to use prop:match-expander but it doesn't seem to be available:

http://pre.racket-lang.org/docs/html/reference/match.html?q=prop%3Amatch-expander#%28def._%28%28lib._racket%2Fmatch..rkt%29._prop~3amatch-expander%29%29

Welcome to DrRacket, version 5.3.1.3 [3m].
Language: racket [custom].
> (struct A (x y)
  #:property
  prop:match-expander
  (syntax-rules () [(B x y) (A x y)]))
prop:match-expander: undefined;
 cannot reference an identifier before its definition
> (require racket/match)
> (struct A (x y)
  #:property
  prop:match-expander
  (syntax-rules () [(B x y) (A x y)]))
prop:match-expander: undefined;
 cannot reference an identifier before its definition
> (match (A 1 2) [(B x y) (+ x y)])
. match: syntax error in pattern in: (B x y)
>

Is this a bug or am I misusing it?

Posted on the dev mailing list.