Export lists in modules

Aaron Denney wnoise at ofb.net
Fri Feb 24 02:42:03 EST 2006


On 2006-02-21, Wolfgang Jeltsch <wolfgang at jeltsch.net> wrote:
> Am Dienstag, 21. Februar 2006 04:41 schrieb John Meacham:
>> on this note, I thought it would be nice to do a 'mostly unqualified'
>> import.
>>
>> import Foo qualified(foo,bar)
>>
>> which will have the effect of
>>
>> import Foo hiding(foo,bar)
>> import qualified Foo(foo,bar)
>>
>> since usually you can import a whole module unqualified except for a few
>> troublemakers.
>>
>>         John
>
> On the other hand, sometimes it makes sense to have a "mostly qualified" 
> import.  For example, if you import Data.Set or Data.Map you might want only 
> the type constructors to be imported unqualified and the rest to be imported 
> qualified.

import qualified Foo

unqualify1 = Foo.unqualify1
unqualify2 = Foo.unqualify2
...

(That is, this is already pretty easy to do.)

-- 
Aaron Denney
-><-



More information about the Haskell-prime mailing list