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, 2015 at 2:26 AM, Jordan Johnson <j...@fellowhuman.com> wrote:
> On Jul 2, 2015, at 5:15 PM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu>
> wrote:
>
>
> 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?
>
>
> Ah - I forgot a crucial detail, sorry: I was trying to figure out how to
> write parametric struct types with #:struct. The docs for require/typed
> don’t offer the maybe-type-vars portion of the grammar for struct.
>
> jmj
>
>
> Sam
>
> On Fri, Jul 3, 2015 at 1:59 AM, Jordan Johnson <j...@fellowhuman.com> wrote:
>
> 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 received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to