如何使用Stack升级GHC [英] How to upgrade GHC with Stack
本文介绍了如何使用Stack升级GHC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
stack ghc -- --version
是
The Glorious Glasgow Haskell Compilation System, version 7.10.3
我想升级到GHC 8.
I want to upgrade to GHC 8.
我如何告诉Stack升级GHC?
How can I tell Stack to upgrade GHC?
推荐答案
IRC的用户dysfun回答了我的问题,因此我将其张贴在这里以供后代参考.
User dysfun from the IRC answered my question so I will post it here for posterity.
要更新用于编译项目的GHC,请转到项目的stack.yaml
文件.
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
对于我来说,我从此网页了解到,解析器lts-9.0
使用GHC 8.0 .2.
For my case, I learned from this webpage that resolver lts-9.0
uses GHC 8.0.2.
这篇关于如何使用Stack升级GHC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文