[racket] TR: Polymorphic types

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat Jan 17 21:47:08 EST 2015

On Jan 17, 2015, at 9:32 PM, Sam Tobin-Hochstadt wrote:

> No, it can't be adapted. That error message is an instance of this
> caveat: http://docs.racket-lang.org/ts-guide/caveats.html#%28part._.Typed-untyped_interaction_and_contract_generation%29
> which applies to `define-predicate` as well. There's no way to check
> if something is a `Foo`, because Typed Racket wouldn't know what you
> meant for `A` to be.


I think the section [title] is misleading here. You need to know
TR's ideas well to see that the generation of a run-time object
is the same thing as moving from the typed to the untyped world
(and vice versa). 

Perhaps an example like Jordan's could be included in the docs.

-- Matthias



Posted on the users mailing list.