简体   繁体   中英

Issues running tests with cabal and HUnit in haskell ('builds-depends' failed.)

I trying to run my first haskell program using cabal and HUnit. I seem to have trouble with my .cabal as I get the error:

λ 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.

Here is the .cabal file

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

test file:

import Test.HUnit
test1 = TestCase (assert True)

This is the problem:

build-depends:  Test.HUnit

Perhaps you wanted build-depends: hunit ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM