[racket] typed racket, filters, and polymorphism

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Thu Sep 25 18:19:37 EDT 2014

No, I don't think you can do this. Can you say more about what you're
trying to accomplish?

Sam

On Thu, Sep 25, 2014 at 6:15 PM, Alexander D. Knauth
<alexander at knauth.org> wrote:
> Do any of you have any advice for getting a function like this to
> type-check?
> #lang typed/racket
>
> (: check-int : (All (a) (case-> [a -> a]
>                                 [Any -> Integer])))
> (define (check-int int)
>   (unless (exact-integer? int)
>     (error 'check-int "expected Integer, given ~v" int))
>   int)
>
> ;. Type Checker: type mismatch
> ;  expected: a
> ;  given: Integer in: int
>
>
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>

Posted on the users mailing list.