<div dir="ltr">Thanks for the tips!</div><div class="gmail_extra"><br><div class="gmail_quote">On 12 April 2015 at 12:37, Benno Fünfstück <span dir="ltr"><<a href="mailto:benno.fuenfstueck@gmail.com" target="_blank">benno.fuenfstueck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><span class="">> I've run into a couple of cases when attempting to support multiple GHC versions in my libraries (7.6.3 -> 7.10) where I've repeatedly made mistakes due to being warned about unused imports for various modules that are now part of the Prelude such as Data.Monoid, Data.Foldable, etc. which I subsequently remove either manually or via editor automation sufficiently indistinguishable from magic.<div><br></div></span>A trick is to import Prelude at the very end, like:<br><br></div>import Control.Applicative<br></div>import Data.Monoid<br>...<br></div><div>import Prelude<br><br></div><div>Since the unused import check is done from top to bottom, and you almost always use *something* from the Prelude, this will suppress the warning.<br><br></div><div>There are some problems with qualified/explicit import lists if I recall correctly though. But it works for me most of the time.<br><br>Regards,<br></div><div>Benno<br></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>