You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cabal-install-solver/src/Distribution/Solver/Modular/PrivateScopeClosure.hs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,9 @@ findBadPrivClosures pkg rdm = do
191
191
| stopAtPkg && x == pkg
192
192
= (M.insert x (dontLook x) s, path)
193
193
|otherwise
194
-
=foldl go (M.insert x (dontLook x) s, x:path) $ neighbors x
194
+
=let nbs = neighbors x
195
+
infoldl go (M.insert x (dontLook x) s, ifnull nbs then path else x:path) nbs
196
+
-- \^ We don't add x to the path if this is a terminal node.
195
197
196
198
dontLook x =error$"We should only lookup privately-qualified pkgs, but instead "++show x ++" was looked up -- it is only inserted in the map for de-duplication purposes."
0 commit comments