gpt4 book ai didi

haskell - Intero:来自堆栈配置的 ghc 不匹配

转载 作者:行者123 更新时间:2023-12-04 20:30:15 24 4
gpt4 key购买 nike

intero-mode尝试自动安装 Intero,它产生以下错误:

Intero is not installed in the Stack environment.

Installing intero-0.1.23 automatically ...


Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for intero-0.1.23:
ghc-8.2.2 from stack configuration does not match >=7.8 && <8.2.2 (latest matching version
is 8.2.1)
needed since intero is a build target.

Some potential ways to resolve this:

* Recommended action: try adding the following to your extra-deps
in <project directory>\stack.yaml:

- ghc-8.2.1

* Set 'allow-newer: true' to ignore all version constraints and build anyway.

* You may also want to try using the 'stack solver' command.

Plan construction failed.
Could not install Intero!

We don't know why it failed. Please read the above output and try
installing manually. If that doesn't work, report this as a
problem.

WHAT TO DO NEXT

If you don't want to Intero to try installing itself again for
this project, just keep this buffer around in your Emacs.

If you'd like to try again next time you try use an Intero
feature, kill this buffer.

这在我升级到 lts-10.0 后开始发生,但在此之前,我在使用 Intero 时遇到了问题(我在 https://github.com/commercialhaskell/intero/issues/499 报告了它)。这里发生了什么,我该如何解决?我在 Windows 10 上使用 emacs 和 spacemacs。

最佳答案

我根本不是 emacs 专家,但我知道 intero-mode elisp 文件指定了 intero Haskell 包的确切版本。您需要更新到较新的 emacs 包。我不知道你一开始是如何安装 intero-mode 的,但我猜(像我一样)你是从 MELPA 那里得到的。最终,我转而使用 Git 进行安装,这样我就可以更轻松地升级和测试尚未在 MELPA 上发布的功能。您可以通过以下方式执行此操作:

  • 克隆 https://github.com/commercialhaskell/intero文件系统上的某个地方,例如~/.emacs.d/vendor/intero
  • 将这样的一行添加到 ~/.emacs :(load-file "~/.emacs.d/vendor/intero/elisp/intero.el")
  • 关于haskell - Intero:来自堆栈配置的 ghc 不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48029802/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com