www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit ee8e7dd7cc01151819c035ea526e271b68044461
parent 85e4f1412af08bc28a5dc831b822017cfce50b6e
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Thu, 12 Jan 2017 19:51:20 +0100

Fixed compatibility with Racket 6.7

Diffstat:
Mtyped-syntax/typed-syntax-convert.rkt | 8++++----
Mtyped-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 @@ -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 @@ -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)