[commit: ghc] ghc-7.2: Tweak the typeable fingerprinting (03ac35d)

Ian Lynagh igloo at earth.li
Sun Jul 24 20:25:39 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.2

http://hackage.haskell.org/trac/ghc/changeset/03ac35dab45e246fd2e4b1c60f722f996ebe19ef

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

commit 03ac35dab45e246fd2e4b1c60f722f996ebe19ef
Author: Ian Lynagh <igloo at earth.li>
Date:   Fri Jul 22 23:17:56 2011 +0100

    Tweak the typeable fingerprinting
    
    Put spaces inbetween the values, so e.g.
        p:Foobar.baz
        p:Foo.barbaz
    will hash differently.

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

 compiler/typecheck/TcGenDeriv.lhs |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/compiler/typecheck/TcGenDeriv.lhs b/compiler/typecheck/TcGenDeriv.lhs
index cac485a..b7a3a50 100644
--- a/compiler/typecheck/TcGenDeriv.lhs
+++ b/compiler/typecheck/TcGenDeriv.lhs
@@ -1195,10 +1195,8 @@ gen_Typeable_binds loc tycon
                                   HsString modl_fs,
                                   HsString name_fs])
 
-    Fingerprint high low =
-             fingerprintString (unpackFS pkg_fs ++
-                                unpackFS modl_fs ++
-                                unpackFS name_fs)
+    hashThis = unwords $ map unpackFS [pkg_fs, modl_fs, name_fs]
+    Fingerprint high low = fingerprintString hashThis
 
     int64
       | wORD_SIZE == 4 = HsWord64Prim . fromIntegral





More information about the Cvs-ghc mailing list