From b451782859ef3859cf0f32a5d7b65e8fa8b10ca9 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Mon, 18 Nov 2024 12:47:04 -0500 Subject: [PATCH] Satisfy fourmolu --- .../PackageDescription/Check/Common.hs | 16 ++++++++-------- .../Distribution/Solver/Modular/DSL.hs | 17 +++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Cabal/src/Distribution/PackageDescription/Check/Common.hs b/Cabal/src/Distribution/PackageDescription/Check/Common.hs index 63da452ed16..a79945d1b5b 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Common.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Common.hs @@ -156,24 +156,24 @@ withoutUpperBound (Dependency _ ver _) = not . hasUpperBound $ ver -- | Is the upper bound version range LEQ (less or equal, <=)? leqUpperBound :: Dependency -> Bool leqUpperBound (Dependency _ ver _) - | OrEarlierVersionF _ <- projectVersionRange ver = True - | otherwise = False + | OrEarlierVersionF _ <- projectVersionRange ver = True + | otherwise = False -- | Does the upper bound version range have a trailing zero? trailingZeroUpperBound :: Dependency -> Bool trailingZeroUpperBound (Dependency _ ver _) - | OrEarlierVersionF v <- projectVersionRange ver = trailingZero v - | EarlierVersionF v <- projectVersionRange ver = trailingZero v - | otherwise = False + | OrEarlierVersionF v <- projectVersionRange ver = trailingZero v + | EarlierVersionF v <- projectVersionRange ver = trailingZero v + | otherwise = False where trailingZero :: Version -> Bool trailingZero (versionNumbers -> vs) | [0] <- vs = False - | 0:_ <- reverse vs = True + | 0 : _ <- reverse vs = True | otherwise = False -- | Is the lower bound version range GT (greater than, >)? gtLowerBound :: Dependency -> Bool gtLowerBound (Dependency _ ver _) - | LaterVersionF _ <- projectVersionRange ver = True - | otherwise = False + | LaterVersionF _ <- projectVersionRange ver = True + | otherwise = False diff --git a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs index 332ebc3ba34..e7be12adb24 100644 --- a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs +++ b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs @@ -492,14 +492,15 @@ exAvSrcPkg ex = -- they are not related to this test suite, and are tested -- with golden tests. let checks = C.checkPackage (srcpkgDescription package) - in - filter (\x -> - not (isgtLowerBound x) - && not (isLeqUpperBound x) - && not (isTrailingZeroUpperBound x) - && not (isMissingUpperBound x) - && not (isUnknownLangExt x)) - checks + in filter + ( \x -> + not (isgtLowerBound x) + && not (isLeqUpperBound x) + && not (isTrailingZeroUpperBound x) + && not (isMissingUpperBound x) + && not (isUnknownLangExt x) + ) + checks in if null pkgCheckErrors then package else