#3870: Avoid Haddock-links to the Prelude
---------------------------------+------------------------------------------
    Reporter:  waern             |       Owner:                   
        Type:  bug               |      Status:  new              
    Priority:  normal            |   Component:  Documentation    
     Version:  6.12.1            |    Keywords:                   
          Os:  Unknown/Multiple  |    Testcase:                   
Architecture:  Unknown/Multiple  |     Failure:  Documentation bug
---------------------------------+------------------------------------------
 If you're generating documenatation that links to the base package, you
 will see that some links to standard types go to the `Prelude` and some to
 the hierarchical libararies. For example, `Int` goes to `Prelude.Int`,
 while `Either` goes to `Data.Either.Either`.

 This happens because the `Prelude` imports some types from the
 hierarchical libraries, while some are imported directly from internal GHC
 modules (e.g. `GHC.Base`). In the first case, the hierarchical module is
 choosen as the best place to link to since it's closer than the `Prelude`
 in the topological sort to the original module. In the latter case, the
 hierarchical module and the `Prelude` are of equal number of imports away
 from the original module, so none is considered a better place to link to.
 In this case one of the modules is arbitrarily chosen and it happens to be
 the `Prelude`.

 I think it would be nice if the links would always go to the hierarchical
 libraries. Maybe the best way to achieve that would be to add `{-#
 OPTIONS_HADDOCK NotHome #-}` to the `Prelude`. This flag is not yet
 documented (I should get around to that). It tells Haddock to prefer
 linking to another module if one is available.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3870>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to