[commit: ghc] wip/annotate-core: Debugging ghc-pkg (8ea1835)

git at git.haskell.org git at git.haskell.org
Tue Jul 25 17:54:05 UTC 2017


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

On branch  : wip/annotate-core
Link       : http://ghc.haskell.org/trac/ghc/changeset/8ea1835091a42328a9ab152aa2ab3d759f90a06c/ghc

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

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

    Debugging ghc-pkg


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

8ea1835091a42328a9ab152aa2ab3d759f90a06c
 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 bf83d25..f1ccf16 100644
--- a/libraries/ghc-boot/GHC/PackageDb.hs
+++ b/libraries/ghc-boot/GHC/PackageDb.hs
@@ -352,7 +352,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