[Haskell-cafe] Proposal: Shorter Import Syntax

Kosyrev Serge _deepfire at feelingofgreen.ru
Wed Jun 3 18:45:59 UTC 2015

amindfv at gmail.com writes:
> I'd be +1 provided we can write e.g.:
> import Data.Map (Map) as M (fromList)
> And then we'd get only the Map type and M.fromList

Then wouldn't it also make sense to also:

  1. eliminate the arguably confusing double-import through as-without-qualified:

       import FQMN as M .. (which imports the exportlist of FQMN twice)

     Does a lot of code use that?  Is this a good practice?  Do we want
     to encourage this kind of usage?

  2. and take advantage of the reduced complexity by implying
     "qualified", wheneved "as" is present, by replacing:

       import qualified FQMN as M …


       import FQMN as M …

  3. effectively drop the "qualified" keyword from use (can be done lazily)

It would break things, though.

с уважениeм,
Косырев Серёга

More information about the Haskell-Cafe mailing list