On emerging haddock (without ghc already installed) it emerges ghc-bin and then haddock but when haddock builds it finds a version of ghc installed under /usr/local/bin (ie a non-portage managed ghc installation (in this case ghc 6.4)) rather than the version installed in /opt by the ghc-bin ebuild. It's not a major problem since one can work around it by emerging ghc (not the -bin ebuild) so then haddock will pickup that version under /usr/bin
The same things applies to ghc itself (ghc-6.2.2.ebuild) (sadly it makes a difference in this case since ghc-6.2.2 does not build with ghc-6.4! I'll have to hide my /usr/local isntallation so that ghc-6.2.2 will install using the ghc from /opt)
Perhaps we should find the version of ghc ourself and specify --with-(g)hc= We could use the ebuild function for finding the best version of a package.
I have committed a new version of ghc-package.eclass, and made haddock inherit ghc-package (ghc itself does already). This should set the PATH in such a way that /opt/ghc/bin is preferred over /usr/local/bin. Please test ... ks
That works. It picks up the one in /opt/ghc/bin over the one in /usr/local/bin when there is no install in /usr/bin/
Ok. Closing.