[Haskell-cafe] Qualified import syntax badly designed (?)

Neil Mitchell ndmitchell at gmail.com
Wed Jul 9 05:49:51 EDT 2008


Hi

> declaration with a regular syntax. For example:
>
>     import Data.Map as Map
>         unqualified (Map, (\\))
>         qualified   (lookup, map, null)
>         hiding      (filter)

I think I prefer this to my proposal, plus its closer to the current
syntax. I think its also nearly equal to what Tom Davie came up with,
given some keyword renaming. If we dropped the unqualified keyword,
and just required unqualified things to come directly after, we get
the full benefits of not introducing any keywords.

>  * A special case can be made when all three clauses are dropped so that, if
> there's no 'as'-clause then everything is imported unqualified, otherwise
> everything is imported qualified.

That's not the current semantics. Currently 'as' means everything is
imported unqualified and also qualified.

> Why 'implicit' and 'explicit'? Do you mean something like 'include' and 'exclude'?

I want to refer to these things explicitly (with a module name), I
want to refer to these things implicitly (without a module name). I
have no particular attachment to the keywords - think of it as a
discussion starter rather than a suggestion.

Thanks

Neil


More information about the Haskell-Cafe mailing list