<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a module A that re-exports module B, and module B contains only class<br>
instances. Since I&#39;m using -Wall, I get this warning about module B<br>
exporting nothing. Is there a way to disable this particular warning, since<br>
it is unnecessary in this case? No mailing list messages or GHC<br>
documentation has told me what to do.<br>
</blockquote>
<br></div></div>
Well, the warning is right that you don&#39;t need to re-export module B: instances are implicitly exported. &nbsp;So you could just remove the export of &quot;module B&quot;, unless there&#39;s a reason to export it (such as, you might add some exported functions or data types to it later)<br>
<font color="#888888">
</font></blockquote><div><br>
Ah, got it. Thanks. I didn&#39;t realize instances of an imported module were also implicitly exported.<br><br>I should have looked at the report, however. For the future reference of others:<br><br>&quot;Instance declarations cannot be explicitly named on import or export
lists.  All instances in scope within a module are <i>always
</i>exported and any import brings <i>all</i> instances in from the
imported module.  Thus, an
instance declaration is in scope if and only if a chain of <tt>import
</tt>declarations leads to the module containing the instance declaration.&quot;<br>-- 5.4&nbsp;&nbsp;Importing and Exporting Instance Declarations at <a href="http://www.haskell.org/onlinereport/modules.html">http://www.haskell.org/onlinereport/modules.html</a><br>
<br>It would definitely be nice to have a bit more control over importing/exporting instances. I noticed this idea has been discussed a few times already.<br><br>Sean<br></div></div></div>