RFC: hyperlinks in Haddock docs

Simon Marlow simonmar at microsoft.com
Tue Feb 1 10:19:11 EST 2005

On 01 February 2005 11:31, ross at soi.city.ac.uk wrote:

> On Tue, Feb 01, 2005 at 11:02:45AM -0000, Simon Marlow wrote:
>> I'm making some changes to the way Haddock creates links, and I'd
>> like to solicit comments on possible alternatives.
>> The existing approach is for each non-locally-defined identifier in
>> the current module, we hyperlink to a module that it was imported
>> from, and that (a) actually documents the identifer, and (b) isn't
>> hidden. 
>> [...]
>> So the new approach is to try to build up a global table of the
>> "best" destinations to link to for each entity.  The question is how
>> to determine "best".  Here's my first stab:
>>   - A is better than B if A directly or indirectly imports B
> Perhaps it should be the other way round: the lowest non-hidden module
> that exports the name (if more than one such, fix on one).  This would
> need most of GHC.* hidden, which is desirable anyway.

Yes, maybe that's better, but it's not enough on its own.  For example,
GHC.Exts exports Int, but there's no relationship between Prelude and
GHC.Exts in the import hierarchy - so how do we determine which one is
better?  (GHC.Exts shouldn't be hidden, BTW.  The rest of GHC.* probably


More information about the Glasgow-haskell-users mailing list