Skip to content

Instantly share code, notes, and snippets.

@nkpart
Last active September 5, 2016 21:08
Show Gist options
  • Save nkpart/b4de9e8750959eb7238ecb0c5d94c4c6 to your computer and use it in GitHub Desktop.
Save nkpart/b4de9e8750959eb7238ecb0c5d94c4c6 to your computer and use it in GitHub Desktop.
  1. Installing GHC
stack setup --resolver ghc-8.0.1

This is the template for all future commands:

stack --resolver ghc-8.0.1 exec --no-ghc-package-path -- ghc --version
  1. Installing latest cabal-install

This install will cabal globally. On my mac the binary goes into ~/Library/Haskell/bin. You still want to stack exec as that puts GHC on the path.

stack --resolver ghc-8.0.1 exec --no-ghc-package-path -- cabal install cabal-install -j
  1. Now try new-build
stack --resolver ghc-8.0.1 exec --no-ghc-package-path -- cabal new-build
stack exec --resolver ghc-8.0.1 --no-ghc-package-path -- ghcid --command="cabal new-repl"

If you get issues about a package index being out of date (on os x), that's a known issue - http://blog.ezyang.com/2016/05/announcing-cabal-new-build-nix-style-local-builds/

@nkpart
Copy link
Author

nkpart commented Sep 5, 2016

∴ #cabal new-repl -v0 --ghc-options -ghci-script=wat

Leads to a new build of all local dependencies when you change the ghci-script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment