Ticket #232 (closed defect: duplicate)

Opened 20 months ago

Last modified 5 months ago

Module re-exports are handled incorrectly

Reported by: feuerbach Owned by:
Priority: major Milestone:
Version: 2.11.0 Keywords:
Cc: 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.

Change History

Changed 20 months ago by SimonHengel

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?

Changed 20 months ago by feuerbach

  • cc roma@… added

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.

Changed 20 months ago by SimonHengel

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 ;)

Changed 20 months ago by feuerbach

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?

Changed 20 months ago by SimonHengel

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

Changed 5 months ago by Fūzetsu

  • status changed from new to closed
  • resolution set to duplicate

Duplicate of #174

Note: See TracTickets for help on using tickets.