Skip to content

Commit 2d01eb4

Browse files
committed
Remove added redundant brackets
1 parent 167a275 commit 2d01eb4

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

Cabal/src/Distribution/PackageDescription/Check/Target.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ checkLibrary
7979
checkP
8080
( not $
8181
all
82-
(`elem` (explicitLibModules lib))
82+
(`elem` explicitLibModules lib)
8383
(libModulesAutogen lib)
8484
)
8585
(PackageBuildImpossible AutogenNotExposed)
@@ -172,7 +172,7 @@ checkExecutable
172172
-- Alas exeModules ad exeModulesAutogen (exported from
173173
-- Distribution.Types.Executable) take `Executable` as a parameter.
174174
checkP
175-
(not $ all (`elem` (exeModules exe)) (exeModulesAutogen exe))
175+
(not $ all (`elem` exeModules exe) (exeModulesAutogen exe))
176176
(PackageBuildImpossible $ AutogenNoOther cet)
177177
checkP
178178
( not $
@@ -218,7 +218,7 @@ checkTestSuite
218218
checkP
219219
( not $
220220
all
221-
(`elem` (testModules ts))
221+
(`elem` testModules ts)
222222
(testModulesAutogen ts)
223223
)
224224
(PackageBuildImpossible $ AutogenNoOther cet)
@@ -280,7 +280,7 @@ checkBenchmark
280280
checkP
281281
( not $
282282
all
283-
(`elem` (benchmarkModules bm))
283+
(`elem` benchmarkModules bm)
284284
(benchmarkModulesAutogen bm)
285285
)
286286
(PackageBuildImpossible $ AutogenNoOther cet)

cabal-install-solver/src/Distribution/Solver/Modular/Preference.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ preferPackagePreferences pcs =
135135
preferred pn opt =
136136
let PackagePreferences vrs _ _ = pcs pn
137137
in fromIntegral . negate . L.length $
138-
L.filter (`checkVR` (version opt)) vrs
138+
L.filter (`checkVR` version opt) vrs
139139

140140
-- Prefer installed packages over non-installed packages.
141141
installed :: POption -> Weight

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ type OutdatedDependency = OutdatedDependencyX Version
395395
-- | Convert a list of 'UserConstraint's to a 'Dependency' list.
396396
userConstraintsToDependencies :: [(UserConstraint, ConstraintSource)] -> [CandidateOutdatedDependency]
397397
userConstraintsToDependencies ucnstrs =
398-
mapMaybe (\(uc, src) -> fmap (`mkCandidateOutdatedDependency` (ConfigSource src)) (packageConstraintToDependency . userToPackageConstraint $ uc)) ucnstrs
398+
mapMaybe (\(uc, src) -> fmap (`mkCandidateOutdatedDependency` ConfigSource src) (packageConstraintToDependency . userToPackageConstraint $ uc)) ucnstrs
399399

400400
-- | Read the list of dependencies from the freeze file.
401401
depsFromFreezeFile :: Verbosity -> IO [CandidateOutdatedDependency]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,8 @@ powershellTransport prog =
810810
parseResponse :: String -> IO (HttpCode, Maybe ETag)
811811
parseResponse x =
812812
case lines $ trim x of
813-
(code : etagv : _) -> fmap (,Just etagv) $ parseCode code x
814-
(code : _) -> fmap (,Nothing) $ parseCode code x
813+
(code : etagv : _) -> (,Just etagv) <$> parseCode code x
814+
(code : _) -> (,Nothing) <$> parseCode code x
815815
_ -> statusParseFail verbosity uri x
816816
parseCode :: String -> String -> IO HttpCode
817817
parseCode code x = case readMaybe code of

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,9 @@ processingInvariant
783783
-> Bool
784784
processingInvariant plan (Processing processingSet completedSet failedSet) =
785785
-- All the packages in the three sets are actually in the graph
786-
assert (Foldable.all (`Graph.member` (planGraph plan)) processingSet)
787-
$ assert (Foldable.all (`Graph.member` (planGraph plan)) completedSet)
788-
$ assert (Foldable.all (`Graph.member` (planGraph plan)) failedSet)
786+
assert (Foldable.all (`Graph.member` planGraph plan) processingSet)
787+
$ assert (Foldable.all (`Graph.member` planGraph plan) completedSet)
788+
$ assert (Foldable.all (`Graph.member` planGraph plan) failedSet)
789789
$
790790
-- The processing, completed and failed sets are disjoint from each other
791791
assert (noIntersection processingSet completedSet)

0 commit comments

Comments
 (0)