使用堆栈安装shuffle库时出错

时间:2016-09-19 02:35:17

标签: haskell haskell-stack

使用stack 1.2.0LTS 7.0我在安装shuffle库时遇到以下错误:

$ cabal get shuffle
$ cd shuffle-0.1.3.3
$ stack build
...
/tmp/shuffle-0.1.3.3/Setup.hs:2:1: error:
    Failed to load interface for ‘Distribution.Simple.UUAGC’
    Perhaps you meant
      Distribution.Simple.UHC (from Cabal-1.24.0.0)
      Distribution.Simple.GHC (from Cabal-1.24.0.0)
      Distribution.Simple.JHC (from Cabal-1.24.0.0)
    Use -v to see a list of the files searched for.

/tmp/shuffle-0.1.3.3/Setup.hs:3:1: error:
    Failed to load interface for ‘UU.UUAGC’
    Use -v to see a list of the files searched for.

--  While building package shuffle-0.1.3.3 using:
      /usr/local/bin/ghc --make -odir /tmp/shuffle-0.1.3.3/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/setup -hidir /tmp/shuffle-0.1.3.3/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/setup -i -i. -package=Cabal-1.24.0.0 -clear-package-db -global-package-db -package-db=/home/asr/.stack/snapshots/x86_64-linux/lts-7.0/8.0.1/pkgdb /tmp/shuffle-0.1.3.3/Setup.hs -o /tmp/shuffle-0.1.3.3/.stack-work/dist/x86_64-linux/Cabal-1.24.0.0/setup/setup
    Process exited with code: ExitFailure 1

我使用以下stack.yaml文件:

resolver: lts-7.0

# Local packages, usually specified by relative directory name
packages:
- '.'
extra-deps:
- logict-state-0.1.0.2
- pqueue-1.3.1.1
- uhc-util-0.1.6.6
- uuagc-0.9.52.1
- uuagc-cabal-1.0.6.0
- uulib-0.9.22

我是否需要在库中或stack.yaml中添加/更改内容? (使用cabal-install)我没有问题。

2 个答案:

答案 0 :(得分:3)

我通过将以下内容添加到stack.yaml:

来实现此功能
explicit-setup-deps:
    shuffle: true

有关详细信息,请参阅:https://docs.haskellstack.org/en/stable/yaml_configuration/#explicit-setup-deps

答案 1 :(得分:0)

此程序包似乎要求您安装uuagc-cabal来构建它。从Cabal-1.23开始,可以在cabal文件的custom-setup部分中捕获Setup.hs文件的这些类依赖项。

有关此堆栈功能的票证似乎与此处相互关联: