More feedback on Haskell 98 modules from the Programatica Team
08 Aug 2001 08:56:54 +0200
"Simon Peyton-Jones" <firstname.lastname@example.org> writes:
> I propose that hiding something that isn't exported should be
> considered an error. It's not actually harmful but it is misleading.
Or at least a warning? I don't know, but there may be reasons to do
it, say the imported module is under development, and will eventually
include that name.
> | Program 2: module A(module B, ...) where
> | ~~~~~~~~~~ import qualified B
> | ... code that doesn't import B ...
> I don't think it should matter whether B is imported qualified or not; I
> propose to remove the *unqualified* adjective in the above quote.
...but only allow qualified access to B by importers of A, right?
B.b -- okay
b -- not okay
> The export list specifies what is exported, and can include qualified
> module A( B.f ) where
> import qualified B
But here, f will be avalable to importers of A, unqalified, no? GHC
seems to do it this way, and I think it's a reasonable choice: If you
need to automatically provide the full functionality of another
module, you get it qualified (if you import it qualified); if you just
want to extend your module with functionality from another one, you
name each function.
*Shrug* No strong feelings one way or another.
If I haven't seen further, it is by standing in the footprints of giants