generics-sop
generics-sop copied to clipboard
Use collapsible headers for examples and instances
This seems to be the advertised way to do this in Haddock now.
See the discussion in #24 for slightly more info.
Hmm. I tested this a bit, but I'm not completely convinced that this will be an improvement. First of all, I'm not sure if I prefer "collapse by default" for all these sections. Also, there are a few situations where there is an example block in the middle of the documentation. If we make the examples themselves collapsible, then everything following the examples is collapsed as well.
I see, we need to end section by starting a new one. And I agree, that sometimes examples aren't something we want to hide by default.
I'd make instances section non collapsible, but maybe some of examples, e.g. in Generics.SOP.Classes (where we don't have any in 0.2.3.0 afaics). I could make a small PR for those. Yet it would be great to use doctest for them, but it will require Custom setup.