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?
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?
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:
warp executable from the package wai-app-static. In those cases, the options --overwrite-policy, --install-method and --installdir are useful.ghc and ghci see some desired set of libraries. Like this. In those cases, the options --lib and --package-env are useful.