7
7
{-# LANGUAGE RecordWildCards #-}
8
8
{-# LANGUAGE TypeFamilies #-}
9
9
{-# LANGUAGE ViewPatterns #-}
10
- {-# LANGUAGE NoMonoLocalBinds #-} -- MUST come after TypeFamilies because TypeFamilies imply MonoLocalBinds
10
+ -- MUST come after TypeFamilies because TypeFamilies imply MonoLocalBinds
11
+ {-# LANGUAGE NoMonoLocalBinds #-}
11
12
12
13
-- | Planning how to build everything in a project.
13
14
module Distribution.Client.ProjectPlanning
@@ -148,10 +149,11 @@ import Distribution.Simple.Program.Db
148
149
import Distribution.Simple.Program.Find
149
150
import Distribution.Simple.Setup
150
151
( Flag (.. )
152
+ , TestFlags (testCoverageDistPrefs )
151
153
, flagToList
152
154
, flagToMaybe
153
155
, fromFlagOrDefault
154
- , toFlag , TestFlags ( testCoverageDistPrefs )
156
+ , toFlag
155
157
)
156
158
import qualified Distribution.Simple.Setup as Cabal
157
159
import Distribution.System
@@ -1724,7 +1726,7 @@ elaborateInstallPlan
1724
1726
dieProgress $
1725
1727
text " Internal libraries only supported with per-component builds."
1726
1728
$$ text " Per-component builds were disabled because"
1727
- <+> fsep (punctuate comma reasons)
1729
+ <+> fsep (punctuate comma reasons)
1728
1730
-- TODO: Maybe exclude Backpack too
1729
1731
1730
1732
elab0 = elaborateSolverToCommon spkg
@@ -4306,7 +4308,7 @@ setupHsTestFlags plan (ElaboratedConfiguredPackage{..}) sharedConfig verbosity d
4306
4308
covLibsDistPref = map (distBuildDirectory distDirLayout . elabDistDirParams sharedConfig) librariesToCover
4307
4309
-- The list of modules from libraries to consider in hpc, that Cabal passes to the hpc markup call
4308
4310
-- This list includes all modules, not only the exposed ones.
4309
- covIncludeModules = concatMap (\ ElaboratedConfiguredPackage {elabModuleShape= modShape} -> Map. keys $ modShapeProvides modShape) librariesToCover
4311
+ covIncludeModules = concatMap (\ ElaboratedConfiguredPackage {elabModuleShape = modShape} -> Map. keys $ modShapeProvides modShape) librariesToCover
4310
4312
4311
4313
-- The list of non-pre-existing libraries without module holes, i.e. the
4312
4314
-- main library and sub-libraries components of all the local packages in
@@ -4316,18 +4318,21 @@ setupHsTestFlags plan (ElaboratedConfiguredPackage{..}) sharedConfig verbosity d
4316
4318
-- this seemingly includes the packages that are not local to the project?!
4317
4319
-- Weird, because we filter on localToProject!
4318
4320
-- Try it on cabal-install: cabal test --enable-coverage cabal-install
4319
- librariesToCover
4320
- = mapMaybe (\ case
4321
- InstallPlan. Installed elab@ ElaboratedConfiguredPackage {elabModuleShape= modShape}
4321
+ librariesToCover =
4322
+ mapMaybe
4323
+ ( \ case
4324
+ InstallPlan. Installed elab@ ElaboratedConfiguredPackage {elabModuleShape = modShape}
4322
4325
| elabLocalToProject
4323
- , not (isIndefiniteOrInstantiation modShape)
4324
- -> Just elab
4325
- InstallPlan. Configured elab@ ElaboratedConfiguredPackage {elabModuleShape= modShape}
4326
+ , not (isIndefiniteOrInstantiation modShape) ->
4327
+ Just elab
4328
+ InstallPlan. Configured elab@ ElaboratedConfiguredPackage {elabModuleShape = modShape}
4326
4329
| elabLocalToProject
4327
- , not (isIndefiniteOrInstantiation modShape)
4328
- -> Just elab
4330
+ , not (isIndefiniteOrInstantiation modShape) ->
4331
+ Just elab
4329
4332
_ -> Nothing
4330
- ) $ Graph. toList $ InstallPlan. toGraph plan
4333
+ )
4334
+ $ Graph. toList
4335
+ $ InstallPlan. toGraph plan
4331
4336
4332
4337
isIndefiniteOrInstantiation :: ModuleShape -> Bool
4333
4338
isIndefiniteOrInstantiation = not . Set. null . modShapeRequires
@@ -4465,7 +4470,6 @@ setupHsHaddockArgs :: ElaboratedConfiguredPackage -> [String]
4465
4470
setupHsHaddockArgs elab =
4466
4471
map (showComponentTarget (packageId elab)) (elabHaddockTargets elab)
4467
4472
4468
-
4469
4473
------------------------------------------------------------------------------
4470
4474
4471
4475
-- * Sharing installed packages
0 commit comments