+
Skip to content

Haddocks often miss structure #326

@turion

Description

@turion

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载