Building -Wall clean across this change-over has a big of a trick to it.

The easiest way I know of when folks already had lots of

import Data.Foldable
import Data.Traversable

stuff

is to just add

import Prelude

explicitly to the bottom of your import list rather than painstakingly exclude the imports with CPP.

This has the benefit of not needing a bunch of CPP to manage what names come from where.

Why? GHC checks that the imports provide something 'new' that is used by the module in a top-down fashion, and you are almost suredly using something from Prelude that didn't come from one of the modules above.

On the other hand the implicit import of Prelude effectively would come first in the list.

It is a dirty trick, but it does neatly side-step this problem for folks in your situation.

-Edward

On Tue, Jan 20, 2015 at 6:12 PM, Bryan O'Sullivan <bos@serpentine.com> wrote:

On Tue, Jan 20, 2015 at 3:02 PM, Herbert Valerio Riedel <hvr@gnu.org> wrote:
I'm a bit confused, several past attoparsec versions seem to build just
fine with GHC 7.10:

  https://ghc.haskell.org/~hvr/buildreports/attoparsec.html

were there hidden breakages not resulting in compile errors?
Or are the fixes you mention about restoring -Wall hygiene?

I build with -Wall -Werror, and also have to maintain the test and benchmark suites.