patch applied (ghc): Fix bug #1725 (Haddock links between packages)

Isaac Dupree isaacdupree at charter.net
Sun Sep 23 18:42:39 EDT 2007


Ian Lynagh wrote:
> Hi Sven,
> 
> On Sun, Sep 23, 2007 at 06:18:01AM -0700, Sven Panne wrote:
>> Sun Sep 23 05:06:36 PDT 2007  sven.panne at aedion.de
>>   * Fix bug #1725 (Haddock links between packages)
>>   Resolving this bug is a bit tricky, it boils down to the question: Should the
>>   Haddock links between packages include the package version or not?
>>   
>>   Pro: We can differentiate between various versions of the same package,
>>   installed all at once. (How often does this really happen in practice?)
>>   
>>   Cons: When package A refers to a package B, and B is later upgraded, links
>>   in A's documentation will break. Furthermore, if an *additional* version of
>>   B is installed, which version should A refer to?
> 
> Packages are built against particular versions of other packages, e.g.:
> 
> $ ../compiler/stage2/ghc-inplace --show-iface unix/dist/build/System/Posix/Directory.hi | grep "package dependencies"
> package dependencies: base directory-1.0 filepath-1.0 old-locale-1.0
> 
> so it will always point to the right docs.
> 
> I've changed it to include the version in STABLE, and will push to HEAD
> once I've validated.

So docs are expected to work as long as the compiled libraries they 
correspond to, still work.

This seems valid as long as Haddock can't make links to libraries that 
aren't depended upon (e.g. something in base saying "you might be 
interested in this thing that's in the 'containers' package"). (can it? 
I don't know, probably not)

Isaac



More information about the Cvs-ghc mailing list