RFC: hyperlinks in Haddock docs

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue Feb 22 14:36:40 EST 2005


On Tue, 2005-02-22 at 19:10 +0000, Ross Paterson wrote:
> On Tue, Feb 22, 2005 at 05:45:39PM +0000, Duncan Coutts wrote:
> > In gtk2hs we have one huge module which defines all the types (this is
> > produced by a code generator from a text file which describes the Gtk+
> > class hierarchy). However we don't ever want this module to be exposed
> > to users. We re-export each data type corresponding to the Gtk+ class in
> > it's one module (which wraps all the methods of the class). Eg the
> > module Graphics.UI.Gtk.Buttons.Button re-exports 'Button' from the
> > module Graphics.UI.Gtk.Types.
> > [...]
> > For example we would say #hide in  Graphics.UI.Gtk.Types (and we'd want
> > that to mean never ever generate links to this module) and in each
> > module that re-exports (and documents) each Gtk+ class add a haddock
> > declarations saying "for references to X please always link to its
> > definition here".
> 
> The new Haddock is enormously better at this -- it does take
> #hide to imply that.  If you can get the #hide attribute working in
> Graphics.UI.Gtk.Types, Haddock will redirect links to the lowest unhidden
> module that exports the name (whether imported by this one or not),
> which is exactly what you want.  There's no need for qualified names or
> further declarations.

Excellent! Thanks a lot.

Any hint as to when the next Haddock release will be?

Duncan



More information about the Glasgow-haskell-users mailing list