Skip to content

Commit 4cc5ca1

Browse files
make style: Format with fourmolu
1 parent cbf6d02 commit 4cc5ca1

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

Cabal/src/Distribution/Simple/Haddock.hs

+7-9
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,9 @@ haddock pkg_descr lbi suffixes flags' = do
288288
_ -> targets
289289

290290
version' =
291-
if flag haddockNoVersionCPP then
292-
Nothing
293-
else
294-
Just version
291+
if flag haddockNoVersionCPP
292+
then Nothing
293+
else Just version
295294

296295
internalPackageDB <-
297296
createInternalPackageDB verbosity lbi (flag haddockDistPref)
@@ -388,7 +387,6 @@ haddock pkg_descr lbi suffixes flags' = do
388387
}
389388

390389
return $ PackageIndex.insert ipi index
391-
392390
CFLib flib ->
393391
when
394392
(flag haddockForeignLibs)
@@ -711,9 +709,9 @@ getGhcCppOpts haddockVersion bi =
711709
where
712710
needsCpp = EnableExtension CPP `elem` usedExtensions bi
713711
defines =
714-
[ "-D__HADDOCK_VERSION__=" ++ show vn
715-
| Just vn <- [versionInt . versionNumbers <$> haddockVersion]
716-
]
712+
[ "-D__HADDOCK_VERSION__=" ++ show vn
713+
| Just vn <- [versionInt . versionNumbers <$> haddockVersion]
714+
]
717715
where
718716
-- For some list xs = [x, y, z ...], versionInt xs results in
719717
-- x * 1000 + y * 10 + z. E.g.:
@@ -724,7 +722,7 @@ getGhcCppOpts haddockVersion bi =
724722
-- >>> versionInt []
725723
-- 0
726724
versionInt :: [Int] -> Int
727-
versionInt = foldr ((+) . uncurry (*)) 0 . zip [1000,10,1]
725+
versionInt = foldr ((+) . uncurry (*)) 0 . zip [1000, 10, 1]
728726

729727
getGhcLibDir
730728
:: Verbosity

cabal-install/src/Distribution/Client/ProjectConfig/Types.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ data PackageConfig = PackageConfig
299299
, packageConfigHaddockBaseUrl :: Flag String -- TODO: [required eventually] use this
300300
, packageConfigHaddockResourcesDir :: Flag String -- TODO: [required eventually] use this
301301
, packageConfigHaddockOutputDir :: Flag FilePath -- TODO: [required eventually] use this
302-
, packageConfigHaddockNoVersionCPP:: Flag Bool -- TODO: [required eventually] use this
302+
, packageConfigHaddockNoVersionCPP :: Flag Bool -- TODO: [required eventually] use this
303303
, packageConfigHaddockForHackage :: Flag HaddockTarget
304304
, -- Test options
305305
packageConfigTestHumanLog :: Flag PathTemplate

cabal-install/src/Distribution/Client/ProjectPlanning.hs

+3-4
Original file line numberDiff line numberDiff line change
@@ -2205,10 +2205,9 @@ elaborateInstallPlan
22052205
-- `documentation: true` should imply `-haddock` for GHC
22062206
addHaddockIfDocumentationEnabled :: ConfiguredProgram -> ConfiguredProgram
22072207
addHaddockIfDocumentationEnabled cp@ConfiguredProgram{..} =
2208-
if programId == "ghc" && elabBuildHaddocks then
2209-
cp { programOverrideArgs = "-haddock" : programOverrideArgs }
2210-
else
2211-
cp
2208+
if programId == "ghc" && elabBuildHaddocks
2209+
then cp{programOverrideArgs = "-haddock" : programOverrideArgs}
2210+
else cp
22122211

22132212
elabPkgSourceLocation = srcloc
22142213
elabPkgSourceHash = Map.lookup pkgid sourcePackageHashes

0 commit comments

Comments
 (0)