@@ -257,11 +257,11 @@ qhash :: Int -> String -> Int
257qhash hash [] = abs hash `mod` 0xffffffff
257qhash hash [] = abs hash `mod` 0xffffffff
258qhash hash (x:xs) = qhash (hash * 33 + fromIntegral (fromEnum x)) xs
258qhash hash (x:xs) = qhash (hash * 33 + fromIntegral (fromEnum x)) xs
260−hashTerm :: Term -> Int
260+hashTerm :: Int -> Term -> Int
261−hashTerm t = qhash 5381 (show t)
261+hashTerm i t = qhash (i * 5381) (show t)
263−hashName :: Name -> Int
263+hashName :: Int -> Name -> Int
264−hashName n = qhash 5381 (show n)
264+hashName i n = qhash (i * 5381) (show n)
266calculateHash :: IState -> IBCFile -> Int
266calculateHash :: IState -> IBCFile -> Int
267calculateHash ist f
267calculateHash ist f
@@ -269,7 +269,8 @@ calculateHash ist f
269 mkHashFrom (map fst acc) (getDefs acc)
269 mkHashFrom (map fst acc) (getDefs acc)
271 mkHashFrom :: [Name] -> [Term] -> Int
271 mkHashFrom :: [Name] -> [Term] -> Int
272− mkHashFrom ns tms = sum (map hashName ns) + sum (map hashTerm tms)
272+ mkHashFrom ns tms = sum (L.zipWith hashName [1..] ns) +
273+ sum (L.zipWith hashTerm [1..] tms)
274 exported (_, Public) = True
275 exported (_, Public) = True
275 exported (_, Frozen) = True
276 exported (_, Frozen) = True