[racket] typed racket, filters, and polymorphism

From: Alexander D. Knauth (alexander at knauth.org)
Date: Thu Sep 25 18:15:50 EDT 2014

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140925/6490e5ad/attachment.html>

Posted on the users mailing list.