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

Bugs in Haskell-level Re-exports #584

Closed
crockeea opened this issue Mar 7, 2017 · 2 comments
Closed

Bugs in Haskell-level Re-exports #584

crockeea opened this issue Mar 7, 2017 · 2 comments

Comments

@crockeea
Copy link

crockeea commented Mar 7, 2017

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.

nkpart added a commit to nkpart/papa that referenced this issue Sep 4, 2017
We're kind of hamstrung by a number of bugs in haddock, a few of
which you can find here: haskell/haddock#584

Everything now has haddocks except for Papa.Lens.Export, which will
need an explicit export list to work.
bgamari pushed a commit to bgamari/ghc that referenced this issue Sep 5, 2017
This is another take on https://phabricator.haskell.org/D3844.

This patch removes then need for haddock to reimplement the calculation
of exported names from modules. Instead when renaming export lists ghc
annotates each IE with its exported names.

Haddocks current  export logic has caused lots of trouble in the past
(on the Github issue tracker):
  - haskell/haddock#121
  - haskell/haddock#174
  - haskell/haddock#225
  - haskell/haddock#344
  - haskell/haddock#584
  - haskell/haddock#591
  - haskell/haddock#597

Reviewers: austin, bgamari, ezyang

Reviewed By: bgamari, ezyang

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3864
bgamari pushed a commit to bgamari/ghc that referenced this issue Sep 5, 2017
This is another take on https://phabricator.haskell.org/D3844.

This patch removes then need for haddock to reimplement the calculation
of exported names from modules. Instead when renaming export lists ghc
annotates each IE with its exported names.

Haddocks current  export logic has caused lots of trouble in the past
(on the Github issue tracker):
  - haskell/haddock#121
  - haskell/haddock#174
  - haskell/haddock#225
  - haskell/haddock#344
  - haskell/haddock#584
  - haskell/haddock#591
  - haskell/haddock#597

Reviewers: austin, bgamari, ezyang

Reviewed By: bgamari, ezyang

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3864
bgamari pushed a commit to bgamari/ghc that referenced this issue Sep 5, 2017
This is another take on https://phabricator.haskell.org/D3844.

This patch removes then need for haddock to reimplement the calculation
of exported names from modules. Instead when renaming export lists ghc
annotates each IE with its exported names.

Haddocks current  export logic has caused lots of trouble in the past
(on the Github issue tracker):
  - haskell/haddock#121
  - haskell/haddock#174
  - haskell/haddock#225
  - haskell/haddock#344
  - haskell/haddock#584
  - haskell/haddock#591
  - haskell/haddock#597

Reviewers: austin, bgamari, ezyang

Reviewed By: bgamari, ezyang

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3864
ghc-mirror pushed a commit to ghc/ghc that referenced this issue Sep 5, 2017
This is another take on https://phabricator.haskell.org/D3844.

This patch removes then need for haddock to reimplement the calculation
of exported names from modules. Instead when renaming export lists ghc
annotates each IE with its exported names.

Haddocks current  export logic has caused lots of trouble in the past
(on the Github issue tracker):
  - haskell/haddock#121
  - haskell/haddock#174
  - haskell/haddock#225
  - haskell/haddock#344
  - haskell/haddock#584
  - haskell/haddock#591
  - haskell/haddock#597

Updates haddock submodule.

Reviewers: austin, bgamari, ezyang

Reviewed By: bgamari, ezyang

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3864
@dnadales
Copy link

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.

@gbaz
Copy link
Contributor

gbaz commented Feb 5, 2018

should be resolved by #688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants