Skip to content

Commit 35dda16

Browse files
committed
Remove unnecessary references to QGoalReason
1 parent fb51463 commit 35dda16

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cabal-install/Distribution/Solver/Modular/Preference.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ processPackageConstraintS s c b' (LabeledPackageConstraint pc src) r = go pc
190190
-- by selectively disabling choices that have been ruled out by global user
191191
-- constraints.
192192
enforcePackageConstraints :: M.Map PN [LabeledPackageConstraint]
193-
-> Tree QGoalReason
194-
-> Tree QGoalReason
193+
-> Tree a
194+
-> Tree a
195195
enforcePackageConstraints pcs = trav go
196196
where
197197
go (PChoiceF qpn@(Q pp pn) gr ts) =
@@ -219,7 +219,7 @@ enforcePackageConstraints pcs = trav go
219219
-- be run after user preferences have been enforced. For manual flags,
220220
-- it checks if a user choice has been made. If not, it disables all but
221221
-- the first choice.
222-
enforceManualFlags :: Tree QGoalReason -> Tree QGoalReason
222+
enforceManualFlags :: Tree a -> Tree a
223223
enforceManualFlags = trav go
224224
where
225225
go (FChoiceF qfn gr tr True ts) = FChoiceF qfn gr tr True $
@@ -233,7 +233,7 @@ enforceManualFlags = trav go
233233
go x = x
234234

235235
-- | Require installed packages.
236-
requireInstalled :: (PN -> Bool) -> Tree QGoalReason -> Tree QGoalReason
236+
requireInstalled :: (PN -> Bool) -> Tree a -> Tree a
237237
requireInstalled p = trav go
238238
where
239239
go (PChoiceF v@(Q _ pn) gr cs)
@@ -257,7 +257,7 @@ requireInstalled p = trav go
257257
-- they are, perhaps this should just result in trying to reinstall those other
258258
-- packages as well. However, doing this all neatly in one pass would require to
259259
-- change the builder, or at least to change the goal set after building.
260-
avoidReinstalls :: (PN -> Bool) -> Tree QGoalReason -> Tree QGoalReason
260+
avoidReinstalls :: (PN -> Bool) -> Tree a -> Tree a
261261
avoidReinstalls p = trav go
262262
where
263263
go (PChoiceF qpn@(Q _ pn) gr cs)
@@ -370,10 +370,10 @@ type EnforceSIR = Reader (Map (PI PN) QPN)
370370
-- (that is, package name + package version) there can be at most one qualified
371371
-- goal resolving to that instance (there may be other goals _linking_ to that
372372
-- instance however).
373-
enforceSingleInstanceRestriction :: Tree QGoalReason -> Tree QGoalReason
373+
enforceSingleInstanceRestriction :: Tree a -> Tree a
374374
enforceSingleInstanceRestriction = (`runReader` M.empty) . cata go
375375
where
376-
go :: TreeF QGoalReason (EnforceSIR (Tree QGoalReason)) -> EnforceSIR (Tree QGoalReason)
376+
go :: TreeF a (EnforceSIR (Tree a)) -> EnforceSIR (Tree a)
377377

378378
-- We just verify package choices.
379379
go (PChoiceF qpn gr cs) =
@@ -382,7 +382,7 @@ enforceSingleInstanceRestriction = (`runReader` M.empty) . cata go
382382
innM _otherwise
383383

384384
-- The check proper
385-
goP :: QPN -> POption -> EnforceSIR (Tree QGoalReason) -> EnforceSIR (Tree QGoalReason)
385+
goP :: QPN -> POption -> EnforceSIR (Tree a) -> EnforceSIR (Tree a)
386386
goP qpn@(Q _ pn) (POption i linkedTo) r = do
387387
let inst = PI pn i
388388
env <- ask

0 commit comments

Comments
 (0)