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