Fix type for stx->list in typed/syntax/stx

Please merge to v6.1.1

original commit: 125d993c64bd71ec83109717e029f0e7da4699e3
This commit is contained in:
Asumu Takikawa 2014-10-20 17:20:30 -04:00
parent 1b8539dfbe
commit eb79b59d1e
2 changed files with 6 additions and 1 deletions

View File

@ -38,7 +38,8 @@
[stx-list? (make-pred-ty (-Stx-Listof Univ))]
[stx->list (-poly (a)
(cl->* (-> (-Stx-Listof a) (-lst a))
(-> (-Syntax Univ) (-val #f))))]
(-> (-Syntax Univ)
(Un (-val #f) (-lst (-Syntax Univ))))))]
[stx-car (-poly (a b)
(cl->*
(-> (-Stx-Pairof a b) a)

View File

@ -22,6 +22,10 @@
(ann (add1 (car (stx->list '(1 2 3)))) Positive-Index)
(ann (stx->list #'(a b . (c d))) (Listof (Syntaxof Symbol)))
(ann (stx->list (cons #'a #'(b . (c d)))) (Listof (Syntaxof Symbol)))
;; Make sure case-> type doesn't have intersecting domains with
;; incompatible result types
(ann (assert (stx->list (ann #'(a b c) (Syntaxof Any))))
(Listof (Syntaxof Any)))
(ann (stx-car #'(a b)) (Syntaxof 'a))
(ann (stx-cdr #'(a b)) (List (Syntaxof 'b)))