[commit: ghc] wip/prettyprinter: Debugging ghc-pkg (2752fdd)

git at git.haskell.org git at git.haskell.org
Thu Jan 18 18:08:32 UTC 2018


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

On branch  : wip/prettyprinter
Link       : http://ghc.haskell.org/trac/ghc/changeset/2752fdd67a9804ca31c4682f858073e33cf2763d/ghc

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

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

    Debugging ghc-pkg


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

2752fdd67a9804ca31c4682f858073e33cf2763d
 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 e2e4694..acd5098 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