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.

Module re-exports are handled incorrectly #232

Closed

Description

@ghc-mirror

Original reporter: roma@

Contrary to its documentation, Haddock.Interface.Create.moduleExports incorrectly assumes that for a module re-export all of its symbols are re-exported.

As an illustration, http://hackage.haskell.org/packages/archive/test-framework/0.8/doc/html/Test-Framework.html shows constructors of the Test data type, although it is exported as an abstract type.

Activity

  1. self-assigned this
    on May 8, 2014
  2. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    Author

    Original reporter: sol@

    It would be interesting whether this was recently introduced or whether it was incorrectly implemented in the first place. Do you have any insights here?

  3. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    Author

    Original reporter: roma@

    No, it just was never fully implemented.

    commit fb43b30e5d2e04d0b6e997055b377cf2d67486d9
    Author: David Waern <david.waern@gmail.com>
    Date:   Sun May 22 21:40:21 2011 +0000
    
        Break out fullContentsOf, give it a better name and some documentation
    
        The documentation describes how we want this function to eventually behave,
        once we have fixed a few problems with the current implementation.
    
  4. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    Author

    Original reporter: sol@

    Thanks for digging this up. I guess it would be useful to add the note in the commit message to the actual code. If you feel like hacking on this, a patch would be very appreciated ;)

  5. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    Author

    Original reporter: roma@

    I might do eventually, but my work queue is already rather large atm :)

    Also, (whoever will be working on this), note, that semantics of exports is a bit tricky and easy to get wrong. See e.g. http://hackage.haskell.org/trac/ghc/ticket/7469

    So, if possible, use functions from the GHC API to do export and import resolution. I don't know whether such functions exist — could someone knowledgeable about the GHC API comment on this?

  6. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    Author

    Original reporter: sol@

    No idea, maybe ask on glasgow-haskell-users?

  7. ghc-mirror commented on May 8, 2014

    @ghc-mirror
    Author

    Original reporter: fuuzetsu@

    Duplicate of #174

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions