Haskell

zimbatm edited this page Feb 20, 2018 · 2 revisions

+ cabal sandbox

Add the following to your global ~/.direnvrc file:

layout_haskell() {
  PATH_add ~/.cabal/bin
  [ -d .cabal-sandbox ] || cabal sandbox init
  PATH_add .cabal-sandbox/bin
  export GHC_PACKAGE_PATH=$(cabal exec -- sh -c "echo \$GHC_PACKAGE_PATH")
}

Now in each haskell project's .envrc use the layout haskell directive to automatically create the sandbox and add .cabal-sandbox/bin to your PATH. It's also not necessary to prefix all the commands with cabal exec anymore.

+ stack

https://meinwords.wordpress.com/2018/02/19/my-haskell-setup/

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.