[Hackage] #350: cabal should check for duplicate module names
Hackage
trac at galois.com
Fri Sep 12 05:30:45 EDT 2008
#350: cabal should check for duplicate module names
----------------------------+-----------------------------------------------
Reporter: guest | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Cabal library | Version: 1.2.3.0
Severity: normal | Resolution:
Keywords: | Difficulty: normal
Ghcversion: 6.8.2 | Platform:
----------------------------+-----------------------------------------------
Comment (by duncan):
Actually it does now check for duplicate modules, however I noticed when I
was trying it that the check is never triggered because it gets `nub`ed
first.
The reason is that the `Monoid` instance is used to combine the build info
from multiple sections in the `.cabal` file (think of conditional bits)
and we use `nub (a ++ b)`. It's not entirely obvious that we should be
using `nub`. It means you can specify the same module in multiple
conditions and if several get enabled then it's not a problem, rather than
them having to be mutually exclusive.
I guess we could use something other than `nub` to combine them so that
duplicates within a section are preserved as far as to get to the explicit
check for them and only single duplicated between sections get merged.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/350#comment:1>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list