Closed
Description
name: duplicate-modules
version: 0.0
cabal-version: 2.0
build-type: Simple
category: NA
maintainer: NA
synopsis: NA
description: NA NA
license: BSD3
license-file: LICENSE
flag expose
library
default-language: Haskell2010
if flag(expose)
exposed-modules: Foo
else
other-modules: Foo
cabal check
is unhappy with this:
Warning: The package will not build sanely due to these errors:
Warning: Duplicate modules in library: Foo
Warning: Hackage would reject this package.
I understand that it's a tricky situation for cabal
and that potentially there could be exponentially many flag combinations, but practically, when number of flags is < 5, I'd expect cabal
to evaluate all possible combinations and validate respective configurations independently.