@@ -265,8 +265,9 @@ hashName i n = qhash (i * 5381) (show n)
266calculateHash :: IState -> IBCFile -> Int
266calculateHash :: IState -> IBCFile -> Int
267calculateHash ist f
267calculateHash ist f
268− = let acc = L.filter exported (ibc_access f) in
268+ = let acc = L.filter exported (ibc_access f)
269+ inl = L.filter (inlinable (map fst acc)) (ibc_flags f) in
269− mkHashFrom (map fst acc) (getDefs acc)
270+ mkHashFrom (map fst acc) (getDefs acc ++ L.concatMap getFullDef inl)
271 mkHashFrom :: [Name] -> [Term] -> Int
272 mkHashFrom :: [Name] -> [Term] -> Int
272 mkHashFrom ns tms = sum (L.zipWith hashName [1..] ns) +
273 mkHashFrom ns tms = sum (L.zipWith hashName [1..] ns) +
@@ -276,6 +277,10 @@ calculateHash ist f
276 exported (_, Frozen) = True
277 exported (_, Frozen) = True
277 exported _ = False
278 exported _ = False
280+ inlinable acc (n, opts)
282+ (Inlinable `elem` opts || PEGenerated `elem` opts)
279 findTms :: [(a, Term, Term)] -> [Term]
284 findTms :: [(a, Term, Term)] -> [Term]
280 findTms = L.concatMap (\ (_, x, y) -> [x, y])
285 findTms = L.concatMap (\ (_, x, y) -> [x, y])
@@ -299,6 +304,12 @@ calculateHash ist f
299 Just ty -> ty : ts
304 Just ty -> ty : ts
300 getDefs (_ : ns) = getDefs ns
305 getDefs (_ : ns) = getDefs ns
307+ getFullDef :: (Name, [FnOpt]) -> [Term]
309+ = case lookupTyExact n (tt_ctxt ist) of
311+ Just ty -> ty : patDef n
302-- | Write a package index containing all the imports in the current
313-- | Write a package index containing all the imports in the current
303-- IState Used for ':search' of an entire package, to ensure
314-- IState Used for ':search' of an entire package, to ensure
304-- everything is loaded.
315-- everything is loaded.