在 haskell 中使用 cabal 和 HUnit 问题 运行 测试('builds-depends' 失败。)
Issues running tests with cabal and HUnit in haskell ('builds-depends' failed.)
我正在尝试 运行 我的第一个 haskell 使用 cabal 和 HUnit 的程序。当我收到错误时,我的 .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
?
我正在尝试 运行 我的第一个 haskell 使用 cabal 和 HUnit 的程序。当我收到错误时,我的 .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
?