haskell / haddock

Haskell Documentation Tool

Home Page:www.haskell.org/haddock/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: generate a list of all the subclasses (or even better, a diagram of the whole class hierarchy) for each class

BlueNebulaDev opened this issue · comments

The haddock documentation for a class shows its instances. Of course only some of them, since it's an open set, but that's usually enough. I find that list quite useful to get an idea of how a class is used for and how.

I wish that for each class, its subclasses were too. Unfortunately this information isn't available and I couldn't find it either in Hackage or through GHCi. Would it be possible to generate it with haddock and include it in the result?

I wish to know a class' subclasses in order to get an overview of a whole class hierarchy: understand how classes are related to each other, how a class is getting used etc. It's common to find diagrams such as this one, but it seems to me that they're created manually. Haddock should have enough information to automatically generate similar diagrams and I think that could be useful to people new to Haskell or new to a module.

I asked how to find a class' subclasses on Stack Overflow and they suggested to ask for this feautre here.