[racket-dev] [plt] Push #23181: master branch updated

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Mon Aug 8 07:04:49 EDT 2011

On Mon, Aug 8, 2011 at 2:26 AM, Eli Barzilay <eli at barzilay.org> wrote:
> Two days ago, Casey Klein wrote:
>>
>> Oh, I see. I like that. How do you feel about using the same style
>> for contracts? For example:
>>
>> (define-judgment-form nats
>>     #:mode (sum I I O)
>>     #:contract (sum n n n)
>
> Not a party I'm familiar with, but separating the IOs from the types
> seems bad.  Can't they be specified together?
>

That could work:

(define-judgment-form nats
    (sum [n I] [n I] [n O])
    ....)

Or if you choose not to supply a contract:

(define-judgment-form nats
    (sum I I O)
    ....)

I think you're right that something like this would be better.



Posted on the dev mailing list.