[racket] TR: unwrapping from <#Typed Value: ... > ??

From: Ismael Figueroa Palet (ifigueroap at gmail.com)
Date: Fri Nov 25 08:28:27 EST 2011

>
> 2011/11/25 Sam Tobin-Hochstadt <samth at ccs.neu.edu>
> This means that you passed the procedure to an untyped module with the
> type `Any'.  If you provide a more specific type, it won't be wrapped
> like this.
>

Indeed, I was storing a value of type FunType = (Any -> (T Any)) inside a
continuation mark, and then retrieving it for the comparison. I was
retrieving the continuation marks with type (Listof Any), using
continuation-mark-set->list, which I think is the reason for the error I'm
getting.

could the continuation mark put the function in the untyped module you
mention?

However, if I change the expected type to (Listof FunType), I get a type
error when calling continuation-mark-set->list, which says that this
functions returns (Listof Any).

How can I coerce a (Listof Any) into a (Listof FunType)?

Or more in general, I'm facing similars problems in my code, where I get
something of type Any and I need to coerce it to a more specific type but I
can't get it to work. I've tried using ann and assert but it doesn't seems
to work :-(

Thanks for all the answers.




-- 
Ismael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111125/c980d95f/attachment.html>

Posted on the users mailing list.