Skip to content
  • Ross Paterson's avatar
    rejig location of package interfaces for haddock · 88190fe6
    Ross Paterson authored
    Formerly, setup haddock invoked haddock with a --use-package option
    for each prerequisite package, causing haddock to invoke ghc-pkg to
    get the haddock-interfaces and haddock-html fields for each package.
    The former is accurate, but the latter is not what you want if your
    documentation is to be placed on the web.
    
    Now setup haddock invokes ghc-pkg itself, but if the --html-location
    option is given, its argument is expanded for each package and used
    instead of the haddock-html field.  The results are then assembed as
    --read-interface options for haddock.  For example,
    
    	setup haddock '--html-location=http://hackage.haskell.org/packages/archive/$pkg/latest/doc/html'
    
    generates HTML documentation with hyperlinks pointing at the pages on
    HackageDB.
    88190fe6