- The GHCup Haskell installer, version latest
brew install ghcup
- ghcup configuration, in ~/.zshrc add the following configuration
export PATH="$HOME/.ghcup/bin:$PATH"
ghcup tui # to easily setup the haskell toolchain
- or better install tools one by one
ghcup install ghc recommended
ghcup set ghc recommended
ghcup install stack recommended
ghcup set stack recommended
ghcup install cabal recommended
ghcup set cabal recommended
ghcup install hls recommended
ghcup set hls recommended
- Test the installation of the toolchain
ghc --version
ghci --version
stack --version
cabal --version
- Toolchain
"haskell.toolchain": {
"hls": "latest",
"cabal": "latest",
"ghc": "latest",
"stack": "latest"
},
- update index from hackage
cabal update
- install dependencies
cabal install
- build
cabal build
- run
cabal run
- test REST Web Endpoints
curl -v http://localhost:9090/hello
- repl
cabal repl
- test
cabal test
cabal test --test-show-details=direct