Skip to content

Commit

Permalink
Satisfy fourmolu
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Nov 25, 2024
1 parent 3fe5b61 commit 6558a16
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Cabal-syntax/src/Distribution/Types/VersionRange.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ module Distribution.Types.VersionRange
-- *** Lower Bound
, hasLowerBound
, hasGTLowerBound

-- *** Upper Bound
, hasUpperBound
, hasLEQUpperBound
, hasTrailingZeroUpperBound

-- *** Any Version
, isAnyVersion
, isAnyVersionLight
Expand Down Expand Up @@ -54,7 +56,8 @@ module Distribution.Types.VersionRange
, hyloVersionRange

-- * Version Utilities
-- See "Distribution.Version" for more utilities.

-- See "Distribution.Version" for more utilities.
, wildcardUpperBound
, majorUpperBound
, isWildcardRange
Expand Down Expand Up @@ -242,11 +245,12 @@ hasTrailingZeroUpperBound :: VersionRange -> Bool
hasTrailingZeroUpperBound = queryVersionRange (\case HasTrailingZeroUpperBound -> True; _ -> False) hasTrailingZeroUpperBound

queryVersionRange :: (VersionRangeF VersionRange -> Bool) -> (VersionRange -> Bool) -> VersionRange -> Bool
queryVersionRange pf p (projectVersionRange -> v) = let f = queryVersionRange pf p in
pf v || case v of
IntersectVersionRangesF x y -> f x || f y
UnionVersionRangesF x y -> f x || f y
_ -> False
queryVersionRange pf p (projectVersionRange -> v) =
let f = queryVersionRange pf p
in pf v || case v of
IntersectVersionRangesF x y -> f x || f y
UnionVersionRangesF x y -> f x || f y
_ -> False

-- $setup
-- >>> import Distribution.Parsec
Expand Down

0 comments on commit 6558a16

Please sign in to comment.