#4980: Warning about module abbreviation clashes
---------------------------------+------------------------------------------
Reporter: Lemming | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by Lemming):
Replying to [comment:1 simonpj]:
> Hmm. It's sometimes very useful to do just that!
Because of that, I do not propose this option to be part of -Wall. But the
way I import modules it is almost sure, that renaming a module to the same
abbrevation was an accident (e.g. when merging two import lists).
> And indeed sometimes the two really ''do'' export `ident`, but in both
cases it's the ''same'' `ident`, so it's fine.
But it would also be no problem to use two different renamings, say
{{{
import qualified Data.A as DA
import qualified Control.A as CA
}}}
and then being able to refer to ident by both DA.ident and CA.ident,
right? I mean, why do two modules export the same identifier? E.g. because
one module is meant as central module like Foreign that exports
identifiers of sub-modules like Foreign.Ptr. In this case I would decide
for one style, either importing all identifiers from the central module
Foreign or importing all of them from the specific sub-modules like
Foreign.Ptr, Foreign.Storable etc. Another reason might be that a module
was split and the identifiers are exported from the unsplit module for
compatibility reasons. In this case programmers are encouraged to use the
split modules exclusively.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4980#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs