cabal install c2hs --ghc-options=-haddock
...
Building executable 'c2hs' for c2hs-0.28.6..
src/C2HS/C/Names.hs:1:1: error:
File name does not match module name:
Saw: ‘Main’
Expected: ‘C2HS.C.Names’
|
1 | -- C->Haskell Compiler: C name analysis
| ^
I think this is caused by https://ghc.haskell.org/trac/ghc/ticket/8944.
I am recording it here as it was highly non-obvious to me (I needed some time to recall that I have -haddock in my .cabal/config)
In the cabal tracker: haskell/cabal#5827