<div dir="ltr">You can use a custom Prelude. E.g., the "base-prelude" project takes care of this problem: <a href="http://hackage.haskell.org/package/base-prelude">http://hackage.haskell.org/package/base-prelude</a><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-12 11:14 GMT+03:00 Alan & Kim Zimmerman <span dir="ltr"><<a href="mailto:alan.zimm@gmail.com" target="_blank">alan.zimm@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>See <a href="https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10</a>.<br><br></div>I have just solved one of these by doing<br><br></div>{-# LANGUAGE CPP #-}<br><div>#if __GLASGOW_HASKELL__ < 709<br>import Data.Monoid hiding ((<>))<br>#endif<br><br></div><div>Alan<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sun, Apr 12, 2015 at 9:55 AM, Brendan Hay <span dir="ltr"><<a href="mailto:brendan.g.hay@gmail.com" target="_blank">brendan.g.hay@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi,</div><div><br></div><div>I've run into a couple of cases when attempting to support multiple GHC</div><div>versions in my libraries (7.6.3 -> 7.10) where I've repeatedly made mistakes</div><div>due to being warned about unused imports for various modules that are now part</div><div>of the Prelude such as Data.Monoid, Data.Foldable, etc. which I subsequently</div><div>remove either manually or via editor automation sufficiently indistinguishable</div><div>from magic.</div><div><br></div><div>This then results in successful compilation on 7.10 and failure on earlier</div><div>versions of GHC due to missing imports (ie. Data.Monoid (mappend, mempty)),</div><div>which prior to my current workflow of manually building on multiple versions of</div><div>GHC before releasing a new version, manifested once or twice only after</div><div>uploading to Hackage.</div><div><br></div><div>Now this is all user/workflow error on my part, but I wondered if others have</div><div>some kind of trick up their sleeve for avoiding these kind of issues? I could</div><div>attempt to tailor the compiler's warning flags appropriately, but it bodes ill for</div><div>spotting genuinely unused imports.</div><div><br></div><div>Cheers,</div><div>Brendan</div></div>
<br></div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
<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>