
On Tue, 2009-01-13 at 20:58 +0100, Bas van Dijk wrote:
Could not find module `Data.Generics': it was found in multiple packages: base-3.0.3.0 syb cabal: Error: some packages failed to install: json-0.4.1 failed during the building phase. The exception was: exit: ExitFailure 1
The standard solution for this is to add a cabal flag that controls wether to depend on base-4 or base-3:
Note that in future it will be even easier. As of Cabal-1.6 (which comes with ghc-6.10 but works with older versions too) you can use CPP macros:
#if MIN_VERSION_base(4,0,0) import Data.Data (Data) #else import Data.Generics (Data) #endif
and not have to do anything in the .cabal file. Of course this does not really help you for base 3 / 4 because the only point of doing that is to preserve compatibility with ghc-6.8 and out-of-the-box ghc-6.8 comes with an older Cabal version and we generally cannot expect all users to upgrade their Cabal version. Duncan