[racket] Submodule reloaded when entering file module

From: Philipp Dikmann (philipp at dikmann.de)
Date: Tue Jun 25 09:25:25 EDT 2013

... yet I failed to notice the subtleties of your original question (why 
it enters the submodule twice).
No idea about that - sorry for being over-ambitious!

On 25.06.13 15:19, Philipp Dikmann wrote:
> Re-loading a changed file is intended behavior for the enter! command:
> http://docs.racket-lang.org/reference/enter.html
>
>
> On 25.06.13 11:48, Diogo F. S. Ramos wrote:
>> When entering a file from a submodule inside this file, the submodule
>> seems to be evaluated again. Is this the intended behavior?
>>
>> Here are the steps to reproduce it:
>>
>> 1. Create a file with a submodule inside it
>> 2. Enter file
>> 3. Enter submodule
>> 4. Change the file and save it
>> 5. Enter the file
>>
>> Here is a example program:
>>
>> #lang racket/base
>>
>> (module my-submodule racket/base
>>    (displayln "inside my-submodule"))
>>
>> And here is the interaction with this file:
>>
>> $ racket
>> Welcome to Racket v5.3.4.
>>> (enter! "foo.rkt")
>>> (enter! (submod "foo.rkt" my-submodule))
>> inside my-submodule
>>> (enter! "foo.rkt")
>>    [re-loading /tmp/foo.rkt]
>> inside my-submodule
>> As one can see, the message "inside my-submodule" is printed again when
>> entering "foo.rkt".
>> ____________________
>>    Racket Users list:
>>    http://lists.racket-lang.org/users
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users


Posted on the users mailing list.