Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

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

Open
BlueNebulaDev opened this issue Dec 22, 2022 · 0 comments

Comments

@BlueNebulaDev
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant