This file is indexed.

/usr/share/doc/racket/reference/module.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>3.1&nbsp;Modules: module, module*, ...</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewselflink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9660;</a></td><td>3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">3.1&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Modules:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">module</span></span>, <span class="RktSym"><span class="RktStxLink">module*</span></span>, ...</a></td></tr><tr><td align="right">3.2&nbsp;</td><td><a href="require.html" class="tocviewlink" data-pltdoc="x">Importing and Exporting:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">require</span></span> and <span class="RktSym"><span class="RktStxLink">provide</span></span></a></td></tr><tr><td align="right">3.3&nbsp;</td><td><a href="quote.html" class="tocviewlink" data-pltdoc="x">Literals:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">quote</span></span> and <span class="RktSym"><span class="RktStxLink">#%datum</span></span></a></td></tr><tr><td align="right">3.4&nbsp;</td><td><a href="__expression.html" class="tocviewlink" data-pltdoc="x">Expression Wrapper:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">#%expression</span></span></a></td></tr><tr><td align="right">3.5&nbsp;</td><td><a href="__top.html" class="tocviewlink" data-pltdoc="x">Variable References and <span class="RktSym"><span class="RktStxLink">#%top</span></span></a></td></tr><tr><td align="right">3.6&nbsp;</td><td><a href="Locations____variable-reference.html" class="tocviewlink" data-pltdoc="x">Locations:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">#%variable-<wbr></wbr>reference</span></span></a></td></tr><tr><td align="right">3.7&nbsp;</td><td><a href="application.html" class="tocviewlink" data-pltdoc="x">Procedure Applications and <span class="RktSym"><span class="RktStxLink">#%app</span></span></a></td></tr><tr><td align="right">3.8&nbsp;</td><td><a href="lambda.html" class="tocviewlink" data-pltdoc="x">Procedure Expressions:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">lambda</span></span> and <span class="RktSym"><span class="RktStxLink">case-<wbr></wbr>lambda</span></span></a></td></tr><tr><td align="right">3.9&nbsp;</td><td><a href="let.html" class="tocviewlink" data-pltdoc="x">Local Binding:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">let</span></span>, <span class="RktSym"><span class="RktStxLink">let*</span></span>, <span class="RktSym"><span class="RktStxLink">letrec</span></span>, ...</a></td></tr><tr><td align="right">3.10&nbsp;</td><td><a href="local.html" class="tocviewlink" data-pltdoc="x">Local Definitions:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">local</span></span></a></td></tr><tr><td align="right">3.11&nbsp;</td><td><a href="shared.html" class="tocviewlink" data-pltdoc="x">Constructing Graphs:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">shared</span></span></a></td></tr><tr><td align="right">3.12&nbsp;</td><td><a href="if.html" class="tocviewlink" data-pltdoc="x">Conditionals:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">if</span></span>, <span class="RktSym"><span class="RktStxLink">cond</span></span>, <span class="RktSym"><span class="RktStxLink">and</span></span>, and <span class="RktSym"><span class="RktStxLink">or</span></span></a></td></tr><tr><td align="right">3.13&nbsp;</td><td><a href="case.html" class="tocviewlink" data-pltdoc="x">Dispatch:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">case</span></span></a></td></tr><tr><td align="right">3.14&nbsp;</td><td><a href="define.html" class="tocviewlink" data-pltdoc="x">Definitions:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">define</span></span>, <span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>syntax</span></span>, ...</a></td></tr><tr><td align="right">3.15&nbsp;</td><td><a href="begin.html" class="tocviewlink" data-pltdoc="x">Sequencing:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">begin</span></span>, <span class="RktSym"><span class="RktStxLink">begin0</span></span>, and <span class="RktSym"><span class="RktStxLink">begin-<wbr></wbr>for-<wbr></wbr>syntax</span></span></a></td></tr><tr><td align="right">3.16&nbsp;</td><td><a href="when_unless.html" class="tocviewlink" data-pltdoc="x">Guarded Evaluation:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">when</span></span> and <span class="RktSym"><span class="RktStxLink">unless</span></span></a></td></tr><tr><td align="right">3.17&nbsp;</td><td><a href="set_.html" class="tocviewlink" data-pltdoc="x">Assignment:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">set!</span></span> and <span class="RktSym"><span class="RktStxLink">set!-<wbr></wbr>values</span></span></a></td></tr><tr><td align="right">3.18&nbsp;</td><td><a href="for.html" class="tocviewlink" data-pltdoc="x">Iterations and Comprehensions:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">for</span></span>, <span class="RktSym"><span class="RktStxLink">for/<span class="mywbr"> &nbsp;</span>list</span></span>, ...</a></td></tr><tr><td align="right">3.19&nbsp;</td><td><a href="wcm.html" class="tocviewlink" data-pltdoc="x">Continuation Marks:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">with-<wbr></wbr>continuation-<wbr></wbr>mark</span></span></a></td></tr><tr><td align="right">3.20&nbsp;</td><td><a href="quasiquote.html" class="tocviewlink" data-pltdoc="x">Quasiquoting:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">quasiquote</span></span>, <span class="RktSym"><span class="RktStxLink">unquote</span></span>, and <span class="RktSym"><span class="RktStxLink">unquote-<wbr></wbr>splicing</span></span></a></td></tr><tr><td align="right">3.21&nbsp;</td><td><a href="Syntax_Quoting__quote-syntax.html" class="tocviewlink" data-pltdoc="x">Syntax Quoting:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">quote-<wbr></wbr>syntax</span></span></a></td></tr><tr><td align="right">3.22&nbsp;</td><td><a href="__top-interaction.html" class="tocviewlink" data-pltdoc="x">Interaction Wrapper:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">#%top-<wbr></wbr>interaction</span></span></a></td></tr><tr><td align="right">3.23&nbsp;</td><td><a href="block.html" class="tocviewlink" data-pltdoc="x">Blocks:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">block</span></span></a></td></tr><tr><td align="right">3.24&nbsp;</td><td><a href="stratified-body.html" class="tocviewlink" data-pltdoc="x">Internal-<wbr></wbr>Definition Limiting:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">#%stratified-<wbr></wbr>body</span></span></a></td></tr><tr><td align="right">3.25&nbsp;</td><td><a href="performance-hint.html" class="tocviewlink" data-pltdoc="x">Performance Hints:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">begin-<wbr></wbr>encourage-<wbr></wbr>inline</span></span></a></td></tr><tr><td align="right">3.26&nbsp;</td><td><a href="lazy-require.html" class="tocviewlink" data-pltdoc="x">Importing Modules Lazily:<span class="mywbr"> &nbsp;</span> <span class="RktSym"><span class="RktStxLink">lazy-<wbr></wbr>require</span></span></a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">module</span></span></a></td></tr><tr><td><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">module*</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">module+</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">#%module-<wbr></wbr>begin</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25printing-module-begin%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">#%printing-<wbr></wbr>module-<wbr></wbr>begin</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">#%plain-<wbr></wbr>module-<wbr></wbr>begin</span></span></a></td></tr><tr><td><a href="#%28form._%28%28quote._~23~25kernel%29._~23~25declare%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">#%declare</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="syntax.html" title="backward to &quot;3 Syntactic Forms&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="syntax.html" title="up to &quot;3 Syntactic Forms&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="require.html" title="forward to &quot;3.2 Importing and Exporting: require and provide&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;module&quot;">3.1<tt>&nbsp;</tt><a name="(part._module)"></a>Modules: <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>, <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span>, ...</h4><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=Module_Syntax.html%23%2528part._module-syntax%2529&amp;version=6.1" class="Sq" data-pltdoc="x">The <span class="RktSym"><span class="RktStxLink">module</span></span> Form</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>.</p></blockquote></blockquote></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((quote._~23~25kernel)._module))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">module</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktVar">module-path</span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Declares a top-level module or a <a href="eval-model.html#%28tech._submodule%29" class="techoutside" data-pltdoc="x"><span class="techinside">submodule</span></a>. For a top-level
module, if the <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._current-module-declare-name%29%29" class="RktValLink" data-pltdoc="x">current-module-declare-name</a></span> parameter is set,
the parameter value is used for the module name and <span class="RktVar">id</span> is
ignored, otherwise <span class="RktPn">(</span><span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._quote%29%29" class="RktStxLink" data-pltdoc="x">quote</a></span><span class="stt"> </span><span class="RktVar">id</span><span class="RktPn">)</span> is the name of the
declared module. For a <a href="eval-model.html#%28tech._submodule%29" class="techoutside" data-pltdoc="x"><span class="techinside">submodule</span></a>, <span class="RktVar">id</span> is the name of
the submodule to be used as an element within a <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span> module
path.</div></p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="magnify.png" alt="+" width="24" height="24"/></span>For a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>-like form that works in
definitions context other than the top level or a module body, see
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=compatibility&amp;rel=compatibility-package.html%23%2528form._%2528%2528lib._compatibility%252Fpackage..rkt%2529._define-package%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-package</a></span>.</p></blockquote></blockquote></blockquote><p>The <span class="RktVar">module-path</span> form must be as for <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>, and it
supplies the initial bindings for the body <span class="RktVar">form</span>s. That is, it
is treated like a <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><span class="RktVar">module-path</span><span class="RktPn">)</span> prefix before the
<span class="RktVar">form</span>s, except that the bindings introduced by
<span class="RktVar">module-path</span> can be shadowed by definitions and
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s in the module body <span class="RktVar">form</span>s.</p><p>If a single <span class="RktVar">form</span> is provided, then it is partially expanded
in a <a href="syntax-model.html#%28tech._module._begin._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module-begin context</span></a>. If the expansion leads to
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%plain-module-begin</a></span>, then the body of the
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%plain-module-begin</a></span> is the body of the module. If partial
expansion leads to any other primitive form, then the form is wrapped
with <span class="RktSym">#%module-begin</span> using the lexical context of the
module body; this identifier must be bound by the initial
<span class="RktVar">module-path</span> import, and its expansion must produce a
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%plain-module-begin</a></span> to supply the module body. Finally, if
multiple <span class="RktVar">form</span>s are provided, they are wrapped with
<span class="RktSym">#%module-begin</span>, as in the case where a single
<span class="RktVar">form</span> does not expand to <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%plain-module-begin</a></span>.</p><p>After such wrapping, if any, and before any expansion, an
<a name="(idx._(gentag._81._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">enclosing-module-name</span> property is attached to the
<span class="RktSym">#%module-begin</span> syntax object (see
<a href="stxprops.html" data-pltdoc="x">Syntax Object Properties</a>); the property&rsquo;s value is a symbol
corresponding to <span class="RktVar">id</span>.</p><p>Each <span class="RktVar">form</span> is partially expanded (see
<a href="syntax-model.html#%28part._partial-expansion%29" data-pltdoc="x">Partial Expansion</a>) in a <a href="syntax-model.html#%28tech._module._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module context</span></a>. Further
action depends on the shape of the form:</p><ul><li><p>If it is a <span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin%29%29" class="RktStxLink" data-pltdoc="x">begin</a></span> form, the sub-forms are flattened
out into the module&rsquo;s body and immediately processed in place of the
<span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin%29%29" class="RktStxLink" data-pltdoc="x">begin</a></span>.</p></li><li><p>If it is a <span class="RktSym"><a href="define.html#%28form._%28%28quote._~23~25kernel%29._define-syntaxes%29%29" class="RktStxLink" data-pltdoc="x">define-syntaxes</a></span> form, then the right-hand side is
evaluated (in <a href="eval-model.html#%28tech._phase%29" class="techoutside" data-pltdoc="x"><span class="techinside">phase</span></a> 1), and the binding is immediately
installed for further partial expansion within the
module. Evaluation of the right-hand side is <span class="RktSym"><a href="parameters.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize%29%29" class="RktStxLink" data-pltdoc="x">parameterize</a></span>d
to set <span class="RktSym"><a href="Namespaces.html#%28def._%28%28quote._~23~25kernel%29._current-namespace%29%29" class="RktValLink" data-pltdoc="x">current-namespace</a></span> as in <span class="RktSym"><a href="let.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._let-syntax%29%29" class="RktStxLink" data-pltdoc="x">let-syntax</a></span>.</p></li><li><p>If it is a <span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin-for-syntax%29%29" class="RktStxLink" data-pltdoc="x">begin-for-syntax</a></span> form, then the body is
expanded (in <a href="eval-model.html#%28tech._phase%29" class="techoutside" data-pltdoc="x"><span class="techinside">phase</span></a> 1) and evaluated. Expansion within a
<span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin-for-syntax%29%29" class="RktStxLink" data-pltdoc="x">begin-for-syntax</a></span> form proceeds with the same
partial-expansion process as for a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> body, but in a
higher <a href="eval-model.html#%28tech._phase%29" class="techoutside" data-pltdoc="x"><span class="techinside">phase</span></a>, and saving all <span class="RktSym"><a href="require.html#%28form._%28%28quote._~23~25kernel%29._~23~25provide%29%29" class="RktStxLink" data-pltdoc="x">#%provide</a></span> forms for all
phases until the end of the <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>&rsquo;s expansion. Evaluation
of the body is <span class="RktSym"><a href="parameters.html#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize%29%29" class="RktStxLink" data-pltdoc="x">parameterize</a></span>d to set
<span class="RktSym"><a href="Namespaces.html#%28def._%28%28quote._~23~25kernel%29._current-namespace%29%29" class="RktValLink" data-pltdoc="x">current-namespace</a></span> as in <span class="RktSym"><a href="let.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._let-syntax%29%29" class="RktStxLink" data-pltdoc="x">let-syntax</a></span>.</p></li><li><p>If the form is a <span class="RktSym"><a href="require.html#%28form._%28%28quote._~23~25kernel%29._~23~25require%29%29" class="RktStxLink" data-pltdoc="x">#%require</a></span> form, bindings are introduced
immediately, and the imported modules are <a href="eval-model.html#%28tech._instantiate%29" class="techoutside" data-pltdoc="x"><span class="techinside">instantiate</span></a>d or
<a href="syntax-model.html#%28tech._visit%29" class="techoutside" data-pltdoc="x"><span class="techinside">visit</span></a>ed as appropriate.</p></li><li><p>If the form is a <span class="RktSym"><a href="require.html#%28form._%28%28quote._~23~25kernel%29._~23~25provide%29%29" class="RktStxLink" data-pltdoc="x">#%provide</a></span> form, then it is recorded for
processing after the rest of the body.</p></li><li><p>If the form is a <span class="RktSym"><a href="define.html#%28form._%28%28quote._~23~25kernel%29._define-values%29%29" class="RktStxLink" data-pltdoc="x">define-values</a></span> form, then the binding
is installed immediately, but the right-hand expression is not
expanded further.</p></li><li><p>If the form is a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> form, then it is immediately
expanded and declared for the extent of the current top-level
enclosing module&rsquo;s expansion.</p></li><li><p>If the form is a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> form, then it is not
expanded further.</p></li><li><p>Similarly, if the form is an expression, it is
not expanded further.</p></li></ul><p>After all <span class="RktVar">form</span>s have been partially expanded this way, then
the remaining expression forms (including those on the right-hand side
of a definition) are expanded in an expression context. After all
expression forms, <span class="RktSym"><a href="require.html#%28form._%28%28quote._~23~25kernel%29._~23~25provide%29%29" class="RktStxLink" data-pltdoc="x">#%provide</a></span> forms are processed in the order
in which they appear (independent of <a href="eval-model.html#%28tech._phase%29" class="techoutside" data-pltdoc="x"><span class="techinside">phase</span></a>) in the expanded
module. Finally, all <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> forms are expanded in order, so
that each becomes available for use by subsequent <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span>
forms; the enclosing module itself is also available for use by
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> <a href="eval-model.html#%28tech._submodule%29" class="techoutside" data-pltdoc="x"><span class="techinside">submodules</span></a>.</p><p>The scope of all imported identifiers covers the entire module body,
except for nested <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> and <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> forms (assuming
a non-<span class="RktVal">#f</span> <span class="RktVar">module-path</span> in the latter case).
The scope of any identifier defined within the module body similarly
covers the entire module body except for such nested <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>
and <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> forms.
The ordering of syntax definitions does not affect the scope of the
syntax names; a transformer for <span class="RktSym">A</span> can produce expressions
containing <span class="RktSym">B</span>, while the transformer for <span class="RktSym">B</span> produces
expressions containing <span class="RktSym">A</span>, regardless of the order of
declarations for <span class="RktSym">A</span> and <span class="RktSym">B</span>. However, a syntactic form
that produces syntax definitions must be defined before it is used.</p><p>No identifier can be imported or defined more than once at any
<a href="syntax-model.html#%28tech._phase._level%29" class="techoutside" data-pltdoc="x"><span class="techinside">phase level</span></a> within a single module. Every exported identifier must be imported or
defined. No expression can refer to a <a href="eval-model.html#%28tech._top._level._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">top-level variable</span></a>.
A <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> form in which the enclosing module&rsquo;s bindings are visible
(i.e., a nested <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> with <span class="RktVal">#f</span> instead of a <span class="RktVar">module-path</span>)
can define or import bindings that <a href="syntax-model.html#%28tech._shadow%29" class="techoutside" data-pltdoc="x"><span class="techinside">shadow</span></a> the enclosing module&rsquo;s bindings.</p><p>The evaluation of a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> form does not evaluate the
expressions in the body of the module. Evaluation merely declares a
module, whose full name depends both on <span class="RktVar">id</span> or
<span class="RktPn">(</span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._current-module-declare-name%29%29" class="RktValLink" data-pltdoc="x">current-module-declare-name</a></span><span class="RktPn">)</span>.</p><p>A module body is executed only when the module is explicitly
<a href="eval-model.html#%28tech._instantiate%29" data-pltdoc="x">instantiate</a>d via <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> or
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>. On invocation, imported modules are
instantiated in the order in which they are <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>d
into the module (although earlier instantiations or transitive
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s can trigger the instantiation of a module before
its order within a given module). Then, expressions and definitions
are evaluated in order as they appear within the module. Each
evaluation of an expression or definition is wrapped with a
continuation prompt (see <span class="RktSym"><a href="cont.html#%28def._%28%28quote._~23~25kernel%29._call-with-continuation-prompt%29%29" class="RktValLink" data-pltdoc="x">call-with-continuation-prompt</a></span>) for
the default <a href="eval-model.html#%28tech._prompt._tag%29" class="techoutside" data-pltdoc="x"><span class="techinside">prompt tag</span></a> and using a prompt handler that re-aborts
and propagates its argument to the next enclosing prompt. Each evaluation
of a definition is followed, outside of the prompt, by a check that
each of the definition&rsquo;s variables has a value; if the portion of the
prompt-delimited continuation that installs values is skipped, then
the <span class="RktSym"><a href="exns.html#%28def._%28%28quote._~23~25kernel%29._exn~3afail~3acontract~3avariable~3f%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract:variable?</a></span> exception is raised.</p><p>Accessing a <a href="eval-model.html#%28tech._module._level._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">module-level variable</span></a> before it is defined signals
a run-time error, just like accessing an undefined global variable.
If a module (in its fully expanded form) does not contain a
<span class="RktSym"><a href="set_.html#%28form._%28%28quote._~23~25kernel%29._set%21%29%29" class="RktStxLink" data-pltdoc="x">set!</a></span>  for an identifier that defined within the module, then
the identifier is a <span style="font-style: italic">constant</span> after it is defined; its value
cannot be changed afterward, not even through reflective
mechanisms. The <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._compile-enforce-module-constants%29%29" class="RktValLink" data-pltdoc="x">compile-enforce-module-constants</a></span> parameter,
however, can be used to disable enforcement of constants.</p><p>When a <a href="syntax-model.html#%28tech._syntax._object%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax object</span></a> representing a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> form has a
<a name="(idx._(gentag._82._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">module-language</span> <a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a> attached, and
when the property value is a vector of three elements where the first
is a module path (in the sense of <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path~3f%29%29" class="RktValLink" data-pltdoc="x">module-path?</a></span>) and the
second is a symbol, then the property value is preserved in the
corresponding compiled and/or declared module. The third component of
the vector should be printable and <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>able, so that it can
be preserved in marshaled bytecode. The <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>
and <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> languages attach
<span class="RktVal">'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/language-info</span><span class="stt"> </span><span class="RktVal">get-info</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span> to a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>
form. See also <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-compiled-language-info%29%29" class="RktValLink" data-pltdoc="x">module-compiled-language-info</a></span>,
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-~3elanguage-info%29%29" class="RktValLink" data-pltdoc="x">module-&gt;language-info</a></span>, and
<a href="running-sa.html#%28mod-path._racket%2Flanguage-info%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/language-info</span></a>.</p><p>If a <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> form has a single body <span class="RktVar">form</span> and if the
form is a <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%plain-module-begin</a></span> form, then the body
<span class="RktVar">form</span> is traversed to find <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> and
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> forms that are either immediate, under
<span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin%29%29" class="RktStxLink" data-pltdoc="x">begin</a></span>, or under <span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin-for-syntax%29%29" class="RktStxLink" data-pltdoc="x">begin-for-syntax</a></span>. (That is, the
body is searched before adding
any lexical context due to the module&rsquo;s initial <span class="RktVar">module-path</span>
import.) Each such module form is given a <a name="(idx._(gentag._83._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">submodule</span>
<a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a> that whose value is the initial module form.
Then, when <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> or <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> is expanded in a
submodule position, if the form has a <a name="(idx._(gentag._84._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">submodule</span>
<a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a>, the property value is used as the form to
expand. This protocol avoids the contamination of submodule lexical
scope when re-expanding <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> forms that contain submodules.</p><p>See also <a href="eval-model.html#%28part._module-eval-model%29" data-pltdoc="x">Modules and Module-Level Variables</a> and <a href="syntax-model.html#%28part._mod-parse%29" data-pltdoc="x">Module Phases and Visits</a>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span><span class="hspace">&nbsp;</span><span class="RktSym">duck</span><span class="hspace">&nbsp;</span><span class="RktSym">racket/base</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._provide%29%29" class="RktStxLink" data-pltdoc="x">provide</a></span><span class="hspace">&nbsp;</span><span class="RktSym">num-eggs</span><span class="hspace">&nbsp;</span><span class="RktSym">quack</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">num-eggs</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">quack</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="when_unless.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._unless%29%29" class="RktStxLink" data-pltdoc="x">unless</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._zero~3f%29%29" class="RktValLink" data-pltdoc="x">zero?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._printf%29%29" class="RktValLink" data-pltdoc="x">printf</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"quack\n"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">quack</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._sub1%29%29" class="RktValLink" data-pltdoc="x">sub1</a></span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((quote._~23~25kernel)._module*))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">module*</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktVar">module-path</span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">module*</a></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=Module_Syntax.html%23%2528part._submodules%2529&amp;version=6.1" class="Sq" data-pltdoc="x">Submodules</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span>.</p></blockquote></blockquote></blockquote></div></p><p>Like <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>, but only for declaring a <a href="eval-model.html#%28tech._submodule%29" class="techoutside" data-pltdoc="x"><span class="techinside">submodule</span></a> within
a module, and for submodules that may <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> the enclosing module.</p><p>Instead of a <span class="RktVar">module-path</span> after <span class="RktVar">id</span>, <span class="RktVal">#f</span>
indicates that all bindings from the enclosing module are visible in
the submodule; <span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin-for-syntax%29%29" class="RktStxLink" data-pltdoc="x">begin-for-syntax</a></span> forms that wrap the
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> form shift the <a href="syntax-model.html#%28tech._phase._level%29" class="techoutside" data-pltdoc="x"><span class="techinside">phase level</span></a> of the enclosing
module&rsquo;s bindings relative to the submodule.  When a
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> form has a <span class="RktVar">module-path</span>, the submodule
starts with an empty lexical context in the same way as a top-level
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> form, and enclosing <span class="RktSym"><a href="begin.html#%28form._%28%28quote._~23~25kernel%29._begin-for-syntax%29%29" class="RktStxLink" data-pltdoc="x">begin-for-syntax</a></span> forms
have no effect on the submodule.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/base..rkt)._module+))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">module+</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=Module_Syntax.html%23%2528part._main-and-test%2529&amp;version=6.1" class="Sq" data-pltdoc="x">Main and Test Submodules</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span>.</p></blockquote></blockquote></blockquote></div></p><p>Declares and/or adds to a <a href="eval-model.html#%28tech._submodule%29" class="techoutside" data-pltdoc="x"><span class="techinside">submodule</span></a> named <span class="RktVar">id</span>.</p><p>Each addition for <span class="RktVar">id</span> is combined in order to form the entire
submodule using <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span><span class="stt"> </span><span class="RktVar">id</span><span class="stt"> </span><span class="RktVal">#f</span><span class="stt"> </span><span class="RktSym">....</span><span class="RktPn">)</span> at the end of the
enclosing module. If there is only one <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span> for a given
<span class="RktVar">id</span>, then <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span><span class="stt"> </span><span class="RktVar">id</span><span class="stt"> </span><span class="RktVar">form</span><span class="stt"> </span><span class="RktMeta"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span> is equivalent to
<span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span><span class="stt"> </span><span class="RktVar">id</span><span class="stt"> </span><span class="RktVal">#f</span><span class="stt"> </span><span class="RktVar">form</span><span class="stt"> </span><span class="RktMeta"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span>, but still moved to the end of the
enclosing module.</p><p>When a module contains multiple submodules declared with
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span>, then the relative order of the initial
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span> declarations for each submodule determines the
relative order of the <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> declarations at the end of the
enclosing module.</p><p>A submodule must not be defined using <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span> <span style="font-style: italic">and</span>
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> or <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span>. That is, if a submodule is made
of <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span> pieces, then it must be made <span style="font-style: italic">only</span> of
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span> pieces. </p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/base..rkt)._~23~25module-begin))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">#%module-begin</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Legal only in a <a href="syntax-model.html#%28tech._module._begin._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module begin context</span></a>, and handled by the
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> and <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> forms.</div></p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%module-begin</a></span> form of <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> wraps
every top-level expression to print non-<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=void_undefined.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#&lt;void&gt;</span></span></a> results using
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%module-begin</a></span> form of <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> also
declares a <span class="RktSym">configure-runtime</span> submodule (before any other
<span class="RktVar">form</span>), unless some <span class="RktVar">form</span> is either an immediate
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> or <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> form with the name
<span class="RktSym">configure-runtime</span>. If a <span class="RktSym">configure-runtime</span> submodule
is added, the submodule calls the <span class="RktSym">configure</span> function of
<a href="running-sa.html#%28mod-path._racket%2Fruntime-config%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/runtime-config</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/base..rkt)._~23~25printing-module-begin))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25printing-module-begin%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">#%printing-module-begin</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Legal only in a <a href="syntax-model.html#%28tech._module._begin._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module begin context</span></a>.</div></p><p>Like <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%module-begin</a></span>, but without adding a
<span class="RktSym">configure-runtime</span> submodule.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._racket/private/base..rkt)._~23~25plain-module-begin))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-module-begin%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">#%plain-module-begin</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">form</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Legal only in a <a href="syntax-model.html#%28tech._module._begin._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module begin context</span></a>, and handled by the
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> and <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%2A%29%29" class="RktStxLink" data-pltdoc="x">module*</a></span> forms.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((quote._~23~25kernel)._~23~25declare))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._~23~25declare%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">#%declare</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">declaration-keyword</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt">&nbsp;</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">declaration-keyword</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><span class="RktPn">#:cross-phase-persistent</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Declarations that affect run-time or reflective properties of the
module:</div></p><ul><li><p><a name="(idx._(gentag._85._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktPn">#:cross-phase-persistent</span> &#8212;<wbr></wbr> declares the
module as <a href="eval-model.html#%28tech._cross._phase._persistent%29" class="techoutside" data-pltdoc="x"><span class="techinside">cross-phase persistent</span></a>, and reports a syntax
error if the module does not meet the import or syntactic
constraints of a <a href="eval-model.html#%28tech._cross._phase._persistent%29" class="techoutside" data-pltdoc="x"><span class="techinside">cross-phase persistent</span></a> module.</p></li></ul><p>A <span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._~23~25declare%29%29" class="RktStxLink" data-pltdoc="x">#%declare</a></span> form must appear in a <a href="syntax-model.html#%28tech._module._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module
context</span></a> or a <a href="syntax-model.html#%28tech._module._begin._context%29" class="techoutside" data-pltdoc="x"><span class="techinside">module-begin context</span></a>. Each
<span class="RktVar">declaration-keyword</span> can be declared at most once within a
<span class="RktSym"><a href="#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> body.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="syntax.html" title="backward to &quot;3 Syntactic Forms&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="syntax.html" title="up to &quot;3 Syntactic Forms&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="require.html" title="forward to &quot;3.2 Importing and Exporting: require and provide&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>