[racket] Why this code snippet from document does not work?
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/c9d70b00/attachment.html>