[racket] Why this code snippet from document does not work?

From: Monica Tomson (monica.tomson at gmail.com)
Date: Sat Nov 17 01:59:36 EST 2012

Yeah, my original version is 5.2.1.
Now it works on the new version.

Thanks, Eric!
--Monic

On Fri, Nov 16, 2012 at 11:52 PM, Eric Dobson <eric.n.dobson at gmail.com>wrote:

> This example runs fine for me, but likely would not run fine on older
> versions of racket (before submodules were released).
>
> I believe 5.3 added support for submodules and 5.3.1 was released recently.
>
> What version of racket are you running? Running (version) will tell you.
>
>
> On Fri, Nov 16, 2012 at 10:43 PM, Monica Tomson <monica.tomson at gmail.com>wrote:
>
>> Hi,
>>
>> I want to use some quoted module name, and read this page in Racket
>> documentation:
>> http://docs.racket-lang.org/guide/Module_Syntax.html
>>
>> In the section 6.2.3, submodules,
>> the code is:
>>
>>   #lang racket <http://docs.racket-lang.org/reference/index.html>
>>
>>
>>
>> (module<http://docs.racket-lang.org/reference/module.html#(form._((quote._~23~25kernel)._module))>
>>  zoo racket
>>
>>   (provide<http://docs.racket-lang.org/reference/require.html#(form._((lib._racket/private/base..rkt)._provide))>
>>  tiger)
>>
>>   (define<http://docs.racket-lang.org/reference/define.html#(form._((lib._racket/private/base..rkt)._define))>
>>  tiger "Tony"))
>>
>>
>>
>> (require<http://docs.racket-lang.org/reference/require.html#(form._((lib._racket/private/base..rkt)._require))>
>>  'zoo)
>>
>>
>>
>> tiger
>>
>> I put the above lines in to a fine and when press the run button, racket
>> screams at me
>>
>> module: illegal use (not at top-level) in: (module zoo racket (provide
>> tiger) (define tiger "Tony"))
>>
>> Am I missing something here?
>>
>> Thanks,
>> -monica
>>
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121116/f22dd569/attachment-0001.html>

Posted on the users mailing list.