Better formatting for type signatures with long class constraints
Two examples with screenshots from my computer (12.5 inch laptop):
- http://haddock.stackage.org/nightly-2016-01-08/stack-1.0.0/Stack-Config.html#v:loadConfig

- http://haddock.stackage.org/nightly-2016-01-08/stack-1.0.0/Stack-Build-Source.html#v:loadSourceMap

Ideas for improvement:
- Add line breaks to overly long class constraints.
- When the class constraint is long, add a line break before the
=> ...part.
It would also be nice if we could selectively hide "large" contexts.
This is really needed.
@tomjaguarpaw what in particular do you propose here? It seems like there is a bit of design-work that remains to be done here.
Allowing individual components of tuples to be commented (and extending this to contexts) would be one approach. For example
foo :: (Int,
-- ^ Foo
Bool)
-- ^ Bar
-> String
-- ^ Baz
foo = foo
could generate a Haddock like
foo
:: (Int, Foo
Bool) Bar
-> String Baz
This issue seems to have gone quiet, but I'd love to see it revived.
I think a reasonable starting point is identifying a max line length. Formatting beyond that could conform to tibbe style since that has arisen as a canonical style.
I'd love to see it revived.
Me too.
As a workaround, might it be possible to do something CSS-ish? Perhaps with max-width on those types?