Fixed problem with typed/untyped stx-cons.
This commit is contained in:
parent
1619bfb0ef
commit
d49160b6ea
|
@ -1015,30 +1015,29 @@
|
||||||
(stx-cdr l2)
|
(stx-cdr l2)
|
||||||
(stx-cdr l3)))]))
|
(stx-cdr l3)))]))
|
||||||
|
|
||||||
|
;; stx-cons
|
||||||
|
|
||||||
(module m-stx-untyped racket
|
(module m-stx-untyped racket
|
||||||
(require syntax/stx)
|
(require syntax/stx)
|
||||||
(provide stx-cons #;stx-drop-last)
|
(provide stx-cons #;stx-drop-last)
|
||||||
|
|
||||||
;(: stx-cons (∀ (A B) (→ A B (Syntaxof (Pairof A B)))))
|
(define (stx-cons a b) #`(#,a . #,b)))
|
||||||
(define (stx-cons a b) #`(#,a . #,b))
|
|
||||||
|
|
||||||
;(: stx-drop-last (∀ (A) (→ (Syntaxof (Listof A)) (Syntaxof (Listof A)))))
|
(typed/untyped-prefix
|
||||||
#;(define (stx-drop-last l)
|
[module m-stx-typed typed/racket
|
||||||
(if (and (stx-pair? l) (stx-pair? (stx-cdr l)))
|
(require (only-in typed/racket/unsafe unsafe-require/typed))
|
||||||
(stx-cons (stx-car l) (stx-drop-last (stx-cdr l)))
|
|
||||||
#'())))
|
|
||||||
|
|
||||||
;; stx-cons
|
|
||||||
|
|
||||||
(module m-stx-typed typed/racket
|
|
||||||
(require typed/racket/unsafe)
|
|
||||||
(unsafe-require/typed (submod ".." m-stx-untyped)
|
(unsafe-require/typed (submod ".." m-stx-untyped)
|
||||||
[stx-cons (∀ (A B)
|
[stx-cons (∀ (A B)
|
||||||
(→ (Syntaxof A)
|
(→ (Syntaxof A)
|
||||||
(Syntaxof B)
|
(Syntaxof B)
|
||||||
(Syntaxof (Pairof (Syntaxof A)
|
(Syntaxof (Pairof (Syntaxof A)
|
||||||
(Syntaxof B)))))])
|
(Syntaxof B)))))])
|
||||||
(provide stx-cons))
|
(provide stx-cons)]
|
||||||
|
[module m-stx-typed typed/racket/no-check
|
||||||
|
(require (submod ".." m-stx-untyped))
|
||||||
|
(provide stx-cons)])
|
||||||
|
|
||||||
|
(require/provide 'm-stx-typed)
|
||||||
|
|
||||||
(module+ test
|
(module+ test
|
||||||
(require ;(submod "..")
|
(require ;(submod "..")
|
||||||
|
@ -1057,8 +1056,6 @@
|
||||||
(Syntaxof 2)))))
|
(Syntaxof 2)))))
|
||||||
'(1 . 2)))
|
'(1 . 2)))
|
||||||
|
|
||||||
(require/provide 'm-stx-typed)
|
|
||||||
|
|
||||||
;; stx-pair?
|
;; stx-pair?
|
||||||
|
|
||||||
(: stx-pair? (→ Any Boolean : (Syntaxof Any)))
|
(: stx-pair? (→ Any Boolean : (Syntaxof Any)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user