objective data on use of extensions

Isaac Jones ijones at syntaxpolice.org
Sat Feb 4 16:36:18 EST 2006


Ian Lynagh <igloo at earth.li> writes:

> On Fri, Feb 03, 2006 at 11:38:09AM -0800, Isaac Jones wrote:
>> I would like to strive to find objective data on the use of
>> extensions.  I started a table here which summarizes how popular
>> extensions are in real-life code.  We need more data points, though.
>> 
>> http://hackage.haskell.org/trac/haskell-prime/wiki/ExtensionsExperiment
>> 
>> I have a short program which queries the hackage database, gets some
>> details about all of the packages there, and summarizes them into a
>> table.
>
> I'm not sure how useful this info is, as:

There are definitely imperfections in the data, but surely the actual
data about which extensions are being used in real code is relevant.

> * You won't get, for example, FunctionalDependencies from any libraries
>   or applications that make use of Control.Monad.State.

I suppose we could try to chase down those dependencies.  If Package A
depends on Package B, and Package B uses extension X, then perhaps we
could count package A as half a point for extension X.  All the data
is there, this would be pretty easy to add.

> * Many extensions turn into -fglasgow-exts/-98, so if I use
>   functional dependencies and rank 2 types but only declare
>   FunctionalDependencies and not Rank2Types then nothing is going to
>   tell me I've made a mistake.

True enough, but I think people know when they are using extensions.
One solution would be to make sure that all extensions have their own
flag instead of so many going to -fglasgow-exts.

(snip)
> * People will sometimes be willing to jump through hoops to avoid using
>   an unportable extension.
>
>
> That said, FWIW, I have the following in my cabalised libraries (none in
> hackage AFAIK):

If you give me links, I'll upload them, or you could upload them as
per the instructions on the wiki.

peace,

  isaac


More information about the Haskell-prime mailing list