Cabal/How to install a Cabal package

From HaskellWiki
< Cabal
Revision as of 10:06, 10 March 2021 by AlexanderBondarenko (talk | contribs) (Remove outdated stuff)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There's an interesting Haskell package on Hackage you'd like to try. How do you install it on your system?

Installing a library

While it is possible to "install" a library package "globally" it is most certainly a bad idea.

You should use project environment and package dependencies.

Please read the instructions for your package tool on how to set things up:

Installing an executable

First, check your package site for binary releases. It may turn out you don't have to build anything.

If you have to build from source, clone a package repository and look for the project files it uses. Then build with the appropriate project tool.

You may want to tweak the project file to use different options or dependency sets.

You may now use executables right from their build environment or copy them to your search $PATH.