mangleIPI :: FilePath -> FilePath -> LocalBuildInfo
          -> Installed.InstalledPackageInfo -> Installed.InstalledPackageInfo
mangleIPI "compiler" "stage2" lbi ipi
 | isWindows =
    -- Cabal currently only ever installs ONE Haskell library, c.f.
    -- the code in Cabal.Distribution.Simple.Register.  If it
    -- ever starts installing more we'll have to find the
    -- library that's too big and split that.
    let [old_hslib] = Installed.hsLibraries ipi
    in ipi {
        Installed.hsLibraries = [old_hslib, old_hslib ++ "-0"]
    }
    where isWindows = case hostPlatform lbi of
                      Platform _ Windows -> True
                      _                  -> False
mangleIPI :: FilePath -> FilePath -> LocalBuildInfo
          -> Installed.InstalledPackageInfo -> Installed.InstalledPackageInfo
mangleIPI "compiler" "stage2" lbi ipi
 | isWindows =
    -- Cabal currently only ever installs ONE Haskell library, c.f.
    -- the code in Cabal.Distribution.Simple.Register.  If it
    -- ever starts installing more we'll have to find the
    -- library that's too big and split that.
    let [old_hslib] = Installed.hsLibraries ipi
    in ipi {
        Installed.hsLibraries = [old_hslib, old_hslib ++ "-0"]
    }
    where isWindows = case hostPlatform lbi of
                      Platform _ Windows -> True
                      _                  -> False
mangleIPI "compiler" "stage2" lbi ipi
 | isWindows =
    -- Cabal currently only ever installs ONE Haskell library, c.f.
    -- the code in Cabal.Distribution.Simple.Register.  If it
    -- ever starts installing more we'll have to find the
    -- library that's too big and split that.
    let [old_hslib] = Installed.hsLibraries ipi
    in ipi {
        Installed.hsLibraries = [old_hslib, old_hslib ++ "-0"]
    }
    where isWindows = case hostPlatform lbi of
                      Platform _ Windows -> True
                      _                  -> False