cabal sdist:测试不合适的类型

cabal sdist: tests inappropriate type

我刚刚在 Haskell 中完成了我的第一个可执行文件 + 库 + 测试。 不幸的是,我无法使用 cabal sdist 命令创建 tar-ball。

cabal install --enable-tests && cabal build && cabal test 工作正常

cabal check returns 只有 -O2

的警告
>> cabal sdist --verbose
creating dist/src
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0
Distribution quality warnings:
'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.
Building source dist for UTFTConverter-0.1.0.0...
Preprocessing library UTFTConverter-0.1.0.0...
Preprocessing executable 'UTFTConverter' for UTFTConverter-0.1.0.0...
Preprocessing test suite 'library-tests:' for UTFTConverter-0.1.0.0...
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0/tests
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0
Installing src/Format.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format.hs
Installing src/Format/C.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/C.hs
Installing src/Format/Converter.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/Converter.hs
Installing src/Format/Raw.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/Raw.hs
Installing src/Format/RGB565.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Format/RGB565.hs
Installing src/Main.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/src/Main.hs
Installing tests/Tests.hs to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/tests/Tests.hs
Installing LICENSE to dist/src/sdist.-15440/UTFTConverter-0.1.0.0/LICENSE
Installing Setup.lhs to dist/src/sdist.-15440/UTFTConverter-0.1.0.0/Setup.lhs
Installing ./UTFTConverter.cabal to
dist/src/sdist.-15440/UTFTConverter-0.1.0.0/./UTFTConverter.cabal
creating dist/src/sdist.-15440/UTFTConverter-0.1.0.0
Installing tests to dist/src/sdist.-15440/UTFTConverter-0.1.0.0/tests
cabal: tests: inappropriate type

我的 cabal 版本是

>> cabal -V
cabal-install version 1.18.1.0
using version 1.18.1.3 of the Cabal library

我的 GHC 版本是

>> ghc -V
The Glorious Glasgow Haskell Compilation System, version 7.8.3

这是项目的 github 页面,也许有人可以重现此错误。 >> Link <<

extra-source-files 部分中删除 tests。您不能在该部分中放置目录。