[commit: ghc] wip/prettyprinter: Debugging ghc-pkg (29e9df3)

git at git.haskell.org git at git.haskell.org
Wed Sep 13 21:08:43 UTC 2017


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

On branch  : wip/prettyprinter
Link       : http://ghc.haskell.org/trac/ghc/changeset/29e9df3b61c7d25e0ba41f3229161aff303a98e0/ghc

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

commit 29e9df3b61c7d25e0ba41f3229161aff303a98e0
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Fri Jul 21 00:11:14 2017 -0400

    Debugging ghc-pkg


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

29e9df3b61c7d25e0ba41f3229161aff303a98e0
 libraries/ghc-boot/GHC/PackageDb.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs
index a59c46e..c1d6b86 100644
--- a/libraries/ghc-boot/GHC/PackageDb.hs
+++ b/libraries/ghc-boot/GHC/PackageDb.hs
@@ -362,7 +362,7 @@ getHeader :: Get (Word32, Word32)
 getHeader = do
     magic <- getByteString (BS.length headerMagic)
     when (magic /= headerMagic) $
-      fail "not a ghc-pkg db file, wrong file magic number"
+      fail $ "not a ghc-pkg db file, wrong file magic number (saw "++show magic++", expected "++show headerMagic++")"
 
     majorVersion <- get :: Get Word32
     -- The major version is for incompatible changes



More information about the ghc-commits mailing list