I think something problematic is happening with type inference here,
and better types could be picked. Right now, Typed Racket is doing
this:
(compose (λ (x) x) (inst (λ #:forall (a) ({x : a}) x) Nothing))
when it should probably do
(compose (λ (x) x) (inst (λ #:forall (a) ({x : a}) x) Any))
However, using polymorphic arguments (such as your second function)
to polymorphic functions (such as `compose`) in general won't produce
the results you want, and I recommend writing the instantiation you
want explicitly.
Sam
> --
> 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
racket-dev+...@googlegroups.com.
> To post to this group, send email to
racke...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/7E7C582D-7066-4073-AAFD-9B6CA99F1F1E%40ccs.neu.edu.
> For more options, visit
https://groups.google.com/d/optout.