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

Claus Reinke claus.reinke at talk21.com
Thu Nov 4 12:42:02 EDT 2010

>> 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
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.

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?


More information about the Haddock mailing list