[racket] require/typed to a struct type
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