【问题标题】:upgrading the ghc version being used by haskell stack升级 haskell 堆栈使用的 ghc 版本
【发布时间】:2017-08-07 10:12:30
【问题描述】:

我正在尝试将我为 haskell 堆栈安装的 ghc 版本从版本 8.0.2 更新到 8.2.1,但似乎我遗漏了一些东西。

[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.

我想在更新堆栈的 ghc 版本之后我需要做一些额外的步骤,但我不确定。

【问题讨论】:

标签: haskell haskell-stack


【解决方案1】:

有 2 个选项。

临时解决方案是每次在加载堆栈时必须提供 ghc 的版本。

ghc --resolver ghc-8.2.1 ghci

如果不给出 ghc 的版本,堆栈加载默认版本。

第二个选项是将堆栈的 ghc 版本永久配置为默认版本。以下是用于此的步骤

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

并重新启动您的堆栈。

【讨论】:

  • 谢谢。我知道这个解决方案。我想了解是否可以使用 configure 命令。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-03
  • 2022-06-13
  • 2018-12-21
  • 2012-04-02
  • 1970-01-01
  • 2018-05-08
相关资源
最近更新 更多