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

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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121116/875352f6/attachment.html>

Posted on the users mailing list.