Creating a new projectBasics
With cabal-install
-
Install/upgrade to the most recent
cabal-install
version. If you don't already have thecabal
executable (thecabal-install
package), install it from your distributions package manager or via The Haskell Platform. To upgrade:cabal update cabal install Cabal cabal-install
Make sure the new
cabal
executable is on your$PATH
., update symlink if necessary. -
Create a new project:
mkdir myproject && cd myproject cabal init
-
Install
ghcid
and make sure its on your$PATH
:cabal v2-install ghcid
-
Build your project:
cabal v2-build
With Stack
-
Install/upgrade to the most recent Stack version, follow the docs here. To upgrade:
stack upgrade
-
Create a new project directory:
stack --resolver=lts-12.16 new myproject cd myproject
-
Build your project:
stack build
With Nix
TODO