Build systemsMiscellaneous
Cabal new-build
http://blog.ezyang.com/2016/05/announcing-cabal-new-build-nix-style-local-builds/
Note: Requires cabal >= 1.24
TL;DR;
cabal new-configure
cabal new-build
Stack
https://docs.haskellstack.org/en/stable/README/
TL;DR;
stack new my-project
cd my-project
stack setup
stack build
stack exec my-project-exe
Nix
TL;DR;
From https://github.com/Gabriel439/haskell-nix
curl https://nixos.org/nix/install | sh
nix-env -i cabal2nix
nix-env -i nix-prefetch-git
nix-env -i cabal-install
cabal update
cabal install cabal-install
cabal2nix . > default.nix
cat << EOF > build.nix
let
pkgs = import <nixpkgs> { };
in
pkgs.haskellPackages.callPackage ./default.nix { }
EOF
nix-build build.nix