[racket] Predicates for instantiated types in Typed Racket

From: Eric Dobson (eric.n.dobson at gmail.com)
Date: Fri Jun 17 15:13:42 EDT 2011

This works for me on HEAD, but not 5.1.1. I submitted a patch that
made it generate flat contracts instead of regular contracts about a
month ago, so I think it is fixed now.

https://github.com/plt/racket/commit/613e121783d34c3e2cc4904f3e4f43639ab925b3

-Eric

On Fri, Jun 17, 2011 at 3:05 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Fri, Jun 17, 2011 at 3:01 PM, Richard Lawrence
> <richard.lawrence at berkeley.edu> wrote:
>>
>> I think I must be missing something about how Typed Racket predicates
>> work.  If I define a predicate for an instantiated polymorphic structure,
>> my programs type check fine, but I get runtime errors when I try to use
>> the predicate, which boil down to "expected procedure, given:
>> #<make-contract>".
>
> It looks like Typed Racket isn't generating a flat contract for the
> type `Foo' here, which it should.  I'll have a look at why that is.
> --
> sam th
> samth at ccs.neu.edu
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



Posted on the users mailing list.