[Haskell-cafe] Dealing with GHC 7.10 prelude imports

Brendan Hay brendan.g.hay at gmail.com
Sun Apr 12 07:55:05 UTC 2015


Hi,

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.

This then results in successful compilation on 7.10 and failure on earlier
versions of GHC due to missing imports (ie. Data.Monoid (mappend, mempty)),
which prior to my current workflow of manually building on multiple
versions of
GHC before releasing a new version, manifested once or twice only after
uploading to Hackage.

Now this is all user/workflow error on my part, but I wondered if others
have
some kind of trick up their sleeve for avoiding these kind of issues? I
could
attempt to tailor the compiler's warning flags appropriately, but it bodes
ill for
spotting genuinely unused imports.

Cheers,
Brendan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150412/3df7bd9b/attachment.html>


More information about the Haskell-Cafe mailing list