@@ -265,8 +265,9 @@ hashName i n = qhash (i * 5381) (show n)
265265
266266calculateHash :: IState -> IBCFile -> Int
267267calculateHash ist f
268− = let acc = L.filter exported (ibc_access f) in
269− mkHashFrom (map fst acc) (getDefs acc)
268+ = let acc = L.filter exported (ibc_access f)
269+ inl = L.filter (inlinable (map fst acc)) (ibc_flags f) in
270+ mkHashFrom (map fst acc) (getDefs acc ++ L.concatMap getFullDef inl)
270271 where
271272 mkHashFrom :: [Name] -> [Term] -> Int
272273 mkHashFrom ns tms = sum (L.zipWith hashName [1..] ns) +
@@ -276,6 +277,10 @@ calculateHash ist f
276277 exported (_, Frozen) = True
277278 exported _ = False
278279
280+ inlinable acc (n, opts)
281+ = n `elem` acc &&
282+ (Inlinable `elem` opts || PEGenerated `elem` opts)
283+
279284 findTms :: [(a, Term, Term)] -> [Term]
280285 findTms = L.concatMap (\ (_, x, y) -> [x, y])
281286
@@ -299,6 +304,12 @@ calculateHash ist f
299304 Just ty -> ty : ts
300305 getDefs (_ : ns) = getDefs ns
301306
307+ getFullDef :: (Name, [FnOpt]) -> [Term]
308+ getFullDef (n, _)
309+ = case lookupTyExact n (tt_ctxt ist) of
310+ Nothing -> []
311+ Just ty -> ty : patDef n
312+
302313-- | Write a package index containing all the imports in the current
303314-- IState Used for ':search' of an entire package, to ensure
304315-- everything is loaded.