Duncan Coutts wrote:
On Tue, 2009-02-24 at 17:42 +0100, Svein Ove Aas wrote:
2009/2/24 Felipe Lessa <[email protected]>:
Just pass '--enable-documentation' to 'cabal install'. On *nix they're
generated at ~/.cabal/share/doc.

Or edit ~/.cabal/config and set the documentation key to True

However this does not maintain a complete module index like I think
Martijn is after.

Thank you all for the very helpful suggestions. I edited ~/.cabal/config to generate documentation by default, and I set up Apache to serve the documentation from http://haddock. I put a small PHP (gasp!) file in ~/.cabal/share/doc that lists all packages for which there is documentation; see below. This is a good enough approximation for now. Thanks again!

Martijn.

---

<html>
<head>
<title>Local Hackage packages</title>
</head>
<body>
<h1>Local Hackage packages</h1>
<ul>
<?

$handle = opendir(dirname(__FILE__));

while (false !== ($pkg = readdir($handle))) {
  if ($pkg == "." || $pkg == "..") continue;
  $link = "$pkg/html/";
  if (file_exists("${link}index.html")) {
    echo '<li><a href="' . $link . '">' . $pkg . '</a></li>' . "\n";
  }
}

?>
</ul>
</body>
</html>

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to