On Sat, Aug 6, 2011 at 1:58 PM, Robby Findler
<ro...@eecs.northwestern.edu> wrote:
> On Sat, Aug 6, 2011 at 1:53 PM, Casey Klein
> <clkl...@eecs.northwestern.edu> wrote:
>> On Sat, Aug 6, 2011 at 10:43 AM, Matthias Felleisen
>> <matth...@ccs.neu.edu> wrote:
>>>
>>> 1. I like Robby's mode suggestion.
>>> 2. I prefer shorter keywords, e.g., define-judgment.
>>
>> I'm having trouble reconciling these comments. Robby's suggestion, if
>> I understand it correctly, is to overload the `define-relation' name
>> instead of choosing a new one. If you supply the #:mode keyword, you
>> get the `define-judgment-form' behavior (inputs and outputs, static
>> checking, the `judgment-holds' syntax for application); if not, you
>> get the current `define-relation' behavior.
>
> My suggestion was meant to be separate from the overloading thing. You
> could use a #:mode even for define-judgment.
>

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)
    [(sum z n n)]
    [(sum (s n_1) n_2 (s n_3))
     (sum n_1 n_2 n_3)])
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to