[Haskell] Hierarchical module namespace extension notsufficiently flexible

Simon Marlow simonmar at microsoft.com
Tue Mar 8 11:02:38 EST 2005


On 08 March 2005 15:39, Malcolm Wallace wrote:

> "Simon Marlow" <simonmar at microsoft.com> writes:
> 
>>>   module R( qualified module Q( f,g ) ) where
>>> 	f = ...; g = ...
>> 
>> If we're going to allow (... items ...) at all, then I suggest
>> instead that the last example be written:
>> 
>>    module R( qualified module R(f,g) as Q ) where
>>      f = ...; g = ...
> 
> I initially understood the first form to mean something different,
> although admittedly the original example does not actually illustrate
> it:
> 
>       module R( f,g, qualified module Q( f,g ) ) where
>         import qualified Q (f,g,h)
>     	f = ...; g = ...
> 
> That is, the subordinate items mentioned in conjunction with the
> qualified export are a subset of those imported from Q, not those
> defined in R.  Within the subordinate clause of the export list, they
> do not need further qualification since they belong unambiguously to
> Q. 

Yes, I think we're all on the same page here.  That's my understanding
of the meaning of 'qualified module Q(f,g)' too, and I think it's what
Simon intended.

Cheers,
	Simon


More information about the Libraries mailing list