haskellcabalstackage

cabal sandbox with stackage


I want to point my global cabal config to use stackage LTS only.

Does cabal sandbox provide any value in that case?

As I understand there should be no cabal hell anymore as all projects will use a predetermined set of package that are guaranteed to build together.

Is there any way to prebuild all stackage LTS packages to speed up all future project builds?


Solution

  • Why Sandboxes?

    I think there are still benefits to using sandboxes:

    Pre-build LTS Packages

    If you are set on pre-building all of your packages you can use the following to install all the packages listed in a cabal.config file.

    cat cabal.config | sed -rn 's/^.* ([^ ]+) ==.*/\1/gp' | xargs cabal install