From ee8e7dd7cc01151819c035ea526e271b68044461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Thu, 12 Jan 2017 19:51:20 +0100 Subject: [PATCH] Fixed compatibility with Racket 6.7 --- typed-syntax/typed-syntax-convert.rkt | 8 ++++---- typed-syntax/typed-syntax-convert2.rkt | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/typed-syntax/typed-syntax-convert.rkt b/typed-syntax/typed-syntax-convert.rkt index ac27f25..559ad49 100644 --- a/typed-syntax/typed-syntax-convert.rkt +++ b/typed-syntax/typed-syntax-convert.rkt @@ -21,8 +21,9 @@ (Syntaxof Any) (Syntaxof A)))] ;; Backported from 6.8 so that it works on 6.7 - [[vector->list vectortop->list] - (→ VectorTop (Listof Any))]) + [vector->list + (∀ (A) (case→ (→ (Vectorof A) (Listof A)) + (→ VectorTop (Listof Any))))]) (define-syntax-rule (unsafe-cast v t) ((inst unsafe-cast-function t) v)) @@ -94,8 +95,7 @@ [else (values (cons car* cdr*) 'modified)]))] [(vector? e) (match-let ([(cons vs* status) - (try-listof-any->isexp* (vectortop->list e) - non-sexp)]) + (try-listof-any->isexp* (vector->list e) non-sexp)]) (case status [(unmodified) (if (immutable? e) diff --git a/typed-syntax/typed-syntax-convert2.rkt b/typed-syntax/typed-syntax-convert2.rkt index 9568fb8..58f25b4 100644 --- a/typed-syntax/typed-syntax-convert2.rkt +++ b/typed-syntax/typed-syntax-convert2.rkt @@ -4,14 +4,6 @@ typed/racket/unsafe "typed-prefab-declarations.rkt") -(unsafe-require/typed racket/base - [[datum->syntax datum->syntax*] - (∀ (A) (→ (Syntaxof Any) - A - (Syntaxof Any) - (Syntaxof Any) - (Syntaxof A)))]) - (provide ISyntaxOf ISyntaxOf-E ISyntax @@ -27,6 +19,18 @@ isyntax? isyntax-e?) +(unsafe-require/typed racket/base + [[datum->syntax datum->syntax*] + (∀ (A) (→ (Syntaxof Any) + A + (Syntaxof Any) + (Syntaxof Any) + (Syntaxof A)))] + ;; Backported from 6.8 so that it works on 6.7 + [vector->list + (∀ (A) (case→ (→ (Vectorof A) (Listof A)) + (→ VectorTop (Listof Any))))]) + (unsafe-require/typed racket/function [[identity unsafe-cast-function] (∀ (A) (→ Any A))]) (define-syntax-rule (unsafe-cast v t)