[英]Issues running tests with cabal and HUnit in haskell ('builds-depends' failed.)
我試圖使用cabal和HUnit運行我的第一個haskell程序。 出現錯誤時,我的.cabal文件似乎出現了問題:
λ cabal test
.\haskell.cabal has been changed. Re-configuring with most recently used
options. If this fails, please run configure manually.
cabal: haskell.cabal:21: Parse of field 'build-depends' failed.
這是.cabal文件
name: haskell
version: 0.1.0.0
synopsis: fibonacci functions
category: Testing
build-type: Simple
cabal-version: >=1.10
executable haskell
main-is: Main.hs
build-depends: base >=4.8 && <4.9
hs-source-dirs: src
default-language: Haskell2010
test-suite Tests
build-depends: Test.HUnit
hs-source-dirs: test
main-is: tests.hs
Type: exitcode-stdio-1.0
測試文件:
import Test.HUnit
test1 = TestCase (assert True)
這就是問題:
build-depends: Test.HUnit
也許您想要build-depends: hunit
?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.