How to upgrade GHC with Stack

前端 未结 1 1643
陌清茗
陌清茗 2021-02-13 14:00

The output of

stack ghc -- --version

is

The Glorious Glasgow Haskell Compilation Syste         


        
相关标签:
1条回答
  • 2021-02-13 14:22

    User dysfun from the IRC answered my question so I will post it here for posterity.

    To update GHC that's used to compile a project, go to the project's stack.yaml file.

    In there is the resolver field. Update that accordingly. Some examples:

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

    For my case, I learned from this webpage that resolver lts-9.0 uses GHC 8.0.2.

    Here's more on Stack's resolvers.

    0 讨论(0)
提交回复
热议问题