Ticket #110 (new defect)
Allow grouping of functions with a corresponding data type
|Reported by:||duncan||Owned by:|
Suppose you're refactoring to use smart constructors. So you switch from exporting:
data WindowBits = WindowBits Int | DefaultWindowBits
data WindowBits defaultWindowBits :: WindowBits windowBits :: Int -> WindowBits
Currently the former is presented with a more logical grouping than the latter. In the constructor case we get the docs for the whole lot all in one block which clearly indicates that they are related. With the latter, each smart constructor is just an independent top level function and only the order makes them look in any way related (obviously the names and types make them look related, but the structure and presentation does not).
So what I'd like is a way to group related top level exports, so that when there is a very strong relation, such as in the smart constructor case, I can indicate that in the markup and have it presented nicer.
Currently there is a disincentive to switch from constructors to smart constructors because it makes the API look bigger and less organised. This is a bit of a shame.
The obvious question is how should the grouping be indicated and how should it affect the default presentation.