问题
I try to generate documentation for my executable using cabal haddock
. My project structure looks like this:
~/.../project_name
project_name.cabal
Setup.hs
src/
Main.hs
Data/
...
test/
MainTestSuite
...
When I run cabal haddock --executable
it fails with the following error message:
module ‘projects-0.1.0.0:Main’ is defined in multiple files: dist/build/tmp-8215/src/Main.hs
dist/build/tmp-8215/./Setup.hs
The Source.hs
file has these contents:
import Distribution.Simple
main = defaultMain
The ghc
Version is 7.8.3
and the haddock version is 2.14.3
.
来源:https://stackoverflow.com/questions/29276971/cabal-haddock-failing-because-function-is-defined-in-multiple-files