Improve types for exit and in-naturals.
This commit is contained in:
parent
7e88895bd0
commit
7d6888f229
|
@ -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
|
||||
|
|
|
@ -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))]
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user