1
我試圖創建一個使用HUnit一個測試套件我哈斯克爾/驚天動地包,我得到以下錯誤,當我運行的陰謀測試:驚天動地錯誤:至少有以下依賴性缺失:
[email protected]:~/backup/projects/apollo$ cabal test
Re-configuring with test suites enabled. If this fails, please run configure
manually.
Resolving dependencies...
Configuring apollo-0.1.0.0...
cabal: At least the following dependencies are missing:
hunit >=1.2 && <1.4
我已經運行'cabal hunit'來安裝hunit。要檢查它是否已經安裝我已經運行「GHC-PKG列表HUnit」返回:
[email protected]:~/backup/projects/apollo$ ghc-pkg list HUnit
/var/lib/ghc/package.conf.d
HUnit-1.2.5.2
/home/matthew/.ghc/x86_64-linux-7.6.3/package.conf.d
HUnit-1.3.1.1
爲什麼不能陰謀配置是否正確?
我曾嘗試:
,以確保有全局(1.2.5.2)版或局部(1.3.1.1)版本被發現的陰謀通過指定集結取決於爲:
build-depends: base >=4.6 && <4.7,
hunit >=1.2 && <1.4
在我的[packagename] .cabal文件中。
我也注意到https://www.haskell.org/cabal/FAQ.html#runghc-setup-complains-of-missing-packages,並不理解那裏的解釋,以及Setup.hs是如何相關的。
我Setup.hs文件只包含
import Distribution.Simple
main = defaultMain
我已經嘗試添加 '導入Test.HUnit' 到Setup.hs文件:
import Distribution.Simple
import Test.HUnit
main = defaultMain
運行 '陰謀測試' 與此Setup.hs給出了相同的錯誤。