Skip to content

Commit ab18850

Browse files
committed
Clean up warnings with Data.Semigroup
1 parent 069ce97 commit ab18850

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Data/Ranged/RangedSet.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ module Data.Ranged.RangedSet (
2727

2828
import Data.Ranged.Boundaries
2929
import Data.Ranged.Ranges
30-
#if __GLASGOW_HASKELL__ >= 800
30+
#if MIN_VERSION_base(4,9,0) && !MIN_VERSION_base(4,11,0)
3131
import Data.Semigroup
32-
#elif __GLASGOW_HASKELL__ < 710
32+
#elif !MIN_VERSION_base(4,9,0)
3333
import Data.Monoid
3434
#endif
3535

@@ -44,18 +44,18 @@ infixl 5 -<=-, -<-, -?-
4444
newtype DiscreteOrdered v => RSet v = RSet {rSetRanges :: [Range v]}
4545
deriving (Eq, Show, Ord)
4646

47-
#if __GLASGOW_HASKELL__ >= 800
47+
#if MIN_VERSION_base(4,9,0)
4848
instance DiscreteOrdered a => Semigroup (RSet a) where
4949
(<>) = rSetUnion
50+
#endif
5051

5152
instance DiscreteOrdered a => Monoid (RSet a) where
53+
#if MIN_VERSION_base(4,9,0)
5254
mappend = (<>)
53-
mempty = rSetEmpty
5455
#else
55-
instance DiscreteOrdered a => Monoid (RSet a) where
5656
mappend = rSetUnion
57-
mempty = rSetEmpty
5857
#endif
58+
mempty = rSetEmpty
5959

6060
-- | Determine if the ranges in the list are both in order and non-overlapping.
6161
-- If so then they are suitable input for the unsafeRangedSet function.

0 commit comments

Comments
 (0)