This file is indexed.

/usr/share/doc/racket/syntax/module-helpers.html is in racket-doc 6.7-3.

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

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4&nbsp;Module-Processing Helpers</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Syntax:<span class="mywbr"> &nbsp;</span> Meta-<wbr></wbr>Programming Helpers</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="stxparse.html" class="tocviewlink" data-pltdoc="x">Parsing and Specifying Syntax</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="syntax-helpers.html" class="tocviewlink" data-pltdoc="x">Syntax Object Helpers</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Datum_Pattern_Matching.html" class="tocviewlink" data-pltdoc="x">Datum Pattern Matching</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Module-<wbr></wbr>Processing Helpers</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="transformer-helpers.html" class="tocviewlink" data-pltdoc="x">Macro Transformer Helpers</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="reader-helpers.html" class="tocviewlink" data-pltdoc="x">Reader Helpers</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="Parsing_for_Bodies.html" class="tocviewlink" data-pltdoc="x">Parsing <span class="RktSym"><span class="RktStxLink">for</span></span> Bodies</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="Unsafe_for_Clause_Transforms.html" class="tocviewlink" data-pltdoc="x">Unsafe <span class="RktSym"><span class="RktStxLink">for</span></span> Clause Transforms</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="Source_Locations.html" class="tocviewlink" data-pltdoc="x">Source Locations</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="Preserving_Source_Locations.html" class="tocviewlink" data-pltdoc="x">Preserving Source Locations</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="toplevel.html" class="tocviewlink" data-pltdoc="x">Non-<wbr></wbr>Module Compilation And Expansion</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="trusted-xforms.html" class="tocviewlink" data-pltdoc="x">Trusting Standard Recertifying Transformers</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="docprovide.html" class="tocviewlink" data-pltdoc="x">Attaching Documentation to Exports</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="wrapc.html" class="tocviewlink" data-pltdoc="x">Contracts for Macro Subexpressions</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="macro-testing.html" class="tocviewlink" data-pltdoc="x">Macro Testing</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="intdef.html" class="tocviewlink" data-pltdoc="x">Internal-<wbr></wbr>Definition Context Helpers</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9658;</a></td><td>4&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Module-<wbr></wbr>Processing Helpers</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1&nbsp;</td><td><a href="#%28part._modread%29" class="tocviewlink" data-pltdoc="x">Reading Module Source Code</a></td></tr><tr><td align="right">4.2&nbsp;</td><td><a href="#%28part._modcode%29" class="tocviewlink" data-pltdoc="x">Getting Module Compiled Code</a></td></tr><tr><td align="right">4.3&nbsp;</td><td><a href="#%28part._.Resolving_.Module_.Paths_to_.File_.Paths%29" class="tocviewlink" data-pltdoc="x">Resolving Module Paths to File Paths</a></td></tr><tr><td align="right">4.4&nbsp;</td><td><a href="#%28part._modcollapse%29" class="tocviewlink" data-pltdoc="x">Simplifying Module Paths</a></td></tr><tr><td align="right">4.5&nbsp;</td><td><a href="#%28part._moddep%29" class="tocviewlink" data-pltdoc="x">Inspecting Modules and Module Dependencies</a></td></tr><tr><td align="right">4.6&nbsp;</td><td><a href="#%28part._wrap-modbeg%29" class="tocviewlink" data-pltdoc="x">Wrapping Module-<wbr></wbr>Body Expressions</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">4.1<tt>&nbsp;</tt></span><a href="#%28part._modread%29" class="tocsubseclink" data-pltdoc="x">Reading Module Source Code</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodread..rkt%29._with-module-reading-parameterization%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">with-<wbr></wbr>module-<wbr></wbr>reading-<wbr></wbr>parameterization</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodread..rkt%29._check-module-form%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">check-<wbr></wbr>module-<wbr></wbr>form</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.2<tt>&nbsp;</tt></span><a href="#%28part._modcode%29" class="tocsubseclink" data-pltdoc="x">Getting Module Compiled Code</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-code%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>module-<wbr></wbr>code</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>module-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-metadata-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>metadata-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._moddep-current-open-input-file%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">moddep-<wbr></wbr>current-<wbr></wbr>open-<wbr></wbr>input-<wbr></wbr>file</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._exn~3aget-module-code%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">exn:<span class="mywbr"> &nbsp;</span>get-<wbr></wbr>module-<wbr></wbr>code</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.3<tt>&nbsp;</tt></span><a href="#%28part._.Resolving_.Module_.Paths_to_.File_.Paths%29" class="tocsubseclink" data-pltdoc="x">Resolving Module Paths to File Paths</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">resolve-<wbr></wbr>module-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path-index%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">resolve-<wbr></wbr>module-<wbr></wbr>path-<wbr></wbr>index</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.4<tt>&nbsp;</tt></span><a href="#%28part._modcollapse%29" class="tocsubseclink" data-pltdoc="x">Simplifying Module Paths</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">collapse-<wbr></wbr>module-<wbr></wbr>path</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path-index%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">collapse-<wbr></wbr>module-<wbr></wbr>path-<wbr></wbr>index</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.5<tt>&nbsp;</tt></span><a href="#%28part._moddep%29" class="tocsubseclink" data-pltdoc="x">Inspecting Modules and Module Dependencies</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fmoddep..rkt%29._show-import-tree%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">show-<wbr></wbr>import-<wbr></wbr>tree</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.6<tt>&nbsp;</tt></span><a href="#%28part._wrap-modbeg%29" class="tocsubseclink" data-pltdoc="x">Wrapping Module-<wbr></wbr>Body Expressions</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fwrap-modbeg..rkt%29._make-wrapping-module-begin%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>wrapping-<wbr></wbr>module-<wbr></wbr>begin</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Datum_Pattern_Matching.html" title="backward to &quot;3 Datum Pattern Matching&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Syntax: Meta-Programming Helpers&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="transformer-helpers.html" title="forward to &quot;5 Macro Transformer Helpers&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;module-helpers&quot;">4<tt>&nbsp;</tt><a name="(part._module-helpers)"></a>Module-Processing Helpers</h3><h4 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;modread&quot;">4.1<tt>&nbsp;</tt><a name="(part._modread)"></a><a name="(mod-path._syntax/modread)"></a>Reading Module Source Code</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fmodread%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modread</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/modread..rkt)._with-module-reading-parameterization))"></a><span title="Provided from: syntax/modread | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodread..rkt%29._with-module-reading-parameterization%29%29" class="RktValDef RktValLink" data-pltdoc="x">with-module-reading-parameterization</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">thunk</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">thunk</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Calls <span class="RktVar">thunk</span> with all reader parameters reset to their default
values.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/modread..rkt)._check-module-form))"></a><span title="Provided from: syntax/modread | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodread..rkt%29._check-module-form%29%29" class="RktValDef RktValLink" data-pltdoc="x">check-module-form</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">stx</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">expected-module-sym</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">source-v</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">stx</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eof-object%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">eof-object?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">expected-module-sym</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">source-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Inspects <span class="RktVar">stx</span> to check whether evaluating it will declare a
module&#8212;<wbr></wbr>at least if <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=module.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._module%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">module</a></span> is bound in the top-level to
Racket&rsquo;s <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=module.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._module%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">module</a></span>. The syntax object <span class="RktVar">stx</span> can contain a
compiled expression. Also, <span class="RktVar">stx</span> can be an end-of-file, on the
grounds that <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Reading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read-syntax%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">read-syntax</a></span> can produce an end-of-file.</div></p><p>The <span class="RktVar">expected-module-sym</span> argument is currently ignored. In
previous versions, the module form <span class="RktVar">stx</span> was obliged to declare
a module who name matched <span class="RktVar">expected-module-sym</span>.</p><p>If <span class="RktVar">stx</span> can declare a module in an appropriate top-level, then
the <span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodread..rkt%29._check-module-form%29%29" class="RktValLink" data-pltdoc="x">check-module-form</a></span> procedure returns a syntax object that
certainly will declare a module (adding explicit context to the
leading <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=module.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._module%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">module</a></span> if necessary) in any top-level. Otherwise, if
<span class="RktVar">source-v</span> is not <span class="RktVal">#f</span>, a suitable exception is raised
using the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._write%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">write</a></span> form of the source in the message; if
<span class="RktVar">source-v</span> is <span class="RktVal">#f</span>, <span class="RktVal">#f</span> is returned.</p><p>If <span class="RktVar">stx</span> is eof or eof wrapped as a syntax object, then an
error is raised or <span class="RktVal">#f</span> is returned.</p><h4 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;modcode&quot;">4.2<tt>&nbsp;</tt><a name="(part._modcode)"></a><a name="(mod-path._syntax/modcode)"></a>Getting Module Compiled Code</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fmodcode%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modcode</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/modcode..rkt)._get-module-code))"></a><span title="Provided from: syntax/modcode | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-code%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-module-code</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">path</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:submodule-path</span><span class="hspace">&nbsp;</span><span class="RktVar">submodule-path</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:sub-path</span><span class="hspace">&nbsp;</span><span class="RktVar">compiled-subdir0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:roots</span><span class="hspace">&nbsp;</span><span class="RktVar">roots</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:compile</span><span class="hspace">&nbsp;</span><span class="RktVar">compile-proc0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">compile-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:extension-handler</span><span class="hspace">&nbsp;</span><span class="RktVar">ext-proc0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">ext-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:choose</span><span class="hspace">&nbsp;</span><span class="RktVar">choose-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:notify</span><span class="hspace">&nbsp;</span><span class="RktVar">notify-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:source-reader</span><span class="hspace">&nbsp;</span><span class="RktVar">read-syntax-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:rkt-try-ss?</span><span class="hspace">&nbsp;</span><span class="RktVar">rkt-try-ss?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">submodule-path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._relative-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">relative-path?</a></span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVal">"compiled"</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._relative-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">relative-path?</a></span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir0</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">roots</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">same</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-compiled-file-roots%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-compiled-file-roots</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">compile-proc0</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._compile%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">compile</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">compile-proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVar">compile-proc0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">ext-proc0</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">ext-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">ext-proc0</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">choose-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._symbols%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbols</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">src</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">zo</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">so</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">src</span><span class="hspace">&nbsp;</span><span class="RktSym">zo</span><span class="hspace">&nbsp;</span><span class="RktSym">so</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">notify-proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">read-syntax-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eof-object%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">eof-object?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Reading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read-syntax%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">read-syntax</a></span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">rkt-try-ss?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a compiled expression for the declaration of the module
specified by <span class="RktVar">path</span> and <span class="RktVar">submodule-path</span>, where
<span class="RktVar">submodule-path</span> is empty for a root module or a list for a
submodule.</div></p><p>The <span class="RktVar">compiled-subdir</span> argument defaults to <span class="RktVal">"compiled"</span>;
it specifies the sub-directory to search for a compiled version of the
module. The <span class="RktVar">roots</span> list specifies a compiled-file search path
in the same way as the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-compiled-file-roots%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-compiled-file-roots</a></span> parameter.</p><p>The <span class="RktVar">compile-proc</span> argument defaults to <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._compile%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">compile</a></span>. This
procedure is used to compile module source if an already-compiled
version is not available. If <span class="RktVar">submodule-path</span> is not <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">)</span>,
then <span class="RktVar">compile-proc</span> must return a compiled module form.</p><p>The <span class="RktVar">ext-proc</span> argument defaults to <span class="RktVal">#f</span>. If it is not
<span class="RktVal">#f</span>, it must be a procedure of two arguments that is called
when a native-code version of <span class="RktVar">path</span> should be used. In that
case, the arguments to <span class="RktVar">ext-proc</span> are the path for the
extension, and a boolean indicating whether the extension is a <span class="stt">_loader</span>
file (<span class="RktVal">#t</span>) or not (<span class="RktVal">#f</span>).</p><p>The <span class="RktVar">rkt-try-ss?</span> argument defaults to <span class="RktVal">#t</span>.  If it is not
<span class="RktVal">#f</span>, then if <span class="RktVar">path</span> ends in <span class="stt">".rkt"</span>, then the
corresponding file ending in <span class="stt">".ss"</span> will be tried as well.</p><p>The <span class="RktVar">choose-proc</span> argument is a procedure that takes three
paths: a source path, a <span class="stt">".zo"</span> file path, and an extension path
(for a non-<span class="stt">_loader</span> extension). Some of the paths may not
exist. The result should be either <span class="RktVal">'</span><span class="RktVal">src</span>, <span class="RktVal">'</span><span class="RktVal">zo</span>,
<span class="RktVal">'</span><span class="RktVal">so</span>, or <span class="RktVal">#f</span>, indicating which variant should be used
or (in the case of <span class="RktVal">#f</span>) that the default choice should be
used.</p><p>The default choice is computed as follows: if a <span class="stt">".zo"</span> version
of <span class="RktVar">path</span> is available and newer than <span class="RktVar">path</span> itself (in
one of the directories specified by <span class="RktVar">compiled-subdir</span>), then it
is used instead of the source. Native-code versions of <span class="RktVar">path</span>
are ignored, unless only a native-code non-<span class="stt">_loader</span> version exists
(i.e., <span class="RktVar">path</span> itself does not exist). A <span class="stt">_loader</span> extension
is selected a last resort.</p><p>If an extension is preferred or is the only file that exists, it is
supplied to <span class="RktVar">ext-proc</span> when <span class="RktVar">ext-proc</span> is <span class="RktVal">#f</span>,
or an exception is raised (to report that an extension file cannot be
used) when <span class="RktVar">ext-proc</span> is <span class="RktVal">#f</span>.</p><p>If <span class="RktVar">notify-proc</span> is supplied, it is called for the file
(source, <span class="stt">".zo"</span> or extension) that is chosen.</p><p>If <span class="RktVar">read-syntax-proc</span> is provided, it is used to read the
module from a source file (but not from a bytecode file).</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._syntax/modcode..rkt)._get-module-path))"></a><span title="Provided from: syntax/modcode | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-module-path</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">path</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:submodule?</span><span class="hspace">&nbsp;</span><span class="RktVar">submodule?</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:sub-path</span><span class="hspace">&nbsp;</span><span class="RktVar">compiled-subdir0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:roots</span><span class="hspace">&nbsp;</span><span class="RktVar">roots</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:choose</span><span class="hspace">&nbsp;</span><span class="RktVar">choose-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">#:rkt-try-ss?</span><span class="hspace">&nbsp;</span><span class="RktVar">rkt-try-ss?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">src</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">zo</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">so</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">submodule?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir0</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._relative-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">relative-path?</a></span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVal">"compiled"</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._and%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._relative-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">relative-path?</a></span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">compiled-subdir0</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">roots</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">same</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-compiled-file-roots%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-compiled-file-roots</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">choose-proc</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._symbols%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbols</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">src</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">zo</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">so</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">src</span><span class="hspace">&nbsp;</span><span class="RktSym">zo</span><span class="hspace">&nbsp;</span><span class="RktSym">so</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">rkt-try-ss?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces two values.  The first is the path of the latest source or compiled
file for the module specified by <span class="RktVar">path</span>; this result is the path of the
file that <span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-code%29%29" class="RktValLink" data-pltdoc="x">get-module-code</a></span> would read to produce a compiled module
expression.  The second value is <span class="RktVal">'</span><span class="RktVal">src</span>, <span class="RktVal">'</span><span class="RktVal">zo</span>, or <span class="RktVal">'</span><span class="RktVal">so</span>,
depending on whether the first value represents a Racket source file, a
compiled bytecode file, or a native library file.</div></p><p>The <span class="RktVar">compiled-subdir</span>, <span class="RktVar">roots</span>, <span class="RktVar">choose-proc</span>, and
<span class="RktVar">rkt-try-ss?</span> arguments are interpreted the same as by
<span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-code%29%29" class="RktValLink" data-pltdoc="x">get-module-code</a></span>.</p><p>The <span class="RktVar">submodule?</span> argument represents whether the desired module is a
submodule of the one specified by <span class="RktVar">path</span>.  When <span class="RktVar">submodule?</span> is
true, the result is never a <span class="RktVal">'</span><span class="RktVal">so</span> path, as native libraries cannot
provide submodules.</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._syntax/modcode..rkt)._get-metadata-path))"></a><span title="Provided from: syntax/modcode | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-metadata-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-metadata-path</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">path</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">#:roots</span><span class="hspace">&nbsp;</span><span class="RktVar">roots</span>]</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">sub-path</span><span class="hspace">&nbsp;</span><span class="RktMeta">...+</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">roots</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">same</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-compiled-file-roots%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">current-compiled-file-roots</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">sub-path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">same</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Constructs the path used to store compilation metadata for a source file stored
in the directory <span class="RktVar">path</span>.  The argument <span class="RktVar">roots</span> specifies the
possible root directories to consider and to search for an existing file.  The
<span class="RktVar">sub-path</span> arguments specify the subdirectories and filename of the
result relative to the chosen root.  For example, the compiled <span class="stt">".zo"</span>
file for <span class="stt">"/path/to/source.rkt"</span> might be stored in
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-metadata-path%29%29" class="RktValLink" data-pltdoc="x">get-metadata-path</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._build-path%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">build-path</a></span><span class="stt"> </span><span class="RktVal">"/path/to"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVal">"compiled"</span><span class="stt"> </span><span class="RktVal">"source_rkt.zo"</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/modcode..rkt)._moddep-current-open-input-file))"></a><span title="Provided from: syntax/modcode | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._moddep-current-open-input-file%29%29" class="RktValDef RktValLink" data-pltdoc="x">moddep-current-open-input-file</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: syntax/modcode | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._moddep-current-open-input-file%29%29" class="RktValDef RktValLink" data-pltdoc="x">moddep-current-open-input-file</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">proc</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=port-ops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._input-port%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">input-port?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter whose value is used like <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=file-ports.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._open-input-file%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">open-input-file</a></span> to read
a module source or <span class="stt">".zo"</span> file.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace">&nbsp;</span></td><td><a name="(def._((lib._syntax/modcode..rkt)._exn~3aget-module-code-path))"></a><a name="(def._((lib._syntax/modcode..rkt)._make-exn~3aget-module-code))"></a><a name="(def._((lib._syntax/modcode..rkt)._exn~3aget-module-code~3f))"></a><a name="(def._((lib._syntax/modcode..rkt)._struct~3aexn~3aget-module-code))"></a><a name="(def._((lib._syntax/modcode..rkt)._exn~3aget-module-code))"></a><span title="Provided from: syntax/modcode | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._exn~3aget-module-code%29%29" class="RktValDef RktValLink" data-pltdoc="x">exn:get-module-code</a></span></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=exns.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._exn%7E3afail%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">exn:fail</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">path</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:extra-constructor-name</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._make-exn~3aget-module-code%29%29" class="RktValLink" data-pltdoc="x">make-exn:get-module-code</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktSym">path</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">An exception structure type for exceptions raised by
<span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcode..rkt%29._get-module-code%29%29" class="RktValLink" data-pltdoc="x">get-module-code</a></span>.</div></p><h4 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;Resolving_Module_Paths_to_File_Paths&quot;">4.3<tt>&nbsp;</tt><a name="(part._.Resolving_.Module_.Paths_to_.File_.Paths)"></a><a name="(mod-path._syntax/modresolve)"></a>Resolving Module Paths to File Paths</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fmodresolve%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modresolve</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/modresolve..rkt)._resolve-module-path))"></a><span title="Provided from: syntax/modresolve | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">resolve-module-path</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">module-path-v</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">rel-to-path-v</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">submod</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></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="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-path-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">rel-to-path-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Resolves a module path to filename path. The module path is resolved
relative to <span class="RktVar">rel-to-path-v</span> if it is a path string (assumed to
be for a file), to the directory result of calling the thunk if it is
a thunk, or to the current directory otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/modresolve..rkt)._resolve-module-path-index))"></a><span title="Provided from: syntax/modresolve | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path-index%29%29" class="RktValDef RktValLink" data-pltdoc="x">resolve-module-path-index</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">module-path-index</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">rel-to-path-v</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">submod</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></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="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-path-index</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">rel-to-path-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path%29%29" class="RktValLink" data-pltdoc="x">resolve-module-path</a></span> but the input is a <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528tech._module._path._index%2529&amp;version=6.7" class="Sq" data-pltdoc="x">module path index</a>; in this case, the <span class="RktVar">rel-to-path-v</span>
base is used where the module path index contains the &ldquo;self&rdquo; index.
If <span class="RktVar">module-path-index</span> depends on the &ldquo;self&rdquo; module path
index, then an exception is raised unless <span class="RktVar">rel-to-path-v</span> is a
path string.</div></p><p>See <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index-resolve%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index-resolve</a></span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path-index%29%29" class="RktValLink" data-pltdoc="x">resolve-module-path-index</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index-join%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index-join</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">racket</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#&lt;path:/build/racket-0KrQFc/racket-6.7/debian/tmp/usr/share/racket/collects/racket/main.rkt&gt;</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path-index%29%29" class="RktValLink" data-pltdoc="x">resolve-module-path-index</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index-join%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index-join</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"apple.rkt"</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#&lt;path:/build/racket-0KrQFc/racket-6.7/debian/tmp/usr/share/racket/pkgs/racket-doc/syntax/apple.rkt&gt;</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodresolve..rkt%29._resolve-module-path-index%29%29" class="RktValLink" data-pltdoc="x">resolve-module-path-index</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index-join%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index-join</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">submod</span><span class="hspace">&nbsp;</span><span class="RktVal">"."</span><span class="hspace">&nbsp;</span><span class="RktVal">test</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Manipulating_Paths.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string-%7E3epath%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">string-&gt;path</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"banana.rkt"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(submod #&lt;path:banana.rkt&gt; test)</span></p></td></tr></table></blockquote></div></p><h4 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;modcollapse&quot;">4.4<tt>&nbsp;</tt><a name="(part._modcollapse)"></a><a name="(mod-path._syntax/modcollapse)"></a>Simplifying Module Paths</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fmodcollapse%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modcollapse</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/modcollapse..rkt)._collapse-module-path))"></a><span title="Provided from: syntax/modcollapse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path%29%29" class="RktValDef RktValLink" data-pltdoc="x">collapse-module-path</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">module-path-v</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">rel-to-module-path-v</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-path-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">rel-to-module-path-v</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns a &ldquo;simplified&rdquo; module path by combining
<span class="RktVar">module-path-v</span> with <span class="RktVar">rel-to-module-path-v</span>, where the
latter must have one of the following forms: a <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">lib</span><span class="stt"> </span><span class="RktVal">....</span><span class="RktVal">)</span> or
symbol module path; a <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">file</span><span class="stt"> </span><span class="RktVal">....</span><span class="RktVal">)</span> module path; a
<span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">planet</span><span class="stt"> </span><span class="RktVal">....</span><span class="RktVal">)</span> module path; a <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pathutils.html%23%2528tech._path%2529&amp;version=6.7" class="Sq" data-pltdoc="x">path</a>;
<span class="RktVal">'</span><span class="RktVal">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=quote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._quote%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">quote</a></span><span class="stt"> </span><span class="RktVar">symbol</span><span class="RktVal">)</span>;
a <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">submod</span><span class="stt"> </span><span class="RktVar">base</span><span class="stt"> </span><span class="RktVar">symbol</span><span class="stt"> </span><span class="RktVal">...</span><span class="RktVal">)</span> module path
where <span class="RktVar">base</span> would be allowed; or a thunk to generate one of those.</div></p><p>The result can be a path if <span class="RktVar">module-path-v</span> contains a path
element that is needed for the result, or if
<span class="RktVar">rel-to-module-path-v</span> is a non-string path that is needed for
the result. Similarly, the result can be <span class="RktVal">'</span><span class="RktVal">submod</span> wrapping a
path.  Otherwise, the result is a module path (in the sense of
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span>) that is not a plain filesystem path.</p><p>When the result is a <span class="RktVal">'</span><span class="RktVal">lib</span> or <span class="RktVal">'</span><span class="RktVal">planet</span> module path, it
is normalized so that equivalent module paths are represented by
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">equal?</a></span> results. When the result is a <span class="RktVal">'</span><span class="RktVal">submod</span> module
path, it contains only symbols after the base module path, and the
base is normalized in the case of a <span class="RktVal">'</span><span class="RktVal">lib</span> or <span class="RktVal">'</span><span class="RktVal">planet</span>
base.</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">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path%29%29" class="RktValLink" data-pltdoc="x">collapse-module-path</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"m.rkt"</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">lib</span><span class="hspace">&nbsp;</span><span class="RktVal">"n/main.rkt"</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(lib "n/m.rkt")</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path%29%29" class="RktValLink" data-pltdoc="x">collapse-module-path</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">submod</span><span class="hspace">&nbsp;</span><span class="RktVal">"."</span><span class="hspace">&nbsp;</span><span class="RktVal">x</span><span class="RktVal">)</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">lib</span><span class="hspace">&nbsp;</span><span class="RktVal">"n/main.rkt"</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(submod (lib "n/main.rkt") x)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path%29%29" class="RktValLink" data-pltdoc="x">collapse-module-path</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">submod</span><span class="hspace">&nbsp;</span><span class="RktVal">"."</span><span class="hspace">&nbsp;</span><span class="RktVal">x</span><span class="RktVal">)</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">submod</span><span class="hspace">&nbsp;</span><span class="RktVal">(</span><span class="RktVal">lib</span><span class="hspace">&nbsp;</span><span class="RktVal">"n/main.rkt"</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">y</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(submod (lib "n/main.rkt") y x)</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/modcollapse..rkt)._collapse-module-path-index))"></a><span title="Provided from: syntax/modcollapse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path-index%29%29" class="RktValDef RktValLink" data-pltdoc="x">collapse-module-path-index</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">module-path-index</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">rel-to-module-path-v</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-path-index</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">rel-to-module-path-v</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></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: syntax/modcollapse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path-index%29%29" class="RktValDef RktValLink" data-pltdoc="x">collapse-module-path-index</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">module-path-index</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-path-index</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path-index%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path-index?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path%29%29" class="RktValLink" data-pltdoc="x">collapse-module-path</a></span> when given two arguments, but the
input is a <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528tech._module._path._index%2529&amp;version=6.7" class="Sq" data-pltdoc="x">module path index</a>; in this case,
the <span class="RktVar">rel-to-module-path-v</span> base is used where the module path
index contains the &ldquo;self&rdquo; index.</div></p><p>When given a single argument, <span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmodcollapse..rkt%29._collapse-module-path-index%29%29" class="RktValLink" data-pltdoc="x">collapse-module-path-index</a></span>
returns a module path that is relative if the given module path index
is relative. The resulting module path is not necessarily normalized.</p><p class="SHistory">Changed in version 6.1.1.8 of package <span class="stt">base</span>: Added the one-argument variant for
collapsing a relative module path
index.</p><h4 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;moddep&quot;">4.5<tt>&nbsp;</tt><a name="(part._moddep)"></a><a name="(mod-path._syntax/moddep)"></a>Inspecting Modules and Module Dependencies</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fmoddep%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/moddep</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p>Re-exports <a href="#%28mod-path._syntax%2Fmodread%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modread</span></a>,
<a href="#%28mod-path._syntax%2Fmodcode%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modcode</span></a>, <a href="#%28mod-path._syntax%2Fmodcollapse%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modcollapse</span></a>,
and <a href="#%28mod-path._syntax%2Fmodresolve%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/modresolve</span></a>, in addition to the following:</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._syntax/moddep..rkt)._show-import-tree))"></a><span title="Provided from: syntax/moddep | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fmoddep..rkt%29._show-import-tree%29%29" class="RktValDef RktValLink" data-pltdoc="x">show-import-tree</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">module-path-v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-path-v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A debugging aid that prints the import hierarchy starting from a given
module path.</div></p><h4 x-source-module="(lib &quot;syntax/scribblings/syntax.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;wrap-modbeg&quot;">4.6<tt>&nbsp;</tt><a name="(part._wrap-modbeg)"></a><a name="(mod-path._syntax/wrap-modbeg)"></a>Wrapping Module-Body Expressions</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fwrap-modbeg%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/wrap-modbeg</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></p><p class="SHistory">Added in version 6.0.0.1 of package <span class="stt">base</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><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._syntax/wrap-modbeg..rkt)._make-wrapping-module-begin))"></a><span title="Provided from: syntax/wrap-modbeg | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fwrap-modbeg..rkt%29._make-wrapping-module-begin%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-wrapping-module-begin</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">wrap-form</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">module-begin-form</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">wrap-form</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">module-begin-form</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktRdr">#'</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=module.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7E23%7E25plain-module-begin%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">#%plain-module-begin</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Provided <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._for-syntax%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">for-syntax</a></span>.</div></p><p>Constructs a function that is suitable for use as a
<span class="RktSym">#%module-begin</span> replacement, particularly to replace the
facet of <span class="RktSym">#%module-begin</span> that wraps each top-level
expression to print the expression&rsquo;s result(s).</p><p>The function takes a syntax object and returns a syntax object using
<span class="RktVar">module-begin-form</span>.  Assuming that <span class="RktVar">module-begin-form</span>
resembles <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=module.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7E23%7E25plain-module-begin%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">#%plain-module-begin</a></span>, each top-level expression
<span class="RktVar">expr</span> will be wrapped as <span class="RktPn">(</span><span class="RktVar">wrap-form</span><span class="stt"> </span><span class="RktVar">expr</span><span class="RktPn">)</span>, while
top-level declarations (such as <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span> and
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span> forms) are left as-is. Expressions are detected after
macro expansion and <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=begin.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._begin%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">begin</a></span> splicing, and expansion is
interleaved with declaration processing as usual.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Datum_Pattern_Matching.html" title="backward to &quot;3 Datum Pattern Matching&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Syntax: Meta-Programming Helpers&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="transformer-helpers.html" title="forward to &quot;5 Macro Transformer Helpers&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>