Skip to content

cabal install fails with ghc-options=-haddock #229

@jwaldmann

Description

@jwaldmann
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions