diff --git a/racket/collects/syntax/parse/private/minimatch.rkt b/racket/collects/syntax/parse/private/minimatch.rkt index e35321bec6..2a1f01f82f 100644 --- a/racket/collects/syntax/parse/private/minimatch.rkt +++ b/racket/collects/syntax/parse/private/minimatch.rkt @@ -1,6 +1,18 @@ #lang racket/base (require (for-syntax racket/base racket/struct-info)) -(provide match ?) +(provide match match-lambda ?) + +(define-syntax (match-lambda stx) + (syntax-case stx () + [(match-lambda clause ...) + #`(lambda (x) + (match-c x + clause ... + [_ (error 'minimatch-lambda "match at ~s:~s:~s failed: ~e" + '#,(syntax-source stx) + '#,(syntax-line stx) + '#,(syntax-column stx) + x)]))])) (define-syntax (match stx) (syntax-case stx ()