turion / rhine

Haskell Functional Reactive Programming framework with type-level clocks
http://hackage.haskell.org/package/rhine
117 stars 21 forks source link

Haddocks often miss structure #326

Open turion opened 1 month ago

turion commented 1 month ago

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.
  2. 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.