[Haskell-cafe] Problem with publishing project/packages

Ben Franksen ben.franksen at online.de
Tue Apr 28 14:38:22 UTC 2020

Am 28.04.20 um 15:38 schrieb Dominik Schrempf:
> Maybe I should have been more specific. I can compile the package with `stack
> build`, but never built with cabal directly.
> My cabal versions are:
>     + cabal --version
>     cabal-install version
>     compiled using version of the Cabal library
> The command I use is
>     cabal build
> or
>     cabal haddock --haddock-for-hackage --haddock-hyperlink-source
> v2-build and new-build fail with the error I posted below.

By default cabal uses the ghc that it finds in your PATH. My guess is
that this is a different version than that in your stack setup, which
means cabal may select some older or newer dependencies as a result.

If you have the same ghc, you could look at the versions of the
libraries that cabal selects and that give you trouble. Compare them to
what your working stack setup uses and adapt the version bounds
accordingly in your cabal file. Or perhaps stack can be convinced to
write a cabal file that freezes the versions to exactly the set
supported by that setup?


More information about the Haskell-Cafe mailing list