From aeaf018d01b6dab29f48a47eeaea3157a3771597 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Sat, 4 Jan 2014 17:55:40 -0500 Subject: [PATCH] Provide and document `match-expander?` and `legacy-match-expander?`. --- .../racket-doc/scribblings/reference/match.scrbl | 7 +++++++ racket/collects/racket/match/match.rkt | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/racket-pkgs/racket-doc/scribblings/reference/match.scrbl b/pkgs/racket-pkgs/racket-doc/scribblings/reference/match.scrbl index fe1117106e..c2a4c6a2b1 100644 --- a/pkgs/racket-pkgs/racket-doc/scribblings/reference/match.scrbl +++ b/pkgs/racket-pkgs/racket-doc/scribblings/reference/match.scrbl @@ -630,6 +630,13 @@ Like @racket[prop:match-expander], but for the legacy match syntax. This binding is provided @racket[for-syntax]. } +@deftogether[[ +@defproc[(match-expander? [v any/c]) boolean?] +@defproc[(legacy-match-expander? [v any/c]) boolean?]]]{ +Predicates for values which implement the appropriate match expander +properties. +} + @defparam[match-equality-test comp-proc (any/c any/c . -> . any)]{ diff --git a/racket/collects/racket/match/match.rkt b/racket/collects/racket/match/match.rkt index d547ece8a2..fb82e2d2d4 100644 --- a/racket/collects/racket/match/match.rkt +++ b/racket/collects/racket/match/match.rkt @@ -10,13 +10,15 @@ (for-syntax racket/lazy-require (only-in "stxtime.rkt" match-...-nesting + match-expander? + legacy-match-expander? prop:match-expander prop:legacy-match-expander))) (begin-for-syntax (lazy-require [racket/match/parse (parse)])) -(provide (for-syntax match-...-nesting +(provide (for-syntax match-...-nesting match-expander? legacy-match-expander? prop:match-expander prop:legacy-match-expander) match-equality-test define-match-expander