[Haskell-cafe] Parsing cabal files to calculate average number of dependencies

Gwern Branwen gwern0 at gmail.com
Fri Jul 1 23:37:51 CEST 2011


On Fri, Jul 1, 2011 at 5:23 PM, Rogan Creswick <creswick at gmail.com> wrote:
>
> I think the index tarball has all the info you need, and would be
> faster to retrieve / process, if you or anyone else needs to get the
> .cabal files again:
>
> http://hackage.haskell.org/packages/archive/00-index.tar.gz (2.2mb)

Looking at it, the index tarball contains the .cabal files for all
versions known to Hackage, which isn't necessarily the interesting set
of cabal files - I'm usually more interested in just the cabal files
of the latest version of every package. No doubt there's a scripting
solution (loop over the untarred directory of packages, and take the
lexically last cabal file?), but it was easier to just exploit cabal
fetch's behavior of fetching only the latest version and work with
those tarballs.

-- 
gwern
http://www.gwern.net



More information about the Haskell-Cafe mailing list