My Haskell Setup 2019

·

This method is OS, GHC version, and editor agnostic.

Enable docker in your stack.yaml file. This is optional. If this causes issues in later steps disable it.

# stack.yaml
docker:
    enable: true

Set up direnv to use the paths given by stack.

# .envrc
export PATH=$(/usr/local/bin/stack path --bin-path)
$ direnv allow .

Install ghcid and copy it to directory for compiler tools

$ stack build --copy-compiler-tool ghcid

Run the following command while editing code in your favorite editor

$ ghcid --command "stack repl" --test ":main"

¶¶¶¶¶

¶¶¶¶¶

¶¶¶¶¶

3 responses to “My Haskell Setup 2019”

  1. So everything comes from Stack, i.e. no more globally installing ghc from system’s package manager or something ?

    1. William P. Velazquez

      Correct. Everything is now done using Stack.

      A developer at my current workplace does not use Stack. She uses GHC, Cabal and Nix OS. But she is generally fond of old ways, and hates new tools.

    2. William P. Velazquez

      Do you know any DevOps people as good as you are? Remote work is acceptable.

Leave a comment