2015-09-05 64 views
2

我創建使用堆棧0.1.3.1在Windows 8中的新項目的Haskell我stack.yaml文件看起來像這樣:當「堆棧測試」工作時,爲什麼運行「堆棧haddock」會出現構建計劃錯誤?

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

當我運行stack buildstack 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 

顯然,這完全是無稽之談—我不應該添加baseextra-deps,尤其是因爲我工作過的LTS包設置!這裏發生了什麼?

更新:正如在the answer below中所討論的,這似乎是堆棧中的一個錯誤,應該在更新的版本中修復。見https://github.com/fpco/minghc/issues/85

回答

4

猜測:您正在使用不包含文檔的GHC安裝,或者至少不是因爲堆棧期望它被發現。你可以嘗試使用「--install-ghc --no-system-ghc」嗎?我可能有特定的標誌名稱錯誤。

另外,您的系統上如何安裝GHC?

+0

'--install-ghc --no-system-ghc'使其工作,但我不知道爲什麼 - 據我可以告訴我有'base'和其他軟件包安裝的文檔全球GHC。我安裝了GHC並使用MinGHC 2015-08-13 64位堆疊在一起。任何想法爲什麼這會導致這個問題? –

+0

不,我不知道什麼會導致它。我會看看MinGHC的發佈。 –

+0

它看起來像MinGHC安裝程序有問題。爲了獲得更多細節,我需要提出更多的問題,而不是這裏的評論字段。你可以打開MinGHC的Github問題跟蹤器的問題嗎? –

2

我解決了這個問題,安裝了ghc-doc包(大多數包管理器都可用)。