205 lines
No EOL
99 KiB
HTML
205 lines
No EOL
99 KiB
HTML
<!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"/><meta name="viewport" content="width=device-width, initial-scale=0.8"/><title>18.2 Libraries and Collections</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="../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,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">The Racket Reference</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewselflink" 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,"tocview_1");">▼</a></td><td>18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.1 </td><td><a href="running-sa.html" class="tocviewlink" data-pltdoc="x">Running Racket or GRacket</a></td></tr><tr><td align="right">18.2 </td><td><a href="collects.html" class="tocviewselflink" data-pltdoc="x">Libraries and Collections</a></td></tr><tr><td align="right">18.3 </td><td><a href="Interactive_Help.html" class="tocviewlink" data-pltdoc="x">Interactive Help</a></td></tr><tr><td align="right">18.4 </td><td><a href="interaction-info.html" class="tocviewlink" data-pltdoc="x">Interaction Configuration</a></td></tr><tr><td align="right">18.5 </td><td><a href="interactive.html" class="tocviewlink" data-pltdoc="x">Interactive Module Loading</a></td></tr><tr><td align="right">18.6 </td><td><a href="debugging.html" class="tocviewlink" data-pltdoc="x">Debugging</a></td></tr><tr><td align="right">18.7 </td><td><a href="compiler.html" class="tocviewlink" data-pltdoc="x">Controlling and Inspecting Compilation</a></td></tr><tr><td align="right">18.8 </td><td><a href="Kernel_Forms_and_Functions.html" class="tocviewlink" data-pltdoc="x">Kernel Forms and Functions</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_2");">►</a></td><td>18.2 </td><td><a href="collects.html" class="tocviewselflink" data-pltdoc="x">Libraries and Collections</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.2.1 </td><td><a href="collects.html#%28part._collects-search%29" class="tocviewlink" data-pltdoc="x">Collection Search Configuration</a></td></tr><tr><td align="right">18.2.2 </td><td><a href="collects.html#%28part._links-file%29" class="tocviewlink" data-pltdoc="x">Collection Links</a></td></tr><tr><td align="right">18.2.3 </td><td><a href="collects.html#%28part._collects-api%29" class="tocviewlink" data-pltdoc="x">Collection Paths and Parameters</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">18.2.1<tt> </tt></span><a href="collects.html#%28part._collects-search%29" class="tocsubseclink" data-pltdoc="x">Collection Search Configuration</a></td></tr><tr><td><span class="tocsublinknumber">18.2.2<tt> </tt></span><a href="collects.html#%28part._links-file%29" class="tocsubseclink" data-pltdoc="x">Collection Links</a></td></tr><tr><td><span class="tocsublinknumber">18.2.3<tt> </tt></span><a href="collects.html#%28part._collects-api%29" class="tocsubseclink" data-pltdoc="x">Collection Paths and Parameters</a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-paths%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">find-<wbr></wbr>library-<wbr></wbr>collection-<wbr></wbr>paths</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-links%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">find-<wbr></wbr>library-<wbr></wbr>collection-<wbr></wbr>links</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">collection-<wbr></wbr>file-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">collection-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>library-<wbr></wbr>collection-<wbr></wbr>paths</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">current-<wbr></wbr>library-<wbr></wbr>collection-<wbr></wbr>links</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">use-<wbr></wbr>user-<wbr></wbr>specific-<wbr></wbr>search-<wbr></wbr>paths</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">use-<wbr></wbr>collection-<wbr></wbr>link-<wbr></wbr>paths</span></span></a></td></tr><tr><td><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._read-installation-configuration-table%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">read-<wbr></wbr>installation-<wbr></wbr>configuration-<wbr></wbr>table</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" id="searchbox" type="text" tabindex="1" placeholder="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "8.6", "../");"/></form> <a href="https://docs.racket-lang.org/index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("8.6");">top</a><span class="tocsettoggle"> <a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright"> <a href="running-sa.html" title="backward to "18.1 Running Racket or GRacket"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="Interactive_Help.html" title="forward to "18.3 Interactive Help"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""collects"">18.2<tt> </tt><a name="(part._collects)"></a>Libraries and Collections</h4><p>A <a name="(tech._library)"></a><span style="font-style: italic">library</span> is <span class="RktSym"><a href="module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> declaration for use by multiple
|
|
programs. Racket further groups libraries into <a name="(tech._collection)"></a><span style="font-style: italic">collections</span>.
|
|
Typically, collections are added via <a name="(tech._package)"></a><span style="font-style: italic">packages</span> (see
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=pkg&rel=index.html&version=8.6" class="Sq" data-pltdoc="x">Package Management in Racket</a>); the package manager
|
|
works outside of the Racket core, but it configures the core run-time
|
|
system through <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a>.</p><p>Libraries in collections are referenced through <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span> paths
|
|
(see <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 symbolic shorthands. For example, the
|
|
following module uses the <span class="stt">"getinfo.rkt"</span> library module from
|
|
the <span class="stt">"setup"</span> collection, and the <span class="stt">"cards.rkt"</span> library
|
|
module from the <span class="stt">"games"</span> collection’s <span class="stt">"cards"</span>
|
|
subcollection:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="hspace"> </span><a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a></td></tr><tr><td><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="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="hspace"> </span><span class="RktVal">"setup/getinfo.rkt"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="hspace"> </span><span class="RktVal">"games/cards/cards.rkt"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym">....</span></td></tr></table></blockquote><p>This example is more compactly and more commonly written using
|
|
symbolic shorthands:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="hspace"> </span><a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a></td></tr><tr><td><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="hspace"> </span><span class="RktSym">setup/getinfo</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">games/cards/cards</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym">....</span></td></tr></table></blockquote><p>When an identifier <span class="RktVar">id</span> is used in a <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> form, it
|
|
is converted to <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVar">rel-string</span><span class="RktPn">)</span> where <span class="RktVar">rel-string</span>
|
|
is the string form of <span class="RktVar">id</span>.</p><p>A <span class="RktVar">rel-string</span> in <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVar">rel-string</span><span class="RktPn">)</span> consists of one
|
|
or more path elements that name collections, and then a final path
|
|
element that names a library file; the path elements are separated by
|
|
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">/</span><span class="hspace"></span></span>. If <span class="RktVar">rel-string</span> contains no <span class="RktInBG"><span class="hspace"></span><span class="RktIn">/</span><span class="hspace"></span></span>s, then
|
|
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">/main.rkt</span><span class="hspace"></span></span> is implicitly appended to the path. If
|
|
<span class="RktVar">rel-string</span> contains <span class="RktInBG"><span class="hspace"></span><span class="RktIn">/</span><span class="hspace"></span></span> but does not end with a file
|
|
suffix, then <span class="RktInBG"><span class="hspace"></span><span class="RktIn">.rkt</span><span class="hspace"></span></span> is implicitly appended to the path.</p><p>Libraries also can be distributed via <span class="planetName">PLaneT</span> packages. Such
|
|
libraries are referenced through a <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._planet%29%29" class="RktStxLink" data-pltdoc="x">planet</a></span> module path (see
|
|
<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 are downloaded by Racket on demand, instead of
|
|
referenced through <a href="collects.html#%28tech._collection%29" class="techoutside" data-pltdoc="x"><span class="techinside">collections</span></a>.</p><p>The translation of a <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._planet%29%29" class="RktStxLink" data-pltdoc="x">planet</a></span> or <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span> path to a
|
|
<span class="RktSym"><a href="module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> declaration is determined by the <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name
|
|
resolver</span></a>, as specified by the <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._current-module-name-resolver%29%29" class="RktValLink" data-pltdoc="x">current-module-name-resolver</a></span>
|
|
parameter.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""collects-search"">18.2.1<tt> </tt><a name="(part._collects-search)"></a>Collection Search Configuration</h5><p>For the default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a>, the search path for
|
|
collections is determined by the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> parameter and the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> parameter:</p><ul><li><p>The most primitive <a href="collects.html#%28tech._collection%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection</span></a>-based modules are located
|
|
in <span class="stt">"collects"</span> directory relative to the Racket
|
|
executable. Libraries for a collection are grouped within a
|
|
directory whose name matches the collection name. The path to
|
|
the <span class="stt">"collects"</span> directory is normally included in
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span>.</p></li><li><p>Collection-based libraries also can be installed other
|
|
directories, perhaps user-specific, that are structured like
|
|
the <span class="stt">"collects"</span> directory. Those additional directories
|
|
can be included in the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> parameter either
|
|
dynamically, through command-line arguments to <span class="stt">racket</span>,
|
|
or by setting the <span class="stt">PLTCOLLECTS</span> environment variable;
|
|
see <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-paths</a></span>.</p></li><li><p><a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">Collection links files</span></a> provide a mapping from top-level
|
|
collection names to directories, plus additional
|
|
<span class="stt">"collects"</span>-like directories (that have subdirectories
|
|
with names that match collection names). Each <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection
|
|
links file</span></a> to be searched is referenced by the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> parameter; the parameter
|
|
references the file, and not the file’s content, so
|
|
that changes to the file can be detected and affect later
|
|
module resolution. See also
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-links</a></span>.</p></li><li><p>The <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> parameter’s value
|
|
can also include hash tables that provide the same content as
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a>: a mapping from collection names
|
|
in symbol form to a list of paths for the collection, or from
|
|
<span class="RktVal">#f</span> to a list of <span class="stt">"collects"</span>-like paths.</p></li><li><p>Finally, the <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span>
|
|
parameter’s value includes <span class="RktVal">#f</span> to indicate the point in
|
|
the search process at which the <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module-name resolver</span></a> should
|
|
check <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> relative to the
|
|
files and hash tables in <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span>.</p></li></ul><p>To resolve a module reference <span class="RktVar">rel-string</span>, the default
|
|
<a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> searches collection links in
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> from first to last to locate
|
|
the first directory that contains <span class="RktVar">rel-string</span>, splicing a
|
|
search through in <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> where in
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> contains <span class="RktVal">#f</span>. The
|
|
filesystem tree for each element in the link table and search path is
|
|
effectively <a name="(tech._collection._splicing)"></a><span style="font-style: italic">spliced</span> together with the filesystem trees of other path
|
|
elements that correspond to the same collection. Some Racket tools
|
|
rely on unique resolution of module path names, so an installation and
|
|
configuration should not allow multiple files to match the same
|
|
collection and file combination.</p><p>The value of the <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> parameter
|
|
is initialized by the <span class="stt">racket</span> executable to the result of
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-links</a></span><span class="RktPn">)</span>, and the value of the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> parameter is initialized to
|
|
the result of <span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-paths</a></span><span class="RktPn">)</span>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""links-file"">18.2.2<tt> </tt><a name="(part._links-file)"></a>Collection Links</h5><p><a name="(tech._collection._links._file)"></a><span style="font-style: italic">Collection links files</span> are used by
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>, <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="RktValLink" data-pltdoc="x">collection-path</a></span>, and the
|
|
default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> to locate collections before
|
|
trying the <span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span><span class="RktPn">)</span> search
|
|
path. The <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a> to use are determined by the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span> parameter, which is
|
|
initialized to the result of <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-links</a></span>.</p><p>A <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links file</span></a> is <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> with default reader
|
|
parameter settings to obtain a list. Every element of the list must be
|
|
a link specification with one of the forms <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVar">string</span><span class="stt"> </span><span class="RktVar">encoded-path</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVar">string</span><span class="stt"> </span><span class="RktVar">encoded-path</span><span class="stt"> </span><span class="RktVar">regexp</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">root</span><span class="stt"> </span><span class="RktVar">encoded-path</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">root</span><span class="stt"> </span><span class="RktVar">encoded-path</span><span class="stt"> </span><span class="RktVar">regexp</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">static-root</span><span class="stt"> </span><span class="RktVar">encoded-path</span><span class="RktPn">)</span>, <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">static-root</span><span class="stt"> </span><span class="RktVar">encoded-path</span><span class="stt"> </span><span class="RktVar">regexp</span><span class="RktPn">)</span>.
|
|
A <span class="RktVar">string</span> names a
|
|
top-level <a href="collects.html#%28tech._collection%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection</span></a>, in which case <span class="RktVar">encoded-path</span> describes a path
|
|
that can be used as the collection’s path (directly, as opposed to a
|
|
subdirectory of <span class="RktVar">encoded-path</span> named by <span class="RktVar">string</span>). A
|
|
<span class="RktVal">'</span><span class="RktVal">root</span> entry, in contrast, acts like an path in
|
|
<span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span><span class="RktPn">)</span>. A
|
|
<span class="RktVal">'</span><span class="RktVal">static-root</span> entry is like a <span class="RktVal">'</span><span class="RktVal">root</span> entry, but
|
|
where the immediate content of the directory is assumed not to change unless the
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links file</span></a> changes.
|
|
Each <span class="RktVar">encoded-path</span> is either a string, a
|
|
byte string that is converted to a path with <span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._bytes-~3epath%29%29" class="RktValLink" data-pltdoc="x">bytes->path</a></span>,
|
|
or a list of relative path-element byte strings, <span class="RktVal">'</span><span class="RktVal">up</span>, and <span class="RktVal">'</span><span class="RktVal">same</span>
|
|
indicators that are combined with <span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._build-path%29%29" class="RktValLink" data-pltdoc="x">build-path</a></span> with the byte
|
|
strings converted with <span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._bytes-~3epath-element%29%29" class="RktValLink" data-pltdoc="x">bytes->path-element</a></span>.
|
|
If <span class="RktVar">encoded-path</span> describes a
|
|
relative path, it is relative to the directory containing the
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links file</span></a>. If <span class="RktVar">regexp</span> is specified in a
|
|
link, then the link is used only if <span class="RktPn">(</span><span class="RktSym"><a href="regexp.html#%28def._%28%28quote._~23~25kernel%29._regexp-match~3f%29%29" class="RktValLink" data-pltdoc="x">regexp-match?</a></span><span class="stt"> </span><span class="RktVar">regexp</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._version%29%29" class="RktValLink" data-pltdoc="x">version</a></span><span class="RktPn">)</span><span class="RktPn">)</span> produces a true result.</p><p>A single top-level collection can have multiple links in a
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links file</span></a>, and any number of <span class="RktVal">'</span><span class="RktVal">root</span> entries
|
|
can appear. The corresponding paths are effectively spliced together,
|
|
since the paths are tried in order to locate a file or sub-collection.</p><p>The <span class="stt">raco link</span> command-link tool can display, install, and
|
|
remove links in a <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links file</span></a>. See <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=link.html&version=8.6" class="Sq" data-pltdoc="x"><span class="stt">raco link</span>: Library Collection Links</a> in <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=index.html&version=8.6" class="Sq" data-pltdoc="x"><span class="stt">raco</span>: Racket Command-Line Tools</a> for more information.</p><p class="SHistory">Changed in version 8.1.0.6 of package <span class="stt">base</span>: Changed <span class="RktVar">encoded-path</span> to
|
|
allow bytes strings and lists.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-source-pkg="racket-doc" x-part-tag=""collects-api"">18.2.3<tt> </tt><a name="(part._collects-api)"></a>Collection Paths and Parameters</h5><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>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._find-library-collection-paths))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">find-library-collection-paths</a></span></span></td><td valign="top"><span class="hspace"> </span><span class="RktOpt">[</span></td><td valign="top"><span class="RktVar">pre-extras</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">post-extras</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">config</span><span class="RktOpt">]</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">name</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-extras</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">post-extras</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">config</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._read-installation-configuration-table%29%29" class="RktValLink" data-pltdoc="x">read-installation-configuration-table</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._get-installation-name%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">get-installation-name</a></span><span class="hspace"> </span><span class="RktVar">config</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a list of paths, which is normally used to initialize
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span>, as follows:</div></p><ul><li><p>The path produced by <span class="RktPn">(</span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._build-path%29%29" class="RktValLink" data-pltdoc="x">build-path</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">name</span><span class="stt"> </span><span class="RktVal">"collects"</span><span class="RktPn">)</span> is the first element of the
|
|
default collection path list, unless the value of the
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> parameter is <span class="RktVal">#f</span>.</p></li><li><p>Extra directories provided in <span class="RktVar">pre-extras</span> are included
|
|
next to the default collection path list, converted to complete
|
|
paths relative to the executable.</p></li><li><p>If the directory specified by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">collects-dir</span><span class="RktPn">)</span> is absolute, or if it is relative (to the
|
|
executable) and it exists, then it is added to the end of the
|
|
default collection path list.</p></li><li><p>Extra directories provided in <span class="RktVar">post-extras</span> are included
|
|
last in the default collection path list, converted to complete
|
|
paths relative to the executable.</p></li><li><p>If <span class="RktVar">config</span> has a value for
|
|
<span class="RktVal">'</span><span class="RktVal">collects-search-dirs</span>, then it is used in place of the
|
|
default collection path list (as constructed by the preceding three
|
|
bullets), and the default is spliced in place of any <span class="RktVal">#f</span>
|
|
within the <span class="RktVal">'</span><span class="RktVal">collects-search-dirs</span> list. If <span class="RktVar">config</span>
|
|
does not have a <span class="RktVal">'</span><span class="RktVal">collects-search-dirs</span> value, then the
|
|
default collection path list is used.</p></li><li><p>If the <a name="(idx._(gentag._562._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">PLTCOLLECTS</span> environment variable is
|
|
defined, it is combined with the default list using
|
|
<span class="RktSym"><a href="Filesystem.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-list-string-~3epath-list%29%29" class="RktValLink" data-pltdoc="x">path-list-string->path-list</a></span>, as long as the value of
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> is true. If it is not
|
|
defined or if the value <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> is
|
|
<span class="RktVal">#f</span>, the collection path list as constructed by the
|
|
preceding four bullets is used directly.</p><p>Note that on Unix and Mac OS, paths are separated by <span class="RktInBG"><span class="hspace"></span><span class="RktIn">:</span><span class="hspace"></span></span>, and
|
|
on Windows by <span class="RktInBG"><span class="hspace"></span><span class="RktIn">;</span><span class="hspace"></span></span>. Also,
|
|
<span class="RktSym"><a href="Filesystem.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-list-string-~3epath-list%29%29" class="RktValLink" data-pltdoc="x">path-list-string->path-list</a></span> splices the default paths at an
|
|
empty path, for example, with many Unix shells you can set
|
|
<span class="stt">PLTCOLLECTS</span> to <span class="stt">":</span><span class="stt">‘</span><span class="stt">pwd</span><span class="stt">‘</span><span class="stt">"</span>, <span class="stt">"</span><span class="stt">‘</span><span class="stt">pwd</span><span class="stt">‘</span><span class="stt">:"</span>, or
|
|
<span class="stt">"</span><span class="stt">‘</span><span class="stt">pwd</span><span class="stt">‘</span><span class="stt">"</span> to specify search the current directory after, before,
|
|
or instead of the default paths, respectively.</p></li></ul><p class="SHistory">Changed in version 8.4.0.3 of package <span class="stt">base</span>: Added the <span class="RktVar">config</span> and
|
|
<span class="RktVar">name</span> arguments.</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>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._find-library-collection-links))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-links%29%29" class="RktValDef RktValLink" data-pltdoc="x">find-library-collection-links</a></span></span><span class="hspace"> </span><span class="RktOpt">[</span><span class="RktVar">config</span><span class="RktOpt">]</span><span class="hspace"> </span><span class="RktVar">name</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">config</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._read-installation-configuration-table%29%29" class="RktValLink" data-pltdoc="x">read-installation-configuration-table</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._get-installation-name%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">get-installation-name</a></span><span class="hspace"> </span><span class="RktVar">config</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a list of paths and <span class="RktVal">#f</span>, which is normally used to
|
|
initialize <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span>, as follows:</div></p><ul><li><p>The list starts with <span class="RktVal">#f</span>, which causes the default
|
|
<a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a>, <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>,
|
|
and <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="RktValLink" data-pltdoc="x">collection-path</a></span> to try paths in
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> before
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a>.</p></li><li><p>As long as the values of
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> and
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValLink" data-pltdoc="x">use-collection-link-paths</a></span> are true, the second element
|
|
in the result list is the path of the user–specific
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links file</span></a>, which is <span class="RktPn">(</span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._build-path%29%29" class="RktValLink" data-pltdoc="x">build-path</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">name</span><span class="stt"> </span><span class="RktVal">"links.rktd"</span><span class="RktPn">)</span> by default,
|
|
but it can be replaced by a <span class="RktVal">'</span><span class="RktVal">links-file</span> value in
|
|
<span class="RktVar">config</span>.</p></li><li><p>As long as the value of <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValLink" data-pltdoc="x">use-collection-link-paths</a></span> is
|
|
true, the rest of the list contains a result like that of
|
|
<span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._get-links-search-files%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">get-links-search-files</a></span>, but using <span class="RktVar">config</span> if
|
|
supplied instead of reading the installation’s
|
|
<span class="stt">"config.rktd"</span> file. Typically, that result is a list
|
|
with a single path, <span class="RktPn">(</span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._build-path%29%29" class="RktValLink" data-pltdoc="x">build-path</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=dirs.html%23%2528def._%2528%2528lib._setup%252Fdirs..rkt%2529._find-config-dir%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">find-config-dir</a></span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVal">"links.rktd"</span><span class="RktPn">)</span>.</p></li></ul><p class="SHistory">Changed in version 8.4.0.3 of package <span class="stt">base</span>: Added the <span class="RktVar">config</span> and
|
|
<span class="RktVar">name</span> arguments.</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>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/private/base..rkt)._collection-file-path))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">collection-file-path</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">file</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">collection</span><span class="hspace"> </span><span class="RktMeta">...+</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span><span class="RktOpt">[</span></td><td valign="top"><span class="RktPn">#:check-compiled?</span><span class="hspace"> </span><span class="RktVar">check-compiled?</span><span class="RktOpt">]</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">file</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">collection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">check-compiled?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="regexp.html#%28def._%28%28quote._~23~25kernel%29._regexp-match~3f%29%29" class="RktValLink" data-pltdoc="x">regexp-match?</a></span><span class="hspace"> </span><span class="RktVal">#rx"[.]rkt$"</span><span class="hspace"> </span><span class="RktVar">file</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">collection-file-path</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">file</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">collection</span><span class="hspace"> </span><span class="RktMeta">...+</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:fail</span><span class="hspace"> </span><span class="RktVar">fail-proc</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span><span class="RktOpt">[</span></td><td valign="top"><span class="RktPn">#:check-compiled?</span><span class="hspace"> </span><span class="RktVar">check-compiled?</span><span class="RktOpt">]</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">file</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">collection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">fail-proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">check-compiled?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="regexp.html#%28def._%28%28quote._~23~25kernel%29._regexp-match~3f%29%29" class="RktValLink" data-pltdoc="x">regexp-match?</a></span><span class="hspace"> </span><span class="RktVal">#rx"[.]rkt$"</span><span class="hspace"> </span><span class="RktVar">file</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the path to the file indicated by <span class="RktVar">file</span> in the
|
|
collection specified by the <span class="RktVar">collection</span>s, where the second
|
|
<span class="RktVar">collection</span> (if any) names a sub-collection, and so on. The
|
|
search uses the values of <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-links</a></span>
|
|
and <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span>.</div></p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>See also <span class="RktSym"><a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=collection-search.html%23%2528def._%2528%2528lib._setup%252Fcollection-search..rkt%2529._collection-search%2529%2529&version=8.6" class="RktValLink Sq" data-pltdoc="x">collection-search</a></span> in
|
|
<a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=collection-search.html&version=8.6" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">setup/collection-search</span></a>.</p></blockquote></blockquote></blockquote><p>If <span class="RktVar">file</span> is not found, but <span class="RktVar">file</span> ends in
|
|
<span class="stt">".rkt"</span> and a file with the suffix <span class="stt">".ss"</span> exists, then
|
|
the directory of the <span class="stt">".ss"</span> file is used. If <span class="RktVar">file</span> is
|
|
not found and the <span class="stt">".rkt"</span>/<span class="stt">".ss"</span> conversion does not
|
|
apply, but a directory corresponding to the <span class="RktVar">collection</span>s is
|
|
found, then a path using the first such directory is
|
|
returned.</p><p>If <span class="RktVar">check-compiled?</span> is true, then the search also depends on
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._use-compiled-file-paths%29%29" class="RktValLink" data-pltdoc="x">use-compiled-file-paths</a></span> and
|
|
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compiled-file-roots%29%29" class="RktValLink" data-pltdoc="x">current-compiled-file-roots</a></span>; if <span class="RktVar">file</span> is not found,
|
|
then a compiled form of <span class="RktVar">file</span> with the suffix <span class="stt">".zo"</span>
|
|
is checked in the same way as the default <a href="eval.html#%28tech._compiled._load._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">compiled-load
|
|
handler</span></a>. If a compiled file is found, the result from
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span> reports the location that <span class="RktVar">file</span>
|
|
itself would occupy (if it existed) for the found compiled file.</p><p>Finally, if the collection is not found, and if <span class="RktVar">fail-proc</span> is
|
|
provided, then <span class="RktVar">fail-proc</span> is applied to an error message (that
|
|
does not start <span class="RktVal">"collection-file-path:"</span> or otherwise claim a
|
|
source), and its result is the result of
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>. If <span class="RktVar">fail-proc</span> is not provided
|
|
and the collection is not found, then the
|
|
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3afilesystem%29%29" class="RktValLink" data-pltdoc="x">exn:fail:filesystem</a></span> exception is raised.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span><span class="hspace"> </span><span class="RktVal">"main.rkt"</span><span class="hspace"> </span><span class="RktVal">"racket"</span><span class="hspace"> </span><span class="RktVal">"base"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<path:path/to/collects/racket/base/main.rkt></span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span><span class="hspace"> </span><span class="RktVal">"sandwich.rkt"</span><span class="hspace"> </span><span class="RktVal">"bologna"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">collection-file-path: collection not found</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">collection: "bologna"</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in collection directories:</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">/home/scheme/pltbuild/racket/racket/collects/</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">... [245 additional linked and package directories]</span></p></td></tr></table></blockquote></div></p><p class="SHistory">Changed in version 6.0.1.12 of package <span class="stt">base</span>: Added the <span class="RktVar">check-compiled?</span> argument.</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>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/base..rkt)._collection-path))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">collection-path</a></span></span><span class="hspace"> </span><span class="RktVar">collection</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">collection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">collection-path</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">collection</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktMeta">...+</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:fail</span><span class="hspace"> </span><span class="RktVar">fail-proc</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">collection</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">fail-proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote><p><span style="background-color: yellow"><span style="font-weight: bold">NOTE:</span></span> This function is deprecated; use <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>, instead. <a href="collects.html#%28tech._collection._splicing%29" class="techoutside" data-pltdoc="x"><span class="techinside">Collection splicing</span></a> implies that a given collection can have
|
|
multiple paths, such as when multiple <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=guide&rel=module-basics.html%23%2528tech._package%2529&version=8.6" class="techoutside Sq" data-pltdoc="x"><span class="techinside">packages</span></a> provide modules for a
|
|
collection.</p></blockquote></div></p><p>Like <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>, but without a specified file name,
|
|
so that a directory indicated by <span class="RktVar">collection</span>s is returned.</p><p>When multiple directories correspond to the collection, the first one
|
|
found in the search sequence (see <a href="collects.html#%28part._collects-search%29" data-pltdoc="x">Collection Search Configuration</a>) is returned.</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>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._current-library-collection-paths))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-library-collection-paths</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-library-collection-paths</a></span></span><span class="hspace"> </span><span class="RktVar">paths</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">paths</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Parameter that determines a list of complete directory paths for
|
|
finding libraries (as referenced in <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>, for example)
|
|
through the default <a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> and for finding paths
|
|
through <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="RktValLink" data-pltdoc="x">collection-path</a></span> and
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>. See <a href="collects.html#%28part._collects-search%29" data-pltdoc="x">Collection Search Configuration</a> for more
|
|
information.</div></p><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._current-library-collection-links))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-library-collection-links</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fhash..rkt%29._hash%2Fc%29%29" class="RktValLink" data-pltdoc="x">hash/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><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><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._path~3f%29%29" class="RktValLink" data-pltdoc="x">path?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></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></table></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-links%29%29" class="RktValDef RktValLink" data-pltdoc="x">current-library-collection-links</a></span></span><span class="hspace"> </span><span class="RktVar">paths</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">paths</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fhash..rkt%29._hash%2Fc%29%29" class="RktValLink" data-pltdoc="x">hash/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><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><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._complete-path~3f%29%29" class="RktValLink" data-pltdoc="x">complete-path?</a></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></table></td></tr></table></blockquote><p>Parameter that determines <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a>, additional
|
|
paths, and the relative search order of
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> for finding libraries (as
|
|
referenced in <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>, for example) through the default
|
|
<a href="Module_Names_and_Loading.html#%28tech._module._name._resolver%29" class="techoutside" data-pltdoc="x"><span class="techinside">module name resolver</span></a> and for finding paths through
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-path%29%29" class="RktValLink" data-pltdoc="x">collection-path</a></span> and <span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._collection-file-path%29%29" class="RktValLink" data-pltdoc="x">collection-file-path</a></span>. See
|
|
<a href="collects.html#%28part._collects-search%29" data-pltdoc="x">Collection Search Configuration</a> for more information.</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>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._use-user-specific-search-paths))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Parameter that determines whether user-specific paths, which are in
|
|
the directory produced by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span>, are
|
|
included in search paths for collections and other files. For example,
|
|
the initial value of <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-paths</a></span> omits the
|
|
user-specific collection directory when this parameter’s value is
|
|
<span class="RktVal">#f</span>.</div></p><p>If <span class="nobreak"><span class="stt">-U</span></span> or <span class="nobreak"><span class="stt">--no-user-path</span></span> argument to <span class="stt">racket</span>, then
|
|
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> is initialized to
|
|
<span class="RktVal">#f</span>.</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>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._use-collection-link-paths))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">use-collection-link-paths</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValDef RktValLink" data-pltdoc="x">use-collection-link-paths</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Parameter that determines whether <a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a> are
|
|
included in the result of <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._find-library-collection-links%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-links</a></span>.</div></p><p>If this parameter’s value is <span class="RktVal">#f</span> on start-up, then
|
|
<a href="collects.html#%28tech._collection._links._file%29" class="techoutside" data-pltdoc="x"><span class="techinside">collection links files</span></a> are effectively disabled permanently for
|
|
the Racket process. In particular, if an empty string is provided as
|
|
the <span class="nobreak"><span class="stt">-X</span></span> or <span class="nobreak"><span class="stt">--collects</span></span> argument to <span class="stt">racket</span>, then not
|
|
only is <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> initialized to the
|
|
empty list, but <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValLink" data-pltdoc="x">use-collection-link-paths</a></span> is initialized to
|
|
<span class="RktVal">#f</span>.</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>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._read-installation-configuration-table))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._read-installation-configuration-table%29%29" class="RktValDef RktValLink" data-pltdoc="x">read-installation-configuration-table</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._hash~3f%29%29" class="RktValLink" data-pltdoc="x">hash?</a></span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the content of the installation’s <span class="stt">"config.rktd"</span> file
|
|
(see <a href="https://download.racket-lang.org/releases/8.6/doc/local-redirect/index.html?doc=raco&rel=config-file.html&version=8.6" class="Sq" data-pltdoc="x">Installation Configuration and Search Paths</a>) as long as that content is
|
|
a <a href="hashtables.html#%28tech._hash._table%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash table</span></a>, and otherwise returns an empty hash table.</div></p><p class="SHistory">Added in version 8.4.0.3 of package <span class="stt">base</span>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" id="searchbox" type="text" tabindex="1" placeholder="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "8.6", "../");"/></form> <a href="https://docs.racket-lang.org/index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("8.6");">top</a><span class="tocsettoggle"> <a href="javascript:void(0);" title="show/hide table of contents" onclick="TocsetToggle();">contents</a></span></span><span class="navright"> <a href="running-sa.html" title="backward to "18.1 Running Racket or GRacket"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="Interactive_Help.html" title="forward to "18.3 Interactive Help"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html> |