Skip to content

Instantly share code, notes, and snippets.

@dmitriz
Created August 22, 2019 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitriz/2b63319b52b2347d36bde6524bdf896b to your computer and use it in GitHub Desktop.
Save dmitriz/2b63319b52b2347d36bde6524bdf896b to your computer and use it in GitHub Desktop.
haskell stack
With no local config present, `stack` is picking the old ghc 8.2.2:
```sh
➜ test stack ghci
Note: No local targets specified, so a plain ghci will be started with no package hiding or package options.
You are using snapshot: lts-11.9
If you want to use package hiding and options, then you can try one of the following:
* If you want to start a different project configuration
than /Users/dmitrizaitsev/.stack/global-project/stack.yaml, then you can use stack init to create a new stack.yaml for
the packages in the current directory.
* If you want to use the project configuration
at /Users/dmitrizaitsev/.stack/global-project/stack.yaml, then you can add to its 'packages' field.
Configuring GHCi with the following packages:
GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /private/var/folders/qg/f15r0d6s1gj6nsbg_517515h0000gn/T/haskell-stack-ghci/2a3bbd58/ghci-script
Prelude>
```
However, my current ghc is 8.6.5:
```sh
➜ test ghci
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
Loaded package environment from /Users/dmitrizaitsev/.ghc/x86_64-darwin-8.6.5/environments/default
Prelude>
```
For some unclear reason, `stack` is instead referring to `lts-11.9`. But where is it defined?
@dmitriz
Copy link
Author

dmitriz commented Aug 22, 2019

Here is my ~/.stack/config.yaml:

# This file contains default non-project-specific settings for 'stack', used
# in all projects.  For more information about stack's configuration, see
# http://docs.haskellstack.org/en/stable/yaml_configuration/
#
system-ghc: true

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