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 <[email protected]> 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
algorithm.

N.
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to