Intero: ghc из конфигурации стека не совпадает

Когда 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). Что здесь происходит и как я могу это исправить? Я использую Emacs и Spacemacs на Windows 10.

2 ответа

Решение

Я совсем не эксперт по emacs, но я знаю, что файлы elisp во встроенном режиме указывают точную версию пакета на Haskell. Вам нужно будет обновить до нового пакета emacs. Я не знаю, как вы установили intero-mode, но я собираюсь догадаться, что (как и я) вы получили его от MELPA. В конечном итоге я перешел к установке через Git, чтобы мне было проще обновлять и тестировать функции, которые еще не были выпущены на MELPA. Вы можете сделать это:

  1. Клонирование https://github.com/commercialhaskell/intero где-нибудь в вашей файловой системе, например ~/.emacs.d/vendor/intero
  2. Добавьте такую ​​строку в ~/.emacs: (load-file "~/.emacs.d/vendor/intero/elisp/intero.el")

Первый stack update а потом stack install intero установить последнюю версию intero.

Другие вопросы по тегам