Upgrading the ghc version used by the haskell stack

I am trying to upgrade my version of ghc installed for haskell stack from 8.0.2 to 8.2.1 but it looks like I am missing something.

[user@localhost ~]$ stack --resolver ghc-8.2.1 setup
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

[user@localhost ~]$ stack ghci
Configuring GHCi with the following packages: 
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /tmp/ghci7878/ghci-script
Prelude> :q
Leaving GHCi.

      

I guess I need to take an extra step after updating the ghc stack version, but I'm not sure.

+3


source to share


1 answer


There are 2 options.

the workaround is every time you have to provide the ghc version when loading the stack.

ghc --resolver ghc-8.2.1 ghci

      

If you do not specify the ghc version, the stack will load the default version.



The second option is to finalize the ghc version for the stack as the default version. Below is the step used for this

configure *resolver: ghc-8.2.1* in the file *.stack/global-project/stack.yaml*

      

and reload your stack.

+1


source







All Articles