rhine icon indicating copy to clipboard operation
rhine copied to clipboard

Haddocks often miss structure

Open turion opened this issue 9 months ago • 0 comments

In the haddocks I often have re-exports. These mess up the haddock structure:

module FRP.Rhine.Clock (
  module FRP.Rhine.Clock,
  module X,
)

...

-- time-domain
import Data.TimeDomain as X

-- * The 'Clock' type class

...

This causes the headers like The 'Clock' type class to vanish, and mixes up the order in which items turn up.

I'm not sure what's the best way to fix this. I believe there are two options:

  1. Explicit export list, possibly with headers in there. I don't like this for two reasons:
  • It's easy to add a new function and forget to list it in the export list. By default I always export everything in a module, if I really want to hide something, I put it in a separate submodule.
  • The headers structure the code as well, so I want them there and not upstairs.
  1. Don't reexport modules. I guess this should be fine for modules like FRP.Rhine.Clock that are usually only imported in the library itself. But at least for FRP.Rhine I'm not sure what I should do.

turion avatar May 22 '24 14:05 turion