This change makes Cabal add a target name to the install location, otherwise
it'll install into

/Users/blackh/.cabal/lib/MonadRandom-0.1.3/ghc-6.10.2

and this will interfere with things you've installed using stock GHC.

--- ghc-6.10.2.orig/libraries/Cabal/Distribution/Simple/InstallDirs.hs	2009-03-31 06:16:33.000000000 +1300
+++ ghc-6.10.2/libraries/Cabal/Distribution/Simple/InstallDirs.hs	2009-07-07 13:07:43.000000000 +1200
@@ -87,6 +87,7 @@
          ( CompilerId, CompilerFlavor(..) )
 import Distribution.Text
          ( display )
+import Distribution.Simple.ToolChain
 
 #if mingw32_HOST_OS || mingw32_TARGET_OS
 import Foreign
@@ -231,6 +232,7 @@
       libsubdir    = case comp of
            Hugs   -> "hugs" </> "packages" </> "$pkg"
            JHC    -> "$compiler"
+           GHC    -> "$pkgid" </> toolChainGHC defaultToolChain 
            _other -> "$pkgid" </> "$compiler",
       dynlibdir    = "$libdir",
       libexecdir   = case buildOS of

