[racket] problem (?) with typed racket

From: Noel Welsh (noelwelsh at gmail.com)
Date: Mon Jul 5 08:43:12 EDT 2010

This type checks for me:

 (define-struct: (E) Arrow
   ([arrow : (E -> (Listof E))]))

 (: compose-arrows (All (E) ((Arrow E) (Arrow E) -> (Arrow E))))
 (define (compose-arrows a b)
   (Arrow (lambda: ((e : E)) ((Arrow-arrow a) (car ((Arrow-arrow b) e))))))

On Mon, Jul 5, 2010 at 12:19 PM, Jose A. Ortega Ruiz <jao at gnu.org> wrote:
> Is the failure to type check a genuine limitation of the type inference
> engine, or is it me expecting too much from type inference in general?
> And, is there a more compact way of indicating the type of that lambda?

I have found that type inference doesn't work too well in lambdas w/
polymorphism. I don't know the details of the type inference


Posted on the users mailing list.