Improve types for exit and in-naturals.

This commit is contained in:
Eric Dobson 2013-02-16 18:00:56 -08:00 committed by Vincent St-Amour
parent 7e88895bd0
commit 7d6888f229
3 changed files with 9 additions and 2 deletions

View File

@ -226,6 +226,12 @@
(vector 5 5 5))
(check equal?
(for/list: : (Listof Natural)
((i : Natural (and (in-naturals)))
(j : Natural (and (in-range 5))))
(+ i j))
(list 0 2 4 6 8))
;; break and final clauses
;; TODO typechecker can't handle these

View File

@ -1129,7 +1129,7 @@
;Section 9.7 (Exiting)
[exit (-> (Un))]
[exit (->opt [Univ] (Un))]
[exit-handler (-Param (-> Univ ManyUniv) (-> Univ ManyUniv))]
[executable-yield-handler (-Param (-> -Byte ManyUniv) (-> -Byte ManyUniv))]

View File

@ -84,7 +84,8 @@
(->opt -Real -Real [-Real] (-seq -Real)))]
;; in-naturals
[(make-template-identifier 'in-naturals 'racket/private/for)
(cl->* (-> -PosInt (-seq -PosInt))
(cl->* (-> (-seq -Nat))
(-> -PosInt (-seq -PosInt))
(-> -Int (-seq -Nat)))]
;; in-list
[(make-template-identifier 'in-list 'racket/private/for)