haskell 堆栈的基本用法失败

Fail with basic usage of haskell stack

我正在学习 Haskell 并尝试设置我的 Emacs 开发环境(阅读 this)。
我应该做的一件事是安装 hindent.
推荐方法 here 就是 stack install hindent。我想它应该安装在堆栈的 global-project space 中。我在 $HOME/.stack/global-project/stack.yaml 的全局堆栈 yaml 是:

flags: {}
extra-package-dbs: []
packages: []
extra-deps: []
resolver: ghc-7.10.3

我不使用任何系统 ghc(我的 $PATH 上没有 ghcghci)。
stack install hindent 它建议我扩展 extra-deps:

Run from outside a project, using implicit global project config
Using resolver: ghc-7.10.3 from implicit global project's config file: /home/me/.stack/global-project/stack.yaml

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

In the dependencies for hindent-5.2.1:
    descriptive must match >=0.7 && <0.10, but the stack configuration has no specified version
                (latest applicable is 0.9.4)
    exceptions must match -any, but the stack configuration has no specified version (latest applicable is 0.8.3)
    haskell-src-exts must match >=1.18, but the stack configuration has no specified version
                     (latest applicable is 1.18.2)
    monad-loops must match -any, but the stack configuration has no specified version (latest applicable is 0.4.3)
    mtl must match -any, but the stack configuration has no specified version (latest applicable is 2.2.1)
    path must match -any, but the stack configuration has no specified version (latest applicable is 0.5.9)
    path-io must match -any, but the stack configuration has no specified version (latest applicable is 1.2.0)
    text must match -any, but the stack configuration has no specified version (latest applicable is 1.2.2.1)
    unix-compat must match -any, but the stack configuration has no specified version (latest applicable is 0.4.2.0)
    utf8-string must match -any, but the stack configuration has no specified version (latest applicable is 1.0.1.1)
    yaml must match -any, but the stack configuration has no specified version (latest applicable is 0.8.20)

Recommended action: try adding the following to your extra-deps in /home/me/.stack/global-project/stack.yaml:
- descriptive-0.9.4
- exceptions-0.8.3
- haskell-src-exts-1.18.2
- monad-loops-0.4.3
- mtl-2.2.1
- path-0.5.9
- path-io-1.2.0
- text-1.2.2.1
- unix-compat-0.4.2.0
- utf8-string-1.0.1.1
- yaml-0.8.20

当我执行建议的操作时,它会提示一些新的依赖项(可能是之前添加的那些依赖项的依赖项)等。最后它会导致某些两个依赖项具有未满足版本的情况。

我认为我的配置(或对堆栈的理解)有问题,因为我认为获取隐式依赖项是构建工具的工作。

有没有更有经验的人可以推断出我初学者的错误是什么?

通常不建议使用 ghc 版本作为解析器,原因你已经发现:你需要手动指定很多包版本。相反,我建议切换到 lts-6.23 或其他类似的东西。

不确定。如果你只是想快速行动:

stack upgrade --git  && \
rm -rf ~/.stack      && \
stack setup          && \
stack install hindent

为什么不使用 GHC 8.X 和全新的 Stack? ;)