/usr/share/doc/racket/compatibility/compatibility-package.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 | <!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>2 Limiting Scope: define-package, open-package, ...</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.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="../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="../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,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Compatibility:<span class="mywbr"> </span> Features from Racket Relatives</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="defmacro.html" class="tocviewlink" data-pltdoc="x">Legacy macro support</a></td></tr><tr><td align="right">2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Limiting Scope:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>package</span></span>, <span class="RktSym"><span class="RktStxLink">open-<wbr></wbr>package</span></span>, ...</a></td></tr><tr><td align="right">3 </td><td><a href="mlists.html" class="tocviewlink" data-pltdoc="x">Mutable List Functions</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</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,"tocview_1");">►</a></td><td>2 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Limiting Scope:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>package</span></span>, <span class="RktSym"><span class="RktStxLink">open-<wbr></wbr>package</span></span>, ...</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">2.1 </td><td><a href="#%28part._.Legacy_.Racket_.Package_.Library%29" class="tocviewlink" data-pltdoc="x">Legacy Racket Package Library</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%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>package</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">open-<wbr></wbr>package</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">package-<wbr></wbr>begin</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define*</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-values%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define*-<wbr></wbr>values</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-syntax%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define*-<wbr></wbr>syntax</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-syntaxes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define*-<wbr></wbr>syntaxes</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open%2A-package%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">open*-<wbr></wbr>package</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">package?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-exported-identifiers%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">package-<wbr></wbr>exported-<wbr></wbr>identifiers</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-original-identifiers%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">package-<wbr></wbr>original-<wbr></wbr>identifiers</span></span></a></td></tr><tr><td><span class="tocsublinknumber">2.1<tt> </tt></span><a href="#%28part._.Legacy_.Racket_.Package_.Library%29" class="tocsubseclink" data-pltdoc="x">Legacy Racket Package Library</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, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="defmacro.html" title="backward to "1 Legacy macro support"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Compatibility: Features from Racket Relatives"" data-pltdoc="x">up</a> <a href="mlists.html" title="forward to "3 Mutable List Functions"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "compatibility/scribblings/compatibility.scrbl")" x-part-tag=""compatibility-package"">2<tt> </tt><a name="(part._compatibility-package)"></a><a name="(mod-path._compatibility/package)"></a>Limiting Scope: <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span>, ...</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">compatibility/package</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">compatibility-lib</span></span></td></tr></table></p><p>This <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">compatibility/package</span></a> library provides support for
the Chez Scheme module system. Support for packages is provided
primarily to help porting code.</p><p>Use of packages for modern Racket code is discouraged.
Instead, consider using
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=eval-model.html%23%2528tech._submodule%2529&version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">submodules</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._compatibility/package..rkt)._define-package))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-package</a></span></span><span class="hspace"> </span><span class="RktVar">package-id</span><span class="hspace"> </span><span class="RktVar">exports</span><span class="hspace"> </span><span class="RktVar">form</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><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._compatibility/package..rkt)._open-package))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">open-package</a></span></span><span class="hspace"> </span><span class="RktVar">package-id</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">exports</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:only</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:all-defined</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:all-defined-except</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>The <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> form is based on the <span class="RktSym">module</span>
form of Chez Scheme [<a href="doc-bibliography.html#%28cite._.Waddell99%29" data-pltdoc="x">Waddell99</a>].</p></blockquote></blockquote></blockquote></div></p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> form is similar to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=module.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._module%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">module</a></span>, except
that it can appear in any definition context. The <span class="RktVar">form</span>s
within a <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> form can be definitions or
expressions; definitions are not visible outside the
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> form, but <span class="RktVar">exports</span> determines a subset
of the bindings that can be made visible outside the package using
the definition form <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span><span class="stt"> </span><span class="RktVar">package-id</span><span class="RktPn">)</span>.</p><p>The <span class="RktPn">(</span><span class="RktVar">id</span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span> and <span class="RktPn">#:only</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktVar">id</span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span> <span class="RktVar">exports</span>
forms are equivalent: exactly the listed <span class="RktVar">id</span>s are
exported. The <span class="RktPn">#:all-defined</span> form exports all definitions from
the package body, and <span class="RktPn">#:all-defined-except</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktVar">id</span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span> exports
all definitions except the listed <span class="RktVar">id</span>s.</p><p>All of the usual definition forms work within a
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> body, and such definitions are visible to all
expressions within the body (and, in particular, the definitions can
refer to each other). However, <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> handles
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A%29%29" class="RktStxLink" data-pltdoc="x">define*</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-syntax%29%29" class="RktStxLink" data-pltdoc="x">define*-syntax</a></span>, <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-values%29%29" class="RktStxLink" data-pltdoc="x">define*-values</a></span>,
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-syntaxes%29%29" class="RktStxLink" data-pltdoc="x">define*-syntaxes</a></span>, and
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open%2A-package%29%29" class="RktStxLink" data-pltdoc="x">open*-package</a></span> specially: the bindings introduced by those
forms within a <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> body are visible only to
<span class="RktVar">form</span>s that appear later in the body, and they can shadow any
binding from preceding <span class="RktVar">form</span>s (even if the preceding binding
did not use one of the special <span class="RktSym">*</span> definition forms). If
an exported identifier is defined multiple times, the last definition
is the exported one.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</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">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span><span class="hspace"> </span><span class="RktSym">presents</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">doll</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">doll</span><span class="hspace"> </span><span class="RktVal">"Molly Coddle"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">robot</span><span class="hspace"> </span><span class="RktVal">"Destructo"</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><tr><td><span class="stt">> </span><span class="RktSym">doll</span></td></tr><tr><td><p><span class="RktErr">doll: undefined;</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">cannot reference undefined identifier</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktSym">robot</span></td></tr><tr><td><p><span class="RktErr">robot: undefined;</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">cannot reference undefined identifier</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span><span class="hspace"> </span><span class="RktSym">presents</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktSym">doll</span></td></tr><tr><td><p><span class="RktRes">"Molly Coddle"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktSym">robot</span></td></tr><tr><td><p><span class="RktErr">robot: undefined;</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">cannot reference undefined identifier</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span><span class="hspace"> </span><span class="RktSym">big-russian-doll</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">middle-russian-doll</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span><span class="hspace"> </span><span class="RktSym">middle-russian-doll</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">little-russian-doll</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">little-russian-doll</span><span class="hspace"> </span><span class="RktVal">"Anastasia"</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><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span><span class="hspace"> </span><span class="RktSym">big-russian-doll</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span><span class="hspace"> </span><span class="RktSym">middle-russian-doll</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktSym">little-russian-doll</span></td></tr><tr><td><p><span class="RktRes">"Anastasia"</span></p></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._((lib._compatibility/package..rkt)._package-begin))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">package-begin</a></span></span><span class="hspace"> </span><span class="RktVar">form</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Similar to <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span>, but it only limits the visible of
definitions without binding a package name. If the last <span class="RktVar">form</span>
is an expression, then the expression is in
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=eval-model.html%23%2528tech._tail._position%2529&version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">tail position</span></a>
for the <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span> form, so that its result is the
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span> result.</div></p><p>A <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span> form can be used as an expression, but if it
is used in a context where definitions are allowed, then the
definitions are essentially spliced into the enclosing context (though
the defined bindings remain hidden outside the
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span>).</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</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">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">secret</span><span class="hspace"> </span><span class="RktVal">"mimi"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktSym">secret</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'("mimi")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktSym">secret</span></td></tr><tr><td><p><span class="RktErr">secret: undefined;</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">cannot reference undefined identifier</span></p></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><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._compatibility/package..rkt)._define*))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define*</a></span></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._compatibility/package..rkt)._define*-values))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-values%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define*-values</a></span></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._compatibility/package..rkt)._define*-syntax))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-syntax%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define*-syntax</a></span></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._compatibility/package..rkt)._define*-syntaxes))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A-syntaxes%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define*-syntaxes</a></span></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._compatibility/package..rkt)._open*-package))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open%2A-package%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">open*-package</a></span></span></p></blockquote></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Equivalent to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span>, <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span>,
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-syntax</a></span>, <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-syntaxes%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-syntaxes</a></span>,
and <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span>, except within a
<span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span> or <span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span> form, where they
create bindings that are visible only to later body forms.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</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">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span><span class="hspace"> </span><span class="RktSym">mail</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">cookies</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A%29%29" class="RktStxLink" data-pltdoc="x">define*</a></span><span class="hspace"> </span><span class="RktSym">cookies</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">sugar</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define%2A%29%29" class="RktStxLink" data-pltdoc="x">define*</a></span><span class="hspace"> </span><span class="RktSym">cookies</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">cons</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">chocolate-chip</span><span class="hspace"> </span><span class="RktSym">cookies</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><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open-package%29%29" class="RktStxLink" data-pltdoc="x">open-package</a></span><span class="hspace"> </span><span class="RktSym">mail</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktSym">cookies</span></td></tr><tr><td><p><span class="RktRes">'(chocolate-chip sugar)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._define-syntax-rule%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-syntax-rule</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">define-seven</span><span class="hspace"> </span><span class="RktSym">id</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">id</span><span class="hspace"> </span><span class="RktVal">7</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._define-syntax-rule%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-syntax-rule</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">define*-seven</span><span class="hspace"> </span><span class="RktSym">id</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=begin.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._begin%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">begin</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._define-package%29%29" class="RktStxLink" data-pltdoc="x">define-package</a></span><span class="hspace"> </span><span class="RktSym">p</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">id</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">define-seven</span><span class="hspace"> </span><span class="RktSym">id</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._open%2A-package%29%29" class="RktStxLink" data-pltdoc="x">open*-package</a></span><span class="hspace"> </span><span class="RktSym">p</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><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._compatibility%2Fpackage..rkt%29._package-begin%29%29" class="RktStxLink" data-pltdoc="x">package-begin</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">vii</span><span class="hspace"> </span><span class="RktVal">8</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">define*-seven</span><span class="hspace"> </span><span class="RktSym">vii</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym">vii</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">7</span></p></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><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._compatibility/package..rkt)._package~3f))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">package?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._compatibility/package..rkt)._package-exported-identifiers))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-exported-identifiers%29%29" class="RktValDef RktValLink" data-pltdoc="x">package-exported-identifiers</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fstx..rkt%2529._identifier%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">identifier?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fstx..rkt%2529._identifier%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">identifier?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._compatibility/package..rkt)._package-original-identifiers))"></a><span title="Provided from: compatibility/package | Package: compatibility-lib"><span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-original-identifiers%29%29" class="RktValDef RktValLink" data-pltdoc="x">package-original-identifiers</a></span></span><span class="hspace"> </span><span class="RktVar">id</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fstx..rkt%2529._identifier%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">identifier?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fstx..rkt%2529._identifier%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">identifier?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">The <span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package~3f%29%29" class="RktValLink" data-pltdoc="x">package?</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-exported-identifiers%29%29" class="RktValLink" data-pltdoc="x">package-exported-identifiers</a></span>, and
<span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-original-identifiers%29%29" class="RktValLink" data-pltdoc="x">package-original-identifiers</a></span> functions are exported
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">for-syntax</a></span> by <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">compatibility/package</span></a>.</div></p><p>The <span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package~3f%29%29" class="RktValLink" data-pltdoc="x">package?</a></span> predicate returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a
package value as obtained by <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxtrans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-local-value%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax-local-value</a></span> on an
identifier that is bound to a package.</p><p>Given such an identifier, the <span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-exported-identifiers%29%29" class="RktValLink" data-pltdoc="x">package-exported-identifiers</a></span>
function returns a list of identifiers that correspond to the
bindings that would be introduced by opening the package in the
lexical context being expanded. The
<span class="RktSym"><a href="#%28def._%28%28lib._compatibility%2Fpackage..rkt%29._package-original-identifiers%29%29" class="RktValLink" data-pltdoc="x">package-original-identifiers</a></span> function returns a parallel list
of identifiers for existing bindings of package’s exports.</p><a name="(part._.Legacy_.Racket_.Package_.Library)"></a><a name="(mod-path._racket/package)"></a><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fpackage%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/package</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">compatibility-lib</span></span></td></tr></table></div><div class="SIntrapara">The <span class="RktSym">racket/package</span> library
re-exports <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">compatibility/package</span></a> for backward
compatibility.</div></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, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="defmacro.html" title="backward to "1 Legacy macro support"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Compatibility: Features from Racket Relatives"" data-pltdoc="x">up</a> <a href="mlists.html" title="forward to "3 Mutable List Functions"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|