Hello,<br><br><div class="gmail_quote">On Wed, Aug 22, 2012 at 5:32 AM, Ramana Kumar <span dir="ltr">&lt;<a href="mailto:ramana@member.fsf.org" target="_blank">ramana@member.fsf.org</a>&gt;</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 &quot;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>”.&quot;<br>It is not clear that &quot;in scope&quot; here really means &quot;in scope and exported by module M&quot;.<br><br></div></blockquote><div><br></div><div>I think that the definition in the report is correct and clear.  In particular &quot;in scope&quot; does not refer to &quot;in scope and exported by module M&quot;.  Consider this example:</div>
<div><br></div><div>&gt; module A (module M) where</div><div>&gt; import A as M</div><div>&gt; import B as M</div><div>&gt; import C(d)</div><div>&gt; import qualified D as M (d)</div><div><br></div><div>In this case the &quot;module M&quot; declaration refers to all the entities imported from A and B and, assuming that &quot;d&quot; refers to the same entity in both C &amp; D, also &quot;d&quot;.</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:&#39;Times New Roman&#39;;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:&#39;Times New Roman&#39;;font-size:medium"> in an export list unless </span><span class="pcrr7t-" style="font-family:monospace">M</span><span style="font-family:&#39;Times New Roman&#39;;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:&#39;Times New Roman&#39;;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 &quot;qualifier&quot; 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>&gt; -- error module</div><div>&gt; module A (module M) where</div><div>&gt; 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 &quot;module B&quot;).</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>