[racket-users] TR: require/typed and parametric polymorphism

2015-07-02 Thread Jordan Johnson
Hi all, If I’m reading the docs source correctly, it looks like it’s impossible to use require/typed to attach a parametric type to an import. Is that right? I’m also a bit curious if that’s because adding that capability is a difficult or impossible proposition. Cheers, jmj -- You

Re: [racket-users] TR: require/typed and parametric polymorphism

2015-07-02 Thread Sam Tobin-Hochstadt
Aha. That indeed doesn't work, and there are hard problems there. In particular, we'd need to be able to get inside the struct to wrap individual fields appropriately, but that's trickier with potentially-opaque structs. I hope that we can support this in the future, though. Sam On Fri, Jul 3,

Re: [racket-users] TR: require/typed and parametric polymorphism

2015-07-02 Thread Sam Tobin-Hochstadt
No, that's not correct. This program works fine: #lang typed/racket/base (require/typed racket/function [identity (All (A) (- A A))]) (identity 5) Can you say more about what part of the documentation gave you that impression, so we can correct that? Sam On Fri, Jul 3, 2015 at 1:59 AM, Jordan