From 2bc070a60333e1316ff713f9b9b577a7c27e54b3 Mon Sep 17 00:00:00 2001 From: Greg Hendershott Date: Thu, 24 May 2018 21:46:57 -0400 Subject: [PATCH] Accomodate new error message in Racket 7; fixes #219 --- frog/config/main.rkt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frog/config/main.rkt b/frog/config/main.rkt index a870dd23..21bb06c0 100644 --- a/frog/config/main.rkt +++ b/frog/config/main.rkt @@ -40,11 +40,16 @@ (match (exn:fail:syntax-exprs exn) [(cons stx _) (syntax-e stx)] [_ #f])) + (define (provided-identifier-message? e) + (define msg (exn-message e)) + (define rxs '(#rx"provided identifier not defined or imported" ;v6 + #rx"provided identifier is not defined or required")) ;v7 + (for/or ([rx (in-list rxs)]) + (regexp-match? rx msg))) (with-handlers ([(λ (e) (and (exn:fail:syntax? e) - (regexp-match? #rx"provided identifier not defined or imported" - (exn-message e)) + (provided-identifier-message? e) (memq (fail-sym e) provide-syms))) (λ (e) (raise-syntax-error