BTW, the following example typechecks: (define #:forall (A) (foo [f : (Real -> A)] [b : Boolean]) : (Listof A) (list (f 0.1) (f 0.2)))
but the following example generates a lot of complaints: (define #:forall (A) (foo [f : (Real -> A)] [b : Boolean #t]) : (Listof A) (list (f 0.1) (f 0.2))) Welcome to DrRacket, version 6.3.0.3--2015-11-06(58c919c/a) [3m]. Language: typed/racket; memory limit: 4096 MB. . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: parse error in type; type name `A' is unbound in: A . Type Checker: Summary: 8 errors encountered in: A A A A A A A A Best, António. On Sun, Nov 8, 2015 at 7:31 PM, Sam Tobin-Hochstadt <[email protected]> wrote: > Thanks for the report! I've got a fix here, which I'm still testing: > https://github.com/racket/typed-racket/pull/238 > > Sam > > On Sun, Nov 8, 2015 at 7:16 AM Antonio Menezes Leitao < > [email protected]> wrote: > >> Hi, >> >> The following example works fine: >> >> #lang racket >> >> (define v (vector 1 2 3)) >> (for ([t (in-vector v 0 2)]) >> (displayln t)) >> >> However, in Typed Racket, it does not: >> >> Welcome to DrRacket, version 6.3.0.3--2015-11-06(58c919c/a) [3m]. >> Language: typed/racket; memory limit: 4096 MB. >> . Type Checker: missing type for identifier; >> consider using `require/typed' to import it >> identifier: normalise-inputs >> from module: for.rkt in: (for ((t (in-vector v 0 2))) (displayln t)) >> . Type Checker: type mismatch >> expected: VectorTop >> given: Any in: (for ((t (in-vector v 0 2))) (displayln t)) >> . Type Checker: Summary: 2 errors encountered in: >> (for ((t (in-vector v 0 2))) (displayln t)) >> (for ((t (in-vector v 0 2))) (displayln t)) >> >> >> Best, >> António. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-dev/CAJQmiZWNoUkEB7bDyK9E5mUE3WdY40UC8eyTKnP4d5JwWjaKQw%40mail.gmail.com >> <https://groups.google.com/d/msgid/racket-dev/CAJQmiZWNoUkEB7bDyK9E5mUE3WdY40UC8eyTKnP4d5JwWjaKQw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/CAJQmiZV%2BXnbdqPyzzrFhw1_Gddg7tw1CPpya%3D2t8f%3Dac3WLXvA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
