@@ -124,10 +124,11 @@ instance Monoid W where
124
124
mempty = memptydefault
125
125
mappend = (<>)
126
126
127
- type M = RWST -- TODO replace with more efficient WS stack on top of StackT
127
+ type M = RWST -- TODO replace with more efficient WS stack on top of (RIO Ctx).
128
128
Ctx
129
129
W
130
130
(Map PackageName (Either ConstructPlanException AddDepRes ))
131
+ -- ^ Library map
131
132
IO
132
133
133
134
data Ctx = Ctx
@@ -509,7 +510,7 @@ addFinal lp package isAllInOne buildHaddocks = do
509
510
tell mempty { wFinals = Map. singleton (packageName package) res }
510
511
511
512
-- | Given a 'PackageName', adds all of the build tasks to build the package, if
512
- -- needed. First checks if the package name is in the lib map.
513
+ -- needed. First checks if the package name is in the library map.
513
514
--
514
515
-- 'constructPlan' invokes this on all the target packages, setting
515
516
-- @treatAsDep'@ to False, because those packages are direct build targets.
@@ -677,7 +678,7 @@ installPackage name ps minstalled = do
677
678
Just tb -> do
678
679
-- Attempt to find a plan which performs an all-in-one build. Ignore
679
680
-- the writer action + reset the state if it fails.
680
- s <- get
681
+ libMap <- get
681
682
res <- pass $ do
682
683
res <- addPackageDeps tb
683
684
let writerFunc w = case res of
@@ -711,8 +712,8 @@ installPackage name ps minstalled = do
711
712
planDebug $
712
713
" installPackage: Before trying cyclic plan, resetting lib \
713
714
\result map to "
714
- <> show s
715
- put s
715
+ <> show libMap
716
+ put libMap
716
717
-- Otherwise, fall back on building the tests / benchmarks in a
717
718
-- separate step.
718
719
res' <- resolveDepsAndInstall
@@ -808,7 +809,7 @@ installPackageGivenDeps isAllInOne buildHaddocks ps package minstalled
808
809
packageBuildTypeConfig :: Package -> Bool
809
810
packageBuildTypeConfig pkg = packageBuildType pkg == Configure
810
811
811
- -- Update response in the lib map. If it is an error, and there's already an
812
+ -- Update response in the library map. If it is an error, and there's already an
812
813
-- error about cyclic dependencies, prefer the cyclic error.
813
814
updateLibMap :: PackageName -> Either ConstructPlanException AddDepRes -> M ()
814
815
updateLibMap name val = modify $ \ mp ->
0 commit comments