infelicity in module imports

Brian Boutel brian@boutel.co.nz
Fri, 13 Jul 2001 08:47:05 +1200


Simon Peyton-Jones wrote:
> 
> | There is still a
> | strange asymmetry, too. Whereas adding "qualified" to "import
> | Modname ( a, b, c)" doesn't change which entities are
> | imported, just the ability to refer to them by unqualified
> | names, adding qualified" to "import Modname hiding ( a, b,
> | c)" has the effect of importing everything that was previously hidden.
> 
> Not so.  I hope the Report now unambiguously states that
> 
>         import M hiding (a,b,c)
>         import qualified M hiding(a,b,c)
> 
> imports exactly the same entities (namely all that M exports
> except a,b,c), only in the latter case only the qualified names are
> brought into scope.
> 
> Can you suggest a way I could state it more clearly in the Report?
> 

I'm sure the version of the report I looked at yesterday still said that
hiding clauses had no effect in qualified imports, which was the basis
of my remark, but today's version clearly doesn't.

I think the latest version is about as clear as we will get.

--brian