[Haskell-cafe] Proposal: Shorter Import Syntax

malcolm.wallace malcolm.wallace at me.com
Fri Jun 5 08:07:09 UTC 2015

Here are some more numbers.  In our private code base of ~12,400 modules totalling >2,300,000 LoC, there are ~143,800 import lines, of which ~65,000 use the "as" syntax.  Of those, ~8,000 have no "qualified", and the remaining ~57,000 use "qualified".  So I make that about 5.6% of our imports.  I think this is quite a lot higher than the Stackage figure, because this code is mostly applications rather than libraries, so it tends to use a larger range of imported functionality from lots of different semi-independent domains.  The chance of naming-overlap for separate concepts is therefore much greater, leading to our common idiom for optional qualification of names with short module synonyms (often single letters).

On 03 Jun, 2015,at 08:08 PM, Anthony Cowley <acowley at seas.upenn.edu> wrote:

 I grepped through the source of all the packages in the Stackage Nightly
package set and found that less 0.3% of imports use that syntax. It's
a small number, but it's not zero, so the breakage would be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150605/f89d55c2/attachment.html>

More information about the Haskell-Cafe mailing list