File tree Expand file tree Collapse file tree 4 files changed +26
-15
lines changed
typed-racket-lib/typed-racket
typed-racket-test/succeed Expand file tree Collapse file tree 4 files changed +26
-15
lines changed Original file line number Diff line number Diff line change 7878 (-> -Symbol -String (-> a -Boolean) (-> a -Nat) a -Nat (Un (-val #f ) -Nat) -Nat (-values (list a -Index -Index -Index))))]
7979 ;; make-sequence
8080 [(make-template-identifier 'make-sequence 'racket/private/for )
81- (-poly (a b)
81+ (-polydots (a b)
8282 (let ([seq-vals
83- (lambda (a)
83+ (lambda (a b )
8484 (-values (list
85- (-> Univ (-values a ))
85+ (-> Univ (-values-dots (list a) b 'b ))
8686 (Un (-> Univ Univ) (-val #f ))
8787 (-> Univ Univ)
8888 Univ
8989 (Un (-> Univ Univ) (-val #f ))
90- (Un (->* a Univ) (-val #f ))
91- (Un (->* (cons Univ a) Univ) (-val #f )))))])
90+ (Un (->... (list a) (b b) Univ) (-val #f ))
91+ (Un (->... (list Univ a) (b b ) Univ) (-val #f )))))])
9292 (cl->*
93- (-> Univ -Byte (seq-vals (list -Byte) ))
94- (-> Univ -Index (seq-vals (list -Index) ))
93+ (-> Univ -Byte (seq-vals -Byte b ))
94+ (-> Univ -Index (seq-vals -Index b ))
9595 ;; Generous. Negative numbers aren't allowed.
96- (-> Univ -Fixnum (seq-vals (list -NonNegFixnum)))
97- (-> Univ -Int (seq-vals (list -Nat)))
98- (-> Univ (-seq a) (seq-vals (list a)))
99- (-> Univ (-seq a b) (seq-vals (list a b))))))]
96+ (-> Univ -Fixnum (seq-vals -NonNegFixnum b))
97+ (-> Univ -Int (seq-vals -Nat b))
98+ (->* (list Univ (-seq-dots (list a) b 'b )) (seq-vals a b)))))]
10099 ;; check-range
101100 [(make-template-identifier 'check-range 'racket/private/for )
102101 (-> Univ Univ Univ -Void)]
Original file line number Diff line number Diff line change 927927 [(? variance:co?) (i-subst null)]
928928 [(? variance:contra?) (i-subst/starred null Univ)]
929929 ;; TODO figure out if there is a better subst here
930- [(? variance:inv) (i-subst null)]))))
930+ [(? variance:inv? ) (i-subst null)]))))
931931 S))
932932 (define (build-subst m)
933933 (match m
Original file line number Diff line number Diff line change 4848 [(tc-result1: (and t Poly?))
4949 (tc-expr/check #'quo (ret Univ))
5050 (tc/funapp #'op #'(quo arg)
51- (instantiate-poly t (list-extend (list Univ Univ)
52- i-anns
53- Univ))
51+ (instantiate-poly t i-anns)
5452 (list (ret Univ) (single-value #'arg ))
5553 expected)]))
5654 ;; special-case for not - flip the props
Original file line number Diff line number Diff line change 1+ #lang typed/racket
2+
3+ (define-type In-Integer (-> (Listof (List Integer Number Float)) (Sequenceof Integer Number Float)))
4+
5+ (: test-int (-> In-Integer (Listof (List Integer Number Float)) Number))
6+ (define (test-int in-ints ints)
7+ (for/sum : Number ([([a : Integer] [b : Number] [c : Float]) (in-ints ints)])
8+ (+ a b c)))
9+
10+ (for/list : (Listof Integer) ([i : Integer (list 0 1 )])
11+ (+ i 1 ))
12+
13+ (for/list : (Listof Integer) ([i : Integer (in-list (list 0 1 ))])
14+ (+ i 1 ))
You can’t perform that action at this time.
0 commit comments