Hackage 2.0: JSON resources?

Max Bolingbroke batterseapower at hotmail.com
Tue Sep 27 14:15:43 CEST 2011

Hi Cabalers,

I'm working on a bot to produce build reports and upload documentation
for Hackage 2.0. This bot needs a way to determine whether a
particular package already has documentation uploaded or not.

One possibility would be to have the bot download the package HTML
page and scrape the information out by examining the module tree.
However, scraping HTML is ugly - it would be nicer to expose a
machine-readable resource like
http://localhost:8080/package/process.json that I could retrieve and
extract the relevant information from.

Is this something you want in Hackage 2.0? If so, is it OK to
implement it by copying+modifying servePackagePage, then adding the
new resource in the HtmlFeature? I see a commented-out reference to a
"JsonFeature", so perhaps you had another implementation in mind?


More information about the cabal-devel mailing list