Pregunta

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?

¿Fue útil?

Solución

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.

Otros consejos

Just ignore it.

The message means that the dependency solver component decided to fall back to the old algorithm because you're using GHC < 7. For more on what the dependency solver does, see these slides by Andres Löh and Duncan Coutts. They also explain the difference between the new (modular) and the old (topdown) solvers.

(If you really want to, you can force cabal install to use the new solver by running cabal install --solver=modular.)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top