[Haddock] Fw: [Haskell-cafe] Haddock API and .haddock interface files questions

David Waern david.waern at gmail.com
Sat Nov 20 14:29:15 EST 2010

2010/11/4 Claus Reinke <claus.reinke at talk21.com>:
>>> on haskell-cafe. I'm trying to get an idea of how realistic it is
>>> to use the Haddock API to write Haddock "plugins"/backends
>>> without having to extend Haddock itself.
> Thanks for your reply - I've create the ticket, as requested:
>   Push/improve Haddock API and .haddock files usage
>   http://trac.haskell.org/haddock/ticket/157


> My immediate need is to find a replacement for scraping
> Haddock URLs for documented identifiers from Haddock's
> HTML indices (haskellmode allows you to open a browser
> on the Haddock for the identifier under the cursor, when
> editing a Haskell source file, as well as some other features
> based on those indices).
> I've got a test script that does that from .haddock files, but it copies a
> lot of code that isn't exported via the API, and
> if the Haddock API isn't installed everywhere Haddock is
> installed, people have to re-install Haddock, and it seems
> the tool would also need to depend on the GHC API, if
> only for a few data types.

Could you send me that script so that I can see what we need to add to the API?

> Also, the HTML index format has changed recently, forcing
> this exercise, but now I don't know whether the API is any
> more stable than the HTML format - if it isn't (I assume the
> HTML rewrite has settled down now?) perhaps I should just
> update my HTML-scraping code to avoid heavy dependencies?

I think the HTML index format will be more stable than the API in the
near future, but I still think we should try to improve the API to
meet your goals. Not sure what to do about the heavy dependencies


More information about the Haddock mailing list