Qualified names in import lists

Niklas Broberg niklas.broberg at gmail.com
Mon Dec 28 07:26:22 EST 2009

Hi all,

I have a bug report [1] for haskell-src-exts pertaining to the use of
qualified names in import specifications, e.g.

  module Main where
  import Foo (Bar.bar)

GHC apparently accepts this code, but I can find no mention of such a
feature in the GHC docs.

Personally I don't see why this should be allowed at all, as it breaks
the abstraction layer w.r.t. re-exporting names from other, possibly
internal, modules. If there's some reasonable use for it, it should at
the very least be tied to a documented and registered extension.

I've submitted a ticket for GHC [2] to either remove this feature, or
properly document it. I'd be curious to hear what the reasoning behind
it is, if any.



ps. Why is there no "GHC accepts invalid program" option for "Type of
failure"? Too few cases? I set this ticket to Other.

[1] http://trac.haskell.org/haskell-src-exts/ticket/57
[2] http://hackage.haskell.org/trac/ghc/ticket/3792

More information about the Glasgow-haskell-users mailing list