[racket] require/typed to a struct type

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Feb 9 13:27:29 EST 2013

Certainly, `contract-in` couldn't fix the ordering issue, but it could
simplify using contracts with require, instead of needing the separate
`require/contract` form.

On Sat, Feb 9, 2013 at 1:24 PM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
>
> It can't be. If you think about it, contract-out can safely lift to the end of the module, but contract-in can't, so the ordering problem remains.
>
>
> On Feb 9, 2013, at 1:11 PM, Sam Tobin-Hochstadt wrote:
>
>> On Sat, Feb 9, 2013 at 1:03 PM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
>>> BUT, I wonder whether there is a dual to contract-out, i.e., contract-in
>>
>> That's what `require/contract` (implemented as part of Typed Racket
>> here: https://github.com/plt/racket/blob/master/collects/typed-racket/utils/require-contract.rkt)
>> does.
>>
>> It would be nice to provide this as part of a `require` macro, the way
>> that `contract-out` works, but I don't think that the `require`
>> extension API can support this.
>>
>> Sam
>

Posted on the users mailing list.