[Haskell-cafe] Dealing with GHC 7.10 prelude imports
Alan & Kim Zimmerman
alan.zimm at gmail.com
Sun Apr 12 08:14:19 UTC 2015
See https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10.
I have just solved one of these by doing
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ < 709
import Data.Monoid hiding ((<>))
#endif
Alan
On Sun, Apr 12, 2015 at 9:55 AM, Brendan Hay <brendan.g.hay at gmail.com>
wrote:
> 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
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150412/bca3d5a6/attachment.html>
More information about the Haskell-Cafe
mailing list