[racket] enter! and contracts

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Aug 10 22:15:31 EDT 2011

(The intuition here is that enter! puts you _inside_ the module and
contracts are not checked there.)


On Wed, Aug 10, 2011 at 9:12 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> Whoops, meant to actually send this to the list:
> On 2011-08-11 01:13:50 +0200, Wojciech Kaczmarek wrote:
>>    The problem I ran into with this workflow is that contracts for modul
>>    functions seem to *be not triggered when the module was loaded via
>>    enter!.*
> It seems that when a module is entered via enter! then higher order
> contracts are not applied. So a contract like (-> number? number?) will
> not be applied assuming you are using provide/contract. First order
> contracts like number? are still checked.
> In general, the provide forms seem to be ignored since, for example,
> a renamed identifier using "rename-out" will be undefined if you use
> enter!.
> You can use define/contract if you need both enter! and higher-order
> contract checking. This sets up the contract boundary at the definition
> site, not the module.
> Cheers,
> Asumu
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.