haskellcabalcabal-install

What is the difference between install, v1-install, v2-install and new-install?


The commands install, v1-install, v2-install and new-install are simply described to "Install packages" when running man cabal. Are they different from one another? Which is the preferred option?


Solution

  • For modern versions of cabal-install, install, new-install and v2-install are the same. v1-install and the other v1- commands are obsolete and should not be used anymore.

    Notice that, when developing a cabal package, the install command is largely unnecessary. Running cabal build and cabal repl will automatically install the required dependencies (listed in the build-depends: section of the cabal file).

    cabal install is still useful in cases like the following: