
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. Cheers, /Niklas 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

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.
It certainly is an extension beyond Haskell'98 and Haskell 2010, which do not permit qualified names in import lists. I cannot think for any use for such a feature, never mind a good one. If ghc really does accept the example given, I would like to know what entity Bar.bar refers to, since it cannot possibly be exported by Foo. Regards, Malcolm
participants (2)
-
Malcolm Wallace
-
Niklas Broberg