Section name clash checks in PackageDescription/Check.hs

Johan Tibell johan.tibell at
Wed Oct 12 21:02:03 CEST 2011


While adding some package checks for the new benchmark section I came up
with some questions regarding section names. I think we need to clarify the
design here.

Which things live in the same namespace? The current checks seems

* The library (i.e. package name) and executables live in different
namespaces and thus there's no check that executables don't share the
library name.

* The executables and test suites live in the same namespace:

  , check (not (null testsThatAreExes)) $
      PackageBuildImpossible $ "These test sections share names with
executable sections: "
        ++ commaSep testsThatAreExes

* The test suites and the library live in the same namespace:

  , check libNameClash $
      PackageBuildImpossible $
           "The test suite " ++ testName test
        ++ " has the same name as the package."

I think the latter is wrong. I think the executable, test suite, and
benchmark names should live in the same namespace and the package (and thus
library) name should be in a different one. Do you agree? If we all agreed
then I will remove the check for test suites/library name clashes above and
add a check that checks all pairs of executable, test suite, and benchmark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the cabal-devel mailing list