Skip to content

Commit b4cb88d

Browse files
authored
Merge pull request #6463 from commercialhaskell/us-prefix
Remove us prefix from UnregisterState field names
2 parents 4914a58 + 37c3534 commit b4cb88d

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/Stack/Build/ConstructPlan.hs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,31 +341,31 @@ mkUnregisterLocal tasks dirtyReason localDumpPkgs initialBuildSteps =
341341
-- If any new packages were added to the unregister Map, we need to loop
342342
-- through the remaining packages again to detect if a transitive dependency
343343
-- is being unregistered.
344-
| us.usAnyAdded = loop us.usToUnregister us.usKeep
344+
| us.anyAdded = loop us.toUnregister us.toKeep
345345
-- Nothing added, so we've already caught them all. Return the Map we've
346346
-- already calculated.
347-
| otherwise = us.usToUnregister
347+
| otherwise = us.toUnregister
348348
where
349349
-- Run the unregister checking function on all packages we currently think
350350
-- we'll be keeping.
351351
us = execState (mapM_ go keep) initialUnregisterState
352352
initialUnregisterState = UnregisterState
353-
{ usToUnregister = toUnregister
354-
, usKeep = []
355-
, usAnyAdded = False
353+
{ toUnregister
354+
, toKeep = []
355+
, anyAdded = False
356356
}
357357

358358
go :: DumpPackage -> State UnregisterState ()
359359
go dp = do
360360
us <- get
361-
case maybeUnregisterReason us.usToUnregister ident mParentLibId deps of
361+
case maybeUnregisterReason us.toUnregister ident mParentLibId deps of
362362
-- Not unregistering, add it to the keep list.
363-
Nothing -> put us { usKeep = dp : us.usKeep }
363+
Nothing -> put us { toKeep = dp : us.toKeep }
364364
-- Unregistering, add it to the unregister Map; and indicate that a
365365
-- package was in fact added to the unregister Map, so we loop again.
366366
Just reason -> put us
367-
{ usToUnregister = Map.insert gid (ident, reason) us.usToUnregister
368-
, usAnyAdded = True
367+
{ toUnregister = Map.insert gid (ident, reason) us.toUnregister
368+
, anyAdded = True
369369
}
370370
where
371371
gid = dp.ghcPkgId

src/Stack/Types/Build/ConstructPlan.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ instance HasCompiler Ctx where
212212
instance HasEnvConfig Ctx where
213213
envConfigL = lens (.ctxEnvConfig) (\x y -> x { ctxEnvConfig = y })
214214

215-
-- | State to be maintained during the calculation of local packages
216-
-- to unregister.
215+
-- | State to be maintained during the calculation of local packages to
216+
-- unregister.
217217
data UnregisterState = UnregisterState
218-
{ usToUnregister :: !(Map GhcPkgId (PackageIdentifier, Text))
219-
, usKeep :: ![DumpPackage]
220-
, usAnyAdded :: !Bool
218+
{ toUnregister :: !(Map GhcPkgId (PackageIdentifier, Text))
219+
, toKeep :: ![DumpPackage]
220+
, anyAdded :: !Bool
221221
}
222222

223223
-- | Warn about tools in the snapshot definition. States the tool name

0 commit comments

Comments
 (0)