Fix nasty module graph caching issue

resolvedComponentsCache did not consider outgoing edges in the module
graph when computing the set of dependent files

i.e. for `A -> B, A -> C` `flatten` would give [B,C] instead of [A,B,C]
This commit is contained in:
Daniel Gröber 2015-08-18 04:27:02 +02:00
parent 58ae1271a3
commit a383f46939
2 changed files with 3 additions and 2 deletions

View File

@ -47,6 +47,6 @@ data TimedCacheFiles = TimedCacheFiles {
-- ^ 'cacheFile' timestamp
tcFiles :: [TimedFile]
-- ^ Timestamped files returned by the cached action
}
} deriving (Eq, Ord, Show)
type ChCacheData = (Programs, FilePath, FilePath, (Version, [Char]))

View File

@ -267,7 +267,8 @@ resolvedComponentsCache = Cached {
-> [FilePath]
flatten = Map.elems
>>> map (gmcHomeModuleGraph >>> gmgGraph
>>> Map.elems
>>> (Map.keysSet &&& Map.elems)
>>> uncurry insert
>>> map (Set.map mpPath)
>>> Set.unions
)