[racket-dev] Release for v5.0.2 has begun

From: Stevie Strickland (sstrickl at ccs.neu.edu)
Date: Mon Oct 25 11:52:54 EDT 2010

On Oct 24, 2010, at 10:10 PM, Robby Findler wrote:
> What would happen if I had a contract like this:
>  (case-> (-> integer? integer?) (-> boolean? boolean?))

One of two things:

a) You'd get an error for having overlapping arities in your contracts. This is the most likely to be implemented, at least at first, since I believe that's what current case-> does, right?  I'd do a quick spot check, but I'm rebuilding Racket at the moment.

b) You'd filter the contracts by arity, and then at the overlaps, you'd have to resort to first-order checks on the arguments to decide which argument/result contracts to apply.  With the above contract, that would disambiguate, but obviously there could be overlaps even after first-order checks (structs with prop:procedure, for example).


Posted on the dev mailing list.