Search code examples
haskellghccabalcabal-install

What does cabal's "Warning: Falling back to topdown solver for GHC < 7." mean?


When building with cabal on GHC6 it warns:

Warning: Falling back to topdown solver for GHC < 7.

What's the topdown solver and what is the meaning of the warning? How does it affect me?


Solution

  • The new modular solver doesn't work correctly for older GHC versions, in particular for ghc-6.12.X. There's a special case in this series where base-3 depends on base-4 and provides a compatibility layer by re-exporting functionality from the newer version.

    This special case isn't used anywhere else on Hackage, and I never considered it worth implementing it in the new solver.

    As both solvers are still provided by cabal-install, it simply defaults to the old "topdown" solver for older GHC versions, and selects the newer "modular" solver by default for new GHC versions.

    If you try to select the modular solver with ghc-6.12.X, it should still be able to find solutions as long as all libraries involved support base-4. But base-3 will always be seen as unavailable due to the self-dependency.