File tree Expand file tree Collapse file tree 1 file changed +12
-19
lines changed
ghcide/src/Development/IDE/Import Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -419,25 +419,18 @@ instance Show NamedModuleDep where
419419
420420
421421buildImmediateDepsFingerprintMap :: FilePathIdMap FilePathIdSet -> FilePathIdMap Fingerprint -> FilePathIdMap Fingerprint
422- buildImmediateDepsFingerprintMap modulesDeps shallowFingers = go keys IntMap. empty
423- where
424- keys = IntMap. keys shallowFingers
425- go :: [IntSet. Key ] -> FilePathIdMap Fingerprint -> FilePathIdMap Fingerprint
426- go keys acc =
427- case keys of
428- [] -> acc
429- k : ks ->
430- if IntMap. member k acc
431- -- already in the map, so we can skip
432- then go ks acc
433- -- not in the map, so we need to add it
434- else
435- let -- get the dependencies of the current key
436- deps = IntSet. toList $ IntMap. findWithDefault IntSet. empty k modulesDeps
437- -- combine the fingerprints of the dependencies with the current key
438- combinedFingerprints = Util. fingerprintFingerprints $ map (shallowFingers IntMap. ! ) (k: deps)
439- in -- add the combined fingerprints to the accumulator
440- go ks (IntMap. insert k combinedFingerprints acc)
422+ buildImmediateDepsFingerprintMap modulesDeps shallowFingers =
423+ IntMap. fromList
424+ $ map
425+ ( \ k ->
426+ ( k,
427+ Util. fingerprintFingerprints $
428+ map
429+ (shallowFingers IntMap. ! )
430+ (k : IntSet. toList (IntMap. findWithDefault IntSet. empty k modulesDeps))
431+ )
432+ )
433+ $ IntMap. keys shallowFingers
441434
442435-- | Build a map from file path to its full fingerprint.
443436-- The fingerprint is depend on both the fingerprints of the file and all its dependencies.
You can’t perform that action at this time.
0 commit comments