
Duncan Coutts wrote:
Yes, when cabal runs haddock on a package, it generates a comprehensive index if none is present or expands it with the new docs. Quite cool that :)
It's something I've always _wanted_ Cabal to do, but this is the first time I've ever seen it happen. I don't know what particularly I did to make this happen, and now it seems to be gone, so...
If you have documentation enabled then it is recreated every time you install a package.
That's what I was expecting to happen... but no. Each package gets its documentation generated, but the master index I deleted seems to be gone forever.
(Though only for user packages, since we have not yet worked out somewhere sensible we can stick a global index).
Uh... maybe that's it then? Yes, I think I changed it from local to global. It was putting all the binaries and documentation under Documents and Settings. I changed the install type to global, and it went back to putting stuff under Program Files\Haskell like it always used to. I'm not sure what "somewhere sensible" is supposed to mean; until I deleted it, the master index was under Program Files\Haskell\doc, right next to all the globally-installed packages. Or did you mean there isn't a good place on Unix?
Yup, there's a ticket for it.
In fact, there appears to be a ticket for every single thing I originally mentioned. And they're all ancient tickets too. So, yeah... nothing to do here. (Unless you're suggesting that I should try to actually *fix* these things. The way I figure it, if an army of developers who are already experts on the subject haven't been able to fix it yet, it must be extremely hard, and so there's no way *I* can fix it.)
If you have documentation enabled (ie use --enable-documentation on the command line, or have "documentation: True" in the ~/.cabal/config file) then docs get created for each package you install, and the haddock index/contents of all installed docs gets updated.
Right. I still get documentation for each package, just no master index. That's the way it always used to work, and that apparently is the way it works again now...
I imagine it's so that each package can be placed in a completely arbitrary place in the filesystem, and the links still work. I'd actually be surprised if these URLs work on Linux either; they don't appear to follow the requisit web standards.
You may be right, or perhaps URL syntax is just liberal enough to let unix style paths work. It's still a bug of course that we're not using the file:// protocol which makes it not work on windows. I filed it here: http://hackage.haskell.org/trac/hackage/ticket/516#comment:6
Yeah, I believe at least under HTTP, "/" refers to the root folder of the current server, so that probably works for an absolute path. "C:\" isn't going to be valid without a protocol spec. (I actually cannot remember now whether the Windows paths had forward or backward slashes.) I think either removing the drive spec or adding a protocol spec should fix this; the latter would seem more "correct". (Again, this is a Haddock issue rather than Cabal, isn't it?)