Usually done with cabal or stack.
https://cabal.readthedocs.io/en/latest/cabal-commands.html
cabal install
cabal update
cabal install cabal-install
(Unverified)cabal build
cabal run
cabal repl
cabal repl --build-depends package1, package2
cabal repl -b package1, package2
cabal init -i
cabal haddock
cabal get <package-name>
cabal list --installed
—
Example use:
cabal init -i
# Edit <name>.cabal:
# - include dependencies in build-depends (seperated by commas)
cabal build
cabal install --install-method=copy <package-name>
The executable will be at ~/.cabal/bin/
Eg:
cabal install --install-method=copy pandoc
# Executable would be at ~/.cabal/bin/pandoc
cabal install --enable-tests
cabal test
See:
cabal init
cabal update
cabal configure
cabal install
cabal build
cabal exec ghci