Claus wrote: > Hi David, > > thanks, that seems to work. some observations: > > - my first error message was: > > haddock: no GHC lib dir specified > > it would be useful to add the option (-B, not --lib), and perhaps be > slightly more verbose, to avoid confusion.
Yes, a better error message that tells you which option to use would be good. > even more useful would be to try and find that dir, at least to check > whether `ghc --print-libdir` gives something useable. Yep. Maybe the user should specify a ghc binary path directly instead of the lib dir, just like he/she would do for Cabal or other systems. Then if no such path is specified, Haddock could default to the ghc in path. > - after fixing that, i got a warning: > > Warning: main:Data.Record: could not find link destinations for: > GHC.Show.Show > > again, it would be helpful to know which option is likely to help. > > can't haddock try to find that information for itself, using things > like `ghc --print-docdir`? Hmm, for simplicity I removed this kind of functionality from Haddock. Since I'm using the GHC API it should be possible to automatically get this information for all the package dependencies. One problem that I had with this was that the dirs in the PackageDescription can contain $topdir variables. I decided then that this was better handled in Cabal. But I could look at it again. Though, if you can, you should be using Cabal, and then you won't have this problem since Cabal sends all the relevant paths to Haddock via the --read-interface flag. > should that really be 'GHC.Show'? The Name of the Show class is GHC.Show since this is the original definition site. Haddock doesn't know that there's a better place (Prelude.Show, IIRC) to refer to since it doesn't have the .haddock file for the base package here. And if it did, it would've found a link destination in the first place :-) So I'm not sure if I can give a better message here. > - i also got no output > > i had expected html output to be the default, but at least there > should be a warning if no output was selected/produced!-) Hmm, isn't this how the old Haddock works? Anyway, you may be right in that html should be the default output. Thanks for the feedback! David (in the desperate need of a Trac for Haddock) _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc