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

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Mon Oct 25 12:19:45 EDT 2010

But that does hide the intent of the case-lambda usage, which is captured in
the original.

On Mon, Oct 25, 2010 at 8:21 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>wrote:

> On Mon, Oct 25, 2010 at 10:06 AM, Doug Williams
> <m.douglas.williams at gmail.com> wrote:
> >
> >   (case-> (->r ((r random-source?)
> >                 (a real?)
> >                 (b (>/c a)))
> >                real?)
> >           (->r ((a real?)
> >                 (b (>/c a)))
> >                real?)))
> >
> > I'm not sure that one can be easily rewritten in the current contract
> > system. [I think I would have to move the b > a constraint into the code
> > itself in the current contract system. Or, change the argument order and
> > break backward compatibility.]
>
> This can be written as a dependent contract, but with worse error messages.
>
> (->i ([r/a (or/c random-source? real?)] [a/b real?])
>       ([b/opt (r/a a/b) (if (random-source? r/a) (>/c a/b) none/c)])
>       [result real?])
>
> --
> sam th
> samth at ccs.neu.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101025/081fc1a3/attachment.html>

Posted on the dev mailing list.