[racket-dev] A proposal for parametric opaque types in Typed Racket

From: Alexander D. Knauth (alexander at knauth.org)
Date: Thu Jan 29 22:10:52 EST 2015

Um, for this:
(module typed typed/racket/base
    (provide (struct-out Foo))
    (struct [A] Foo ([x : A] [y : A]) #:transparent))

(Foo "a" 'b)
Should be fine because Foo could be instantiated at the type (U String Symbol).

On Jan 29, 2015, at 9:25 PM, Alexis King <lexi.lambda at gmail.com> wrote:

> I recently ran into a problem in which opaque types (types imported from untyped code) cannot by parameterized by Typed Racket. I initially encountered this problem in my attempt to port 2htdp/image to TR.
> 
> After some further consideration, I’m interested in adding support to make something like this possible, which would certainly have additional benefits beyond this specific use-case. I’ve outlined my proposal here:
> http://lexi-lambda.github.io/racket-parametric-opaque-types/
> 
> Any feedback, suggestions, or advice would be appreciated, especially from those who are familiar with Typed Racket’s internals.
> 
> Thank you,
> Alexis
> _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20150129/1f777633/attachment-0001.html>

Posted on the dev mailing list.