How to upgrade GHC with Stack

时光怂恿深爱的人放手 提交于 2019-12-21 03:50:33

问题


The output of

stack ghc -- --version

is

The Glorious Glasgow Haskell Compilation System, version 7.10.3

I want to upgrade to GHC 8.

How can I tell Stack to upgrade GHC?


回答1:


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.



来源:https://stackoverflow.com/questions/45498425/how-to-upgrade-ghc-with-stack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!