[commit: ghc] master: Fix a few minor issues spotted in code review (616dd87)

git at git.haskell.org git at git.haskell.org
Fri Aug 29 14:04:28 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/616dd87f60b99d8843058366304e2b9f2475eb57/ghc

>---------------------------------------------------------------

commit 616dd87f60b99d8843058366304e2b9f2475eb57
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


>---------------------------------------------------------------

616dd87f60b99d8843058366304e2b9f2475eb57
 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