[racket-dev] prop:match-expander not provided?
It seems to be exported at phase 1:
Welcome to Racket v5.3.2.2.
> (begin-for-syntax prop:match-expander)
>
I'll fix the docs.
At Tue, 22 Jan 2013 02:14:23 -0500, Stephen Chang wrote:
> 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-expande
> r#%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?
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev