Fixed compatibility with Racket 6.7
This commit is contained in:
parent
85e4f1412a
commit
ee8e7dd7cc
|
@ -21,8 +21,9 @@
|
||||||
(Syntaxof Any)
|
(Syntaxof Any)
|
||||||
(Syntaxof A)))]
|
(Syntaxof A)))]
|
||||||
;; Backported from 6.8 so that it works on 6.7
|
;; Backported from 6.8 so that it works on 6.7
|
||||||
[[vector->list vectortop->list]
|
[vector->list
|
||||||
(→ VectorTop (Listof Any))])
|
(∀ (A) (case→ (→ (Vectorof A) (Listof A))
|
||||||
|
(→ VectorTop (Listof Any))))])
|
||||||
|
|
||||||
(define-syntax-rule (unsafe-cast v t)
|
(define-syntax-rule (unsafe-cast v t)
|
||||||
((inst unsafe-cast-function t) v))
|
((inst unsafe-cast-function t) v))
|
||||||
|
@ -94,8 +95,7 @@
|
||||||
[else
|
[else
|
||||||
(values (cons car* cdr*) 'modified)]))]
|
(values (cons car* cdr*) 'modified)]))]
|
||||||
[(vector? e) (match-let ([(cons vs* status)
|
[(vector? e) (match-let ([(cons vs* status)
|
||||||
(try-listof-any->isexp* (vectortop->list e)
|
(try-listof-any->isexp* (vector->list e) non-sexp)])
|
||||||
non-sexp)])
|
|
||||||
(case status
|
(case status
|
||||||
[(unmodified)
|
[(unmodified)
|
||||||
(if (immutable? e)
|
(if (immutable? e)
|
||||||
|
|
|
@ -4,14 +4,6 @@
|
||||||
typed/racket/unsafe
|
typed/racket/unsafe
|
||||||
"typed-prefab-declarations.rkt")
|
"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
|
(provide ISyntaxOf
|
||||||
ISyntaxOf-E
|
ISyntaxOf-E
|
||||||
ISyntax
|
ISyntax
|
||||||
|
@ -27,6 +19,18 @@
|
||||||
isyntax?
|
isyntax?
|
||||||
isyntax-e?)
|
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
|
(unsafe-require/typed racket/function
|
||||||
[[identity unsafe-cast-function] (∀ (A) (→ Any A))])
|
[[identity unsafe-cast-function] (∀ (A) (→ Any A))])
|
||||||
(define-syntax-rule (unsafe-cast v t)
|
(define-syntax-rule (unsafe-cast v t)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user