Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haddocks often miss structure #326

Open
turion opened this issue May 22, 2024 · 0 comments
Open

Haddocks often miss structure #326

turion opened this issue May 22, 2024 · 0 comments

Comments

@turion
Copy link
Owner

turion commented May 22, 2024

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 turion added this to the Zurihac24 milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant