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

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Jun 25 21:15:49 EDT 2012

This is not directly related to your particular commit, but if I make
a make-prime-dict, does apply a contract at that point (using
'contract')? If so, who are the parties that get blamed?

Robby

On Mon, Jun 25, 2012 at 7:57 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> On 2012-06-25 20:35:21 -0400, asumu at racket-lang.org wrote:
>> | racket/generics: add contract combinator
>> |
>> | The generics library now generates a `name/c` macro
>> | for a generic interface `name`. The combinator can be
>> | used to contract instances (or constructors) of a
>> | generic interface across standard contract boundaries.
>
> To add a bit more context, the purpose of this feature is to allow
> contracts to be applied to generic interfaces like how
> `prop:dict/contract` does for dictionaries.
>
> It's more flexible because it allows contracts to be added for any
> interface (without any additional properties) and allows contracts
> to be added at different places. e.g., you could export
> `make-prime-dict` and `make-dict` constructors with different
> contracts.
>
> If nobody minds, I may go ahead and convert uses of `prop:dict/contract`
> to use `dict/c` and export the latter from `racket/dict`.
>
> Cheers,
> Asumu
> _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/dev


Posted on the dev mailing list.