From c459bff32b0a1bef0baf18ac679ff75ada898c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 9 Apr 2018 00:45:41 +0200 Subject: [PATCH] Attempt to fix a compatibility issue wuth racket 7 The private identifier -attribute-mapping-syntax? does not exist in the new version of syntax/parse --- info.rkt | 3 ++- untyped-only/syntax-parse.rkt | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/info.rkt b/info.rkt index 87a60ee..9302a1e 100644 --- a/info.rkt +++ b/info.rkt @@ -7,7 +7,8 @@ "typed-racket-more" "reprovide-lang" "type-expander" - "hyper-literate")) + "hyper-literate" + "version-case")) (define build-deps '("scribble-lib" "racket-doc" "typed-racket-doc" diff --git a/untyped-only/syntax-parse.rkt b/untyped-only/syntax-parse.rkt index 253b6d4..75b6aee 100644 --- a/untyped-only/syntax-parse.rkt +++ b/untyped-only/syntax-parse.rkt @@ -5,7 +5,17 @@ racket/contract racket/syntax) syntax/parse - (prefix-in - syntax/parse/private/residual)) + version-case) + +(version-case + [(version< (version) "6.90.0.24") + (require (prefix-in - syntax/parse/private/residual))] + [else + (require (prefix-in - racket/private/template)) + (define-for-syntax (-attribute-mapping-syntax? x) + ;; attribute-mapping-check is actually false when attribute-mapping-syntax? + ;; would have been true (thanks rmculpepper !) + (not (-attribute-mapping-check x)))]) (provide attribute* (for-syntax attribute-info)