haddock icon indicating copy to clipboard operation
haddock copied to clipboard

Show signatures in index page

Open ffaf1 opened this issue 3 years ago • 1 comments

See as an example this index page on hackage. Having:

attrib :: LString -> (String, LString)

would be better than current layout (plain attrib, no sig, just module link).

see also: people disagreeing with me.

ffaf1 avatar May 16 '22 14:05 ffaf1

@ffaf1 The package documentation you show as an example happens to be generated with an older version of the Haddock theme. Let's consider a more recently-updated package instead: https://hackage.haskell.org/package/servant-openapi3-2.0.1.5/docs/doc-index.html

Screenshot 2022-05-17 at 09-44-20 servant-openapi3-2 0 1 5 Generate a Swagger_OpenAPI_OAS 3 0 specification for your servant API  (Index)

In this example, we can see that the space if fairly constrained, so the type signatures cannot easily be displayed by default.

If we want to go through with this, we'd have to display the type signatures with a tooltip.

Kleidukos avatar May 17 '22 07:05 Kleidukos