[Haskell-cafe] Re: Proposal: TypeDirectedNameResolution

Henning Thielemann lemming at henning-thielemann.de
Mon Aug 3 17:59:48 EDT 2009

Heinrich Apfelmus schrieb:

> Note that there are alternative solution for this particular problem.
> For instance, a version of  qualified  with different semantics will do;
> something like this
>    import Data.List
>    import sometimes qualified Data.Map as Map

Isn't that quite the same as

import Data.Map as Map


But you risk breaking packages when new qualifiers are added to imported

>    foo :: Map k a              -- accepted with out qualifier 'Map'
>                                -- because it's unambiguous
>    bar m = map show m          -- defaults to  Data.List.map ,
>                                -- 'Map' prefix would be need in
>                                -- cases of ambiguity
> The idea being that names only need to be qualified when they are
> ambiguous, which  Map  and  ByteString  are not.

More information about the Haskell-Cafe mailing list