Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Bugs in Haskell-level Re-exports #584

Closed

Description

@crockeea

I've just been trying to re-export modules with Haddock, but I ran into several annoying issues:

  1. If you export renamed modules as in
    module Foo (module X) where
    import module A as X
    import module B as X
    
    documentation for A and B do not appear in the documentation for Foo.
  2. If you export unrenamed modules, documentation for A and Bdoes appear in docs for Foo:
    module Foo (module A, module B) where
    import module A
    import module B
    
  3. If you import a module hiding some items, and then re-export the module, the hidden items still appear in the documentation:
    module Foo (module A, module B) where
    import module A hiding (a)
    import module B
    
    In this example, documentation for a would appear in the docs for Foo, even though a is not exported from Foo.

(All of this assumes that modules A and B are hidden in the cabal file, so that their contents should be dumped into Foo in an ideal world.)

It doesn't seem that (1) is addressed in the docs. In particular, the modules are re-exported "wholly and without hiding qualifiers", and the docs mention nothing about renamed modules.

Point (2) is precisely what I expect/want to happen, so nothing to change there.

Point (3) may be addressed in the footnote [2] in the docs (can't quite tell), but this feature is pretty useless with the current behavior. The only option is for me to explicitly list what items I want to export, which is error-prone and difficult to maintain.

Activity

  1. added a commit that references this issue on Sep 5, 2017
  2. dnadales commented on Sep 28, 2017

    @dnadales

    We're also affected by this. I thought it was a problem in the way we were using Haddock, so I asked a question at SO.

  3. gbaz commented on Feb 5, 2018

    @gbaz
    Contributor

    should be resolved by #688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions