How to update GHC using the stack

Exit from

stack ghc -- --version

is an

The Glorious Glasgow Haskell Compilation System, version 7.10.3

I want to upgrade to GHC 8.

How can I tell Stack to update the GHC?

+10
source share
1 answer

IRC user dysfun answered my question, so I will post it here for posterity.

To update the GHC that was used to compile the project, go to the project file stack.yaml.

There is a solver field. Update it accordingly. Some examples:

resolver: ghc-8.0.2
resolver: lts-9.0
resolver: nightly-2015-09-21

For my case, I learned from this web page that lts-9.0GHC 8.0.2 is used for resolver .

Here's more about stack solvers.

+7
source

All Articles