我創建使用堆棧0.1.3.1在Windows 8中的新項目的Haskell我stack.yaml
文件看起來像這樣:當「堆棧測試」工作時,爲什麼運行「堆棧haddock」會出現構建計劃錯誤?
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
顯然,這完全是無稽之談—我不應該添加base
我extra-deps
,尤其是因爲我工作過的LTS包設置!這裏發生了什麼?
更新:正如在the answer below中所討論的,這似乎是堆棧中的一個錯誤,應該在更新的版本中修復。見https://github.com/fpco/minghc/issues/85。
'--install-ghc --no-system-ghc'使其工作,但我不知道爲什麼 - 據我可以告訴我有'base'和其他軟件包安裝的文檔全球GHC。我安裝了GHC並使用MinGHC 2015-08-13 64位堆疊在一起。任何想法爲什麼這會導致這個問題? –
不,我不知道什麼會導致它。我會看看MinGHC的發佈。 –
它看起來像MinGHC安裝程序有問題。爲了獲得更多細節,我需要提出更多的問題,而不是這裏的評論字段。你可以打開MinGHC的Github問題跟蹤器的問題嗎? –