GHC ships with a certain set of libraries already installed. When you run the build command above cabal wants to "reinstall" some older versions of the libraries that ship with GHC. This is bad for obvious reasons.
If you really need to do this, it may work to use cabal-dev
instead of Cabal
. By the way, using Setup.hs
invokes the version of the Cabal
library that shipped with your compiler, where as running the cabal
command invokes the cabal-install
program.
cabal-dev
is a wrapper around cabal-install
(and thus Cabal
the library) that provides sandboxed builds. Making it safe to install programs that need different versions of the libraries that ship with GHC. The remaining question would be whether or not those older libraries would build against the newer GHC. In many cases the build will fail.
I highly recommend you use cabal-dev
for your day-to-day package building instead of cabal-install
. The benefits of sandboxing are many and strongly outweigh the risk of cabal-install
corrupting your package database by upgrading a package somewhere in the middle of a dependency chain for something you already have installed.
For more information about using cabal-dev
, I recommend this reddit post.
base
is a set of Haskell modules that provide much of the functionality that ships with every GHC install. It's a collection of useful libraries that most Haskell users will want and need.