Hello,<br><br><div class="gmail_quote">On Wed, Aug 22, 2012 at 5:32 AM, Ramana Kumar <span dir="ltr"><<a href="mailto:ramana@member.fsf.org" target="_blank">ramana@member.fsf.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">I recently read <a href="http://www.haskell.org/onlinereport/haskell2010/" target="_blank">http://www.haskell.org/onlinereport/haskell2010/</a> and noticed a few minor issues in Chapter 5.<br>Is it easy to correct them on that web page for future readers? If not, at least this may be useful for future reports.<br>
Apologies if these were known already.<br><br>Section 5.2, the first sentence of list item 5 says "The form “<span>module</span><span> M</span>” names the set of all entities that are in scope with both an unqualified name “<span>e</span>” and a
qualified name “<span>M.e</span>”."<br>It is not clear that "in scope" here really means "in scope and exported by module M".<br><br></div></blockquote><div><br></div><div>I think that the definition in the report is correct and clear. In particular "in scope" does not refer to "in scope and exported by module M". Consider this example:</div>
<div><br></div><div>> module A (module M) where</div><div>> import A as M</div><div>> import B as M</div><div>> import C(d)</div><div>> import qualified D as M (d)</div><div><br></div><div>In this case the "module M" declaration refers to all the entities imported from A and B and, assuming that "d" refers to the same entity in both C & D, also "d".</div>
<div><br></div><div>The same section (5.2) does contain a slightly inaccurate remark though. The report says:</div><div><br></div><div><span style="font-family:'Times New Roman';font-size:medium">It is an error to use </span><span class="pcrr7t-" style="font-family:monospace">module</span><span class="pcrr7t-" style="font-family:monospace"> M</span><span style="font-family:'Times New Roman';font-size:medium"> in an export list unless </span><span class="pcrr7t-" style="font-family:monospace">M</span><span style="font-family:'Times New Roman';font-size:medium"> is the module bearing the export list, <u>or </u></span><span class="pcrr7t-" style="font-family:monospace"><u>M</u></span><span style="font-family:'Times New Roman';font-size:medium"><u> is imported by at least one import declaration</u> (qualified or unqualified).</span></div>
<div> </div><div>The above example illustrates that this is not the case: M really should be the "qualifier" on one of the imports (if the qualifier is omitted, then it is the same as the module name). Here is another example to emphasize the point:</div>
<div><br></div><div>> -- error module</div><div>> module A (module M) where</div><div>> import M as B</div><div><br></div><div>This is an error because M is not the qualifier for any import (the correct usage is "module B").</div>
<div><br></div><div>-Iavor</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>