Skip to content

Commit b77ca13

Browse files
committed
Remove all calls to retryMap and remove it
1 parent b5bd72a commit b77ca13

File tree

1 file changed

+5
-8
lines changed
  • cabal-install-solver/src/Distribution/Solver

1 file changed

+5
-8
lines changed

cabal-install-solver/src/Distribution/Solver/Modular.hs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ tryToMinimizeConflictSet runSolver sc cs cm =
276276
| not (v `CS.member` smallestKnownCS) =
277277
fromProgress $ Fail $ ExhaustiveSearch smallestKnownCS smallestKnownCM
278278
| otherwise =
279-
retryMap mkErrorMsg $ continueWith ("Trying to remove variable " ++ varStr ++ " from the "
279+
continueWith (mkErrorMsg $ "Trying to remove variable " ++ varStr ++ " from the "
280280
++ "conflict set.") $
281-
retry (retryMap renderSummarizedMessage $ runSolver sc') $ \case
281+
retry (runSolver sc') $ \case
282282
err@(ExhaustiveSearch cs' _)
283283
| CS.toSet cs' `isSubsetOf` CS.toSet smallestKnownCS ->
284284
let msg = if not $ CS.member v cs'
@@ -288,14 +288,14 @@ tryToMinimizeConflictSet runSolver sc cs cm =
288288
++ "conflict set."
289289
in -- Use the new conflict set, even if v wasn't removed,
290290
-- because other variables may have been removed.
291-
failWith (msg ++ " Continuing with " ++ showCS cs' ++ ".") err
291+
failWith (mkErrorMsg $ msg ++ " Continuing with " ++ showCS cs' ++ ".") err
292292
| otherwise ->
293-
failWith ("Failed to find a smaller conflict set. The new "
293+
failWith (mkErrorMsg $ "Failed to find a smaller conflict set. The new "
294294
++ "conflict set is not a subset of the previous "
295295
++ "conflict set: " ++ showCS cs') $
296296
ExhaustiveSearch smallestKnownCS smallestKnownCM
297297
BackjumpLimitReached ->
298-
failWith "Reached backjump limit while minimizing conflict set."
298+
failWith (mkErrorMsg "Reached backjump limit while minimizing conflict set.")
299299
BackjumpLimitReached
300300
where
301301
varStr = "\"" ++ showVar v ++ "\""
@@ -317,9 +317,6 @@ tryToMinimizeConflictSet runSolver sc cs cm =
317317
ExhaustiveSearch cs' cm' -> f cs' cm'
318318
BackjumpLimitReached -> fromProgress (Fail BackjumpLimitReached)
319319

320-
retryMap :: (t -> step) -> RetryLog t fail done -> RetryLog step fail done
321-
retryMap f l = fromProgress $ (\p -> foldProgress (\x xs -> Step (f x) xs) Fail Done p) $ toProgress l
322-
323320
-- | Goal ordering that chooses goals contained in the conflict set before
324321
-- other goals.
325322
preferGoalsFromConflictSet :: ConflictSet

0 commit comments

Comments
 (0)