On Tue, Aug 19, 2008 at 11:26:24AM +0100, Simon Marlow wrote: > > seem so hard to install Haddock with GHC. We have to do the wrapper script > business for GHC itself anyway and you already added support to Cabal for > this, so (I imagine) it shouldn't be too hard to do this for Haddock too.
Right, that's easy. > On Windows we'll need to use the usual trick for finding the path relative > to the binary location, but that's standard stuff, and Haddock does it > already Does it? I'm looking at the http://code.haskell.org/haddock/ repo, and as far as I can see haddock's getGhcLibDir just looks at the commandline flags for the path to use, falling back to the ghc-paths path if no flag is given. And grepping for GetModuleFileName doesn't find anything. Or have I misunderstood what you meant? > - perhaps we can use the path we get back from Paths_Haddock to > derive the libdir path to pass to GHC? That doesn't help us with bindists that can be installed anywhere. > >However, haddock would still have to support ghc-paths for standalone > >builds. Also, I think that in a GHC tree we'd still have to pointlessly > >link against ghc-paths, as I can't see a simple way to avoid it. > > Can't this be a conditional dependency? If you have Flag ghcPaths if flag(ghcPaths) Build-Depends: ghc-paths then there's no reason for that flag ever to be turned on. I'm not sure what cabal-install does, but if you try and build it manually with Cabal and don't have ghc-paths installed then Cabal will happily build it for you without ghc-paths. Thanks Ian _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
