diff --git a/src/Data/Range.hs b/src/Data/Range.hs index 10d7d37e6..46c469b1e 100644 --- a/src/Data/Range.hs +++ b/src/Data/Range.hs @@ -1,7 +1,6 @@ {-# LANGUAGE DeriveAnyClass #-} module Data.Range where -import Data.List.NonEmpty (nonEmpty) import Data.Semigroup import Prologue import Test.LeanCheck @@ -26,10 +25,6 @@ intersectsRange range1 range2 = start range1 < end range2 && start range2 < end unionRange :: Range -> Range -> Range unionRange (Range start1 end1) (Range start2 end2) = Range (min start1 start2) (max end1 end2) --- | Return a range that contains all the ranges in a Foldable, or the passed Range if the Foldable is empty. -unionRangesFrom :: Foldable f => Range -> f Range -> Range -unionRangesFrom range = maybe range sconcat . nonEmpty . toList - -- Instances