[commit: ghc] wip/remove-cabal-dep: Fix a few minor issues spotted in code review (22c6ff5)
git at git.haskell.org
git at git.haskell.org
Thu Aug 28 04:59:14 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/remove-cabal-dep
Link : http://ghc.haskell.org/trac/ghc/changeset/22c6ff56ce806a16d9bfb0794978a47d0f25f63b/ghc
>---------------------------------------------------------------
commit 22c6ff56ce806a16d9bfb0794978a47d0f25f63b
Author: Duncan Coutts <duncan at well-typed.com>
Date: Thu Aug 28 05:24:04 2014 +0100
Fix a few minor issues spotted in code review
>---------------------------------------------------------------
22c6ff56ce806a16d9bfb0794978a47d0f25f63b
compiler/main/PackageConfig.hs | 0
compiler/main/Packages.lhs | 3 ++-
utils/ghc-pkg/Main.hs | 3 +--
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler/main/Packages.lhs b/compiler/main/Packages.lhs
index 37ddd84..01c75c0 100644
--- a/compiler/main/Packages.lhs
+++ b/compiler/main/Packages.lhs
@@ -1363,7 +1363,8 @@ add_package pkg_db ipid_map ps (p, mb_parent)
| Just pid <- Map.lookup ipid ipid_map
= add_package pkg_db ipid_map ps (pid, Just p)
| otherwise
- = Failed (missingPackageMsg ipid <> missingDependencyMsg mb_parent)
+ = Failed (missingPackageMsg ipid
+ <> missingDependencyMsg mb_parent)
missingPackageErr :: Outputable pkgid => DynFlags -> pkgid -> IO a
missingPackageErr dflags p
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index fdb255a..ac958da 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -57,7 +57,6 @@ import Control.Concurrent
import qualified Data.ByteString.Char8 as BS
import Data.Binary as Bin
---import qualified Data.Binary.Get as Bin
#if defined(mingw32_HOST_OS)
-- mingw32 needs these for getExecDir
@@ -2141,4 +2140,4 @@ instance Binary PackageKey where
case n of
0 -> do a <- get; b <- get; c <- get; return (PackageKey a b c)
1 -> do a <- get; return (OldPackageKey a)
- _ -> error ("Binary PackageKey: bad branch " ++ show n)
+ _ -> fail ("Binary PackageKey: bad branch " ++ show n)
More information about the ghc-commits
mailing list