[racket] typing a function
OK, I think I'm not smart enough for TR. One last question.
What's wrong in the following?
========
#lang typed/racket
(define-type Array2 (Vectorof (Vectorof Number)))
(: make-array (Positive-Index Positive-Index -> Array2))
(define (make-array xdim ydim)
(for/vector: : Array2 ((i : Positive-Index (in-range xdim)))
(make-vector ydim 0)))
========
Welcome to DrRacket, version 5.3 [3m].
Language: typed/racket [custom]; memory limit: 128 MB.
. Type Checker: Error in macro expansion -- insufficient type
information to typecheck. please add more type annotations in:
(for/vector: : Array2 ((i : Positive-Index (in-range xdim)))
(make-vector ydim 0))
Thanks.
P.