[Haskell-cafe] Design your modules for qualified import

Jules Bean jules at jellybean.co.uk
Tue Jun 10 07:01:29 EDT 2008

Ketil Malde wrote:
> And - is there a way to make GHCi use aliased qualification?  I find
> my self typing detailed taxonomies all the time there.
> For Haskell', I would relly like to have good, generic
> classes/interfaces for this, so that a) code becomes readable
> (including import lists), and b) code can be written more generically,
> and c) it becomes easier to switch between e.g. different string
> types. 

Class abstraction is not zero cost. Abstract far enough that GHC can't 
see how to resolve dictionaries at compile time (insufficient inlining) 
and you will not only slow things down just because of the dictionary 
cost, you'll also break all those nice RULES and lose your fusion.

As for import syntax / readability, whilst I'm familiar with the 
problems (most are mentioned in this thread) I'm not aware of any 
concrete proposal to improve the situation.


More information about the Haskell-Cafe mailing list