I'm trying to compile hackport ( here is sources: https://github.com/Nensha/hackport ) with newer cabal but always getting the same Error:
[61 of 91] Compiling Distribution.Client.Types ( cabal/cabal-install/Distribution/Client/Types.hs, dist/build/hackport/hackport-tmp/Distribution/Client/Types.o )
cabal/cabal-install/Distribution/Client/Types.hs:33:12:
Module
`Distribution.Compat.Exception'
does not export
`SomeException'
according Distribution.Compat.Exception there must not be any problems and in must come from base but fails. So the question is why?
Your problem is that
Hs-Source-Dirs: ., cabal/cabal, cabal/cabal-install
there are two modules Distribution.Compat.Exception
. One under cabal/cabal
and one under cabal/cabal-install
. The latter exports SomeException
, the former doesn't. But the compiler picked up the one from the Cabal
library, which doesn't. Maybe reordering the directories in the Hs-Source-Dirs
field would be a workaround.
Normally, when compiling cabal-install
, the source directories of the Cabal
library are not available, so the Distribution.Compat.Exception
that gets picked up is the one from cabal-install
.