@@ -190,8 +190,8 @@ processPackageConstraintS s c b' (LabeledPackageConstraint pc src) r = go pc
190
190
-- by selectively disabling choices that have been ruled out by global user
191
191
-- constraints.
192
192
enforcePackageConstraints :: M. Map PN [LabeledPackageConstraint ]
193
- -> Tree QGoalReason
194
- -> Tree QGoalReason
193
+ -> Tree a
194
+ -> Tree a
195
195
enforcePackageConstraints pcs = trav go
196
196
where
197
197
go (PChoiceF qpn@ (Q pp pn) gr ts) =
@@ -219,7 +219,7 @@ enforcePackageConstraints pcs = trav go
219
219
-- be run after user preferences have been enforced. For manual flags,
220
220
-- it checks if a user choice has been made. If not, it disables all but
221
221
-- the first choice.
222
- enforceManualFlags :: Tree QGoalReason -> Tree QGoalReason
222
+ enforceManualFlags :: Tree a -> Tree a
223
223
enforceManualFlags = trav go
224
224
where
225
225
go (FChoiceF qfn gr tr True ts) = FChoiceF qfn gr tr True $
@@ -233,7 +233,7 @@ enforceManualFlags = trav go
233
233
go x = x
234
234
235
235
-- | Require installed packages.
236
- requireInstalled :: (PN -> Bool ) -> Tree QGoalReason -> Tree QGoalReason
236
+ requireInstalled :: (PN -> Bool ) -> Tree a -> Tree a
237
237
requireInstalled p = trav go
238
238
where
239
239
go (PChoiceF v@ (Q _ pn) gr cs)
@@ -257,7 +257,7 @@ requireInstalled p = trav go
257
257
-- they are, perhaps this should just result in trying to reinstall those other
258
258
-- packages as well. However, doing this all neatly in one pass would require to
259
259
-- 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
261
261
avoidReinstalls p = trav go
262
262
where
263
263
go (PChoiceF qpn@ (Q _ pn) gr cs)
@@ -370,10 +370,10 @@ type EnforceSIR = Reader (Map (PI PN) QPN)
370
370
-- (that is, package name + package version) there can be at most one qualified
371
371
-- goal resolving to that instance (there may be other goals _linking_ to that
372
372
-- instance however).
373
- enforceSingleInstanceRestriction :: Tree QGoalReason -> Tree QGoalReason
373
+ enforceSingleInstanceRestriction :: Tree a -> Tree a
374
374
enforceSingleInstanceRestriction = (`runReader` M. empty) . cata go
375
375
where
376
- go :: TreeF QGoalReason (EnforceSIR (Tree QGoalReason )) -> EnforceSIR (Tree QGoalReason )
376
+ go :: TreeF a (EnforceSIR (Tree a )) -> EnforceSIR (Tree a )
377
377
378
378
-- We just verify package choices.
379
379
go (PChoiceF qpn gr cs) =
@@ -382,7 +382,7 @@ enforceSingleInstanceRestriction = (`runReader` M.empty) . cata go
382
382
innM _otherwise
383
383
384
384
-- The check proper
385
- goP :: QPN -> POption -> EnforceSIR (Tree QGoalReason ) -> EnforceSIR (Tree QGoalReason )
385
+ goP :: QPN -> POption -> EnforceSIR (Tree a ) -> EnforceSIR (Tree a )
386
386
goP qpn@ (Q _ pn) (POption i linkedTo) r = do
387
387
let inst = PI pn i
388
388
env <- ask
0 commit comments