2

Windows 8 で Stack 0.1.3.1 を使用して新しい Haskell プロジェクトを作成しています。stack.yamlファイルは次のようになります。

flags: {}
packages:
- 'lazy-engine'
extra-deps: []
resolver: lts-3.4

stack buildまたはを実行するとstack test、すべてが美しく機能します。haddockコマンドラインから手動で実行でき、それも機能します。しかし、実行するstack haddockと、次のような出力が得られます。

Setting codepage to UTF-8 (65001) to ensure correct output from GHC
NOTE: the haddock command is functionally equivalent to 'build --haddock'
While constructing the BuildPlan the following exceptions were encountered:

--  Failure when adding dependencies:
      base: needed (>=4.5 && <4.9), latest is 4.8.1.0, but not present in build plan
    needed for package: array-0.5.1.0

--  While attempting to add dependency,
    Could not find package base in known packages

--  Failure when adding dependencies:
      array: needed (-any), latest is 0.5.1.0, but couldn't resolve its dependencies
      base: needed (>=4.2 && <5), latest is 4.8.1.0, but not present in build plan
      deepseq: needed (>=1.2 && <1.5), latest is 1.4.1.2, but couldn't resolve its dependencies
      ghc-prim: needed (-any), latest is 0.4.0.0, but not present in build plan
    needed for package: containers-0.5.6.2

--  Failure when adding dependencies:
      array: needed (>=0.3 && <0.6), latest is 0.5.1.0, but couldn't resolve its dependencies
      base: needed (==4.3.* || >=4.5 && <4.9), latest is 4.8.1.0, but not present in build plan
    needed for package: deepseq-1.4.1.1

--  While attempting to add dependency,
    Could not find package ghc-prim in known packages

--  Failure when adding dependencies:
      base: needed (>=4.7 && <5), latest is 4.8.1.0, but not present in build plan
      containers: needed (==0.5.*), latest is 0.5.6.3, but couldn't resolve its dependencies
    needed for package: lazy-engine-0.1.0.0

Recommended action: try adding the following to your extra-deps in 
    C:\Users\Aaron\Documents\GitHub\lazy-engine\stack.yaml
- base-4.8.1.0
- ghc-prim-0.4.0.0

You may also want to try the 'stack solver' command

明らかにこれはナンセンスです —特に、LTS パッケージ セットで作業しているので、base自分のに追加する必要はありません! extra-depsここで何が起こっているのですか?

更新:以下の回答で説明されているように、これはスタックのバグのようで、新しいバージョンで修正する必要があります。https://github.com/fpco/minghc/issues/85を参照してください。

4

2 に答える 2

4

推測: ドキュメンテーションを含まないGHCインストールを使用しているか、少なくともスタックが検出することを期待していない. 「--install-ghc --no-system-ghc」で試すことはできますか? 特定のフラグ名が間違っている可能性があります。

また、GHC はどのようにシステムにインストールされていますか?

于 2015-09-05T19:50:13.240 に答える
2

パッケージをインストールすることでこれを解決しましたghc-doc(ほとんどのパッケージマネージャーで利用可能です)。

于 2016-10-09T15:12:23.427 に答える