haddock
haddock copied to clipboard
Solo instance heads are printed incorrectly
The documentation of GHC.Generics shows the instance for Generic1 Solo, but not the instance for Generic (Solo a). The instance is definitely there; indeed, if you click through to the source, you'll see it derived.
Interestingly, the documentation for that module also has a mysterious extra instance: instance Generic (a).
Aha! These are connected! For some reason, Haddock displays fully-applied Solo in instances as parentheses. So instance Generic (Solo a) is displayed as Generic (a) even though a function f :: Solo a -> Solo a will have its type displayed correctly.
This is even "worse": Solo a is systematically printed as (a) e.g. in Solo instance list:

It might be the https://github.com/haskell/haddock/blob/4cf2f4d8f6bd5588c2659e343573c5d30b329d37/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs#L1255-L1256 (and similar place in PDF backend).
EDIT: I'd rename this issue to Solo instance heads are printed incorrectly
@phadej, renamed. I missed your request.