-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Memory efficient sets with ranges of elements.
--   
--   Memory efficient sets with continuous ranges of discrete, bounded
--   elements. List- and map-based implementations. Interface mimics
--   <a>Data.Set</a> where possible.
@package range-set-list
@version 0.1.2.0


-- | Most functions in this module deal with normalized (closed, fst &lt;=
--   snd, non-overlapping, non-adjacent, ordered) ranges, but do not check
--   this assumption. Most users should use a higher-level interface.
module Data.RangeSet.Internal

-- | Determine the number of items in an <a>Enum</a> range as a <a>Sum</a>
rangeSize :: Enum a => a -> a -> Sum Int

-- | Determine if <tt>[x,y]</tt> is a subset of the list, returning the
--   list right of <tt>y</tt> if so.
rangeIsSubsetList :: Ord a => a -> a -> [(a, a)] -> Maybe [(a, a)]

-- | Determine if the first list is a subset of the second.
isSubsetRangeList :: Ord a => [(a, a)] -> [(a, a)] -> Bool

-- | Add <tt>[x,y]</tt>.
--   
--   There are three possibilities we consider, when inserting into
--   non-empty set:
--   
--   <ul>
--   <li>discretely after: continue</li>
--   <li>discretely before: prepend</li>
--   <li>overlapping: union and prepend</li>
--   </ul>
insertRangeList :: (Ord a, Enum a) => a -> a -> [(a, a)] -> [(a, a)]

-- | Remove a range from a range list.
--   
--   There are 6 possibilities we consider, when deleting from non-empty
--   set:
--   
--   <ul>
--   <li>more</li>
--   <li>less</li>
--   <li>strictly inside (splits)</li>
--   <li>overlapping less-edge</li>
--   <li>overlapping more-edge</li>
--   <li>stricly larger</li>
--   </ul>
deleteRangeList :: (Ord a, Enum a) => a -> a -> [(a, a)] -> [(a, a)]

-- | Union two range lists.
unionRangeList :: (Ord a, Enum a) => [(a, a)] -> [(a, a)] -> [(a, a)]

-- | Compute the set difference, removing each range in the second list
--   from the first.
differenceRangeList :: (Ord a, Enum a) => [(a, a)] -> [(a, a)] -> [(a, a)]

-- | Compute the intersection.
intersectRangeList :: Ord a => [(a, a)] -> [(a, a)] -> [(a, a)]

-- | Compute the complement.
complementRangeList :: (Ord a, Enum a, Bounded a) => [(a, a)] -> [(a, a)]

-- | Normalize a sorted list of elements to a range list.
fromAscElemList :: (Eq a, Enum a) => [a] -> [(a, a)]

-- | Normalize an arbitrary list of elements to a range list.
fromElemList :: (Ord a, Enum a) => [a] -> [(a, a)]

-- | Normalize an arbitrary list of ranges.
normalizeRangeList :: (Ord a, Enum a) => [(a, a)] -> [(a, a)]

-- | Check if a list is normalized.
validRangeList :: (Ord a, Enum a, Bounded a) => [(a, a)] -> Bool


-- | A trivial implementation of range sets.
--   
--   This module is intended to be imported qualified, to avoid name
--   clashes with Prelude functions, e.g.
--   
--   <pre>
--   import Data.RangeSet.List (RSet)
--   import qualified Data.RangeSet.List as RSet
--   </pre>
--   
--   The implementation of <a>RSet</a> is based on <i>list</i>.
--   
--   Compared to <a>Set</a>, this module imposes also <a>Enum</a>
--   restriction for many functions. We must be able to identify
--   consecutive elements to be able to <i>glue</i> and <i>split</i> ranges
--   properly.
--   
--   The implementation assumes that
--   
--   <pre>
--   x &lt; succ x
--   pred x &lt; x
--   </pre>
--   
--   and there aren't elements in between (not true for <a>Float</a> and
--   <a>Double</a>). Also <a>succ</a> and <a>pred</a> are never called for
--   largest or smallest value respectively.
module Data.RangeSet.List

-- | Internally set is represented as sorted list of distinct inclusive
--   ranges.
data RSet a

-- | <i>O(n+m)</i>. See <a>difference</a>.
(\\) :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a
infixl 9 \\

-- | <i>O(1)</i>. Is this the empty set?
null :: RSet a -> Bool

-- | <i>O(1)</i>. Is this the full set?
isFull :: (Eq a, Bounded a) => RSet a -> Bool

-- | <i>O(n)</i>. The number of the elements in the set.
size :: Enum a => RSet a -> Int

-- | <i>O(n)</i>. Is the element in the set?
member :: Ord a => a -> RSet a -> Bool

-- | <i>O(n)</i>. Is the element not in the set?
notMember :: Ord a => a -> RSet a -> Bool

-- | <i>O(n)</i>. Find largest element smaller than the given one.
lookupLT :: (Ord a, Enum a) => a -> RSet a -> Maybe a

-- | <i>O(n)</i>. Find smallest element greater than the given one.
lookupGT :: (Ord a, Enum a) => a -> RSet a -> Maybe a

-- | <i>O(n)</i>. Find largest element smaller or equal to than the given
--   one.
lookupLE :: Ord a => a -> RSet a -> Maybe a

-- | <i>O(n)</i>. Find smallest element greater or equal to than the given
--   one.
lookupGE :: Ord a => a -> RSet a -> Maybe a

-- | <i>O(n)</i>. Is the entire range contained within the set?
containsRange :: Ord a => (a, a) -> RSet a -> Bool

-- | <i>O(n+m)</i>. Is this a subset? <tt>(s1 <a>isSubsetOf</a> s2)</tt>
--   tells whether <tt>s1</tt> is a subset of <tt>s2</tt>.
isSubsetOf :: Ord a => RSet a -> RSet a -> Bool

-- | <i>O(n)</i>. Ensure that a set is valid. All functions should return
--   valid sets except those with unchecked preconditions:
--   <a>fromAscList</a>, <a>fromNormalizedRangeList</a>
valid :: (Ord a, Enum a, Bounded a) => RSet a -> Bool

-- | <i>O(1)</i>. The empty set.
empty :: RSet a

-- | <i>O(1)</i>. The full set.
full :: Bounded a => RSet a

-- | <i>O(1)</i>. Create a singleton set.
singleton :: a -> RSet a

-- | <i>O(1)</i>. Create a continuos range set.
singletonRange :: Ord a => (a, a) -> RSet a

-- | <i>O(n)</i>. Insert an element in a set.
insert :: (Ord a, Enum a) => a -> RSet a -> RSet a

-- | <i>O(n)</i>. Insert a continuos range in a set.
insertRange :: (Ord a, Enum a) => (a, a) -> RSet a -> RSet a

-- | /O(n). Delete an element from a set.
delete :: (Ord a, Enum a) => a -> RSet a -> RSet a

-- | /O(n). Delete a continuos range from a set.
deleteRange :: (Ord a, Enum a) => (a, a) -> RSet a -> RSet a

-- | <i>O(n+m)</i>. The union of two sets.
union :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a

-- | <i>O(n+m)</i>. Difference of two sets.
difference :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a

-- | <i>O(n+m)</i>. The intersection of two sets.
intersection :: (Ord a) => RSet a -> RSet a -> RSet a

-- | <i>O(n)</i>. The expression (<tt><a>split</a> x set</tt>) is a pair
--   <tt>(set1,set2)</tt> where <tt>set1</tt> comprises the elements of
--   <tt>set</tt> less than <tt>x</tt> and <tt>set2</tt> comprises the
--   elements of <tt>set</tt> greater than <tt>x</tt>.
split :: (Ord a, Enum a) => a -> RSet a -> (RSet a, RSet a)

-- | <i>O(n)</i>. Performs a <a>split</a> but also returns whether the
--   pivot element was found in the original set.
splitMember :: (Ord a, Enum a) => a -> RSet a -> (RSet a, Bool, RSet a)

-- | <i>O(1)</i>. The minimal element of a set.
findMin :: RSet a -> a

-- | <i>O(n)</i>. The maximal element of a set.
findMax :: RSet a -> a

-- | <i>O(n)</i>. Complement of the set.
complement :: (Ord a, Enum a, Bounded a) => RSet a -> RSet a

-- | <i>O(n*r)</i>. An alias of <a>toAscList</a>. The elements of a set in
--   ascending order. <i>r</i> is the size of longest range.
elems :: Enum a => RSet a -> [a]

-- | <i>O(n*r)</i>. Convert the set to a list of elements. <i>r</i> is the
--   size of longest range.
toList :: Enum a => RSet a -> [a]

-- | <i>O(n*log n)</i>. Create a set from a list of elements.
fromList :: (Ord a, Enum a) => [a] -> RSet a

-- | <i>O(n)</i>. Create a set from a list of ascending elements.
--   
--   <i>The precondition is not checked.</i> You may use <a>valid</a> to
--   check the result.
fromAscList :: (Ord a, Enum a) => [a] -> RSet a

-- | <i>O(n*r)</i>. Convert the set to an ascending list of elements.
toAscList :: Enum a => RSet a -> [a]

-- | <i>O(1)</i>. Convert the set to a list of range pairs.
toRangeList :: RSet a -> [(a, a)]

-- | <i>O(n*log n)</i>. Create a set from a list of range pairs.
fromRangeList :: (Ord a, Enum a) => [(a, a)] -> RSet a

-- | <i>O(1)</i>. Convert a normalized, non-adjacent, ascending list of
--   ranges to a set.
--   
--   <i>The precondition is not checked.</i> In general you should only use
--   this function on the result of <a>toRangeList</a> or ensure
--   <a>valid</a> on the result.
fromNormalizedRangeList :: [(a, a)] -> RSet a

-- | <i>O(n*r)</i>. Convert the set to a <a>Set</a> of elements. <i>r</i>
--   is the size of longest range.
toSet :: Enum a => RSet a -> Set a
instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.RangeSet.List.RSet a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.RangeSet.List.RSet a)
instance GHC.Show.Show a => GHC.Show.Show (Data.RangeSet.List.RSet a)
instance (GHC.Classes.Ord a, GHC.Enum.Enum a) => Data.Semigroup.Semigroup (Data.RangeSet.List.RSet a)
instance (GHC.Classes.Ord a, GHC.Enum.Enum a) => GHC.Base.Monoid (Data.RangeSet.List.RSet a)
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Data.RangeSet.List.RSet a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.RangeSet.List.RSet a)


-- | This is simply a specialization of <a>Data.RangeSet.Map</a> to
--   <a>Int</a>.
--   
--   The implementation of <a>RIntSet</a> is based on
--   <a>Data.IntMap.Strict</a>.
module Data.RangeSet.IntMap

-- | Internally set is represented as sorted list of distinct inclusive
--   ranges.
data RIntSet

-- | <i>O(n+m)</i>. See <a>difference</a>.
(\\) :: RIntSet -> RIntSet -> RIntSet
infixl 9 \\

-- | <i>O(1)</i>. Is this the empty set?
null :: RIntSet -> Bool

-- | <i>O(1)</i>. Is this the empty set?
isFull :: RIntSet -> Bool

-- | <i>O(n)</i>. The number of the elements in the set.
size :: RIntSet -> Int

-- | <i>O(log n)</i>. Is the element in the set?
member :: Int -> RIntSet -> Bool

-- | <i>O(log n)</i>. Is the element not in the set?
notMember :: Int -> RIntSet -> Bool

-- | <i>O(log n)</i>. Find largest element smaller than the given one.
lookupLT :: Int -> RIntSet -> Maybe Int

-- | <i>O(log n)</i>. Find smallest element greater than the given one.
lookupGT :: Int -> RIntSet -> Maybe Int

-- | <i>O(log n)</i>. Find largest element smaller or equal to than the
--   given one.
lookupLE :: Int -> RIntSet -> Maybe Int

-- | <i>O(log n)</i>. Find smallest element greater or equal to than the
--   given one.
lookupGE :: Int -> RIntSet -> Maybe Int

-- | <i>O(log n)</i>. Is the entire range contained within the set?
containsRange :: (Int, Int) -> RIntSet -> Bool

-- | <i>O(n+m)</i>. Is this a subset? <tt>(s1 <a>isSubsetOf</a> s2)</tt>
--   tells whether <tt>s1</tt> is a subset of <tt>s2</tt>.
isSubsetOf :: RIntSet -> RIntSet -> Bool

-- | <i>O(n)</i>. Ensure that a set is valid. All functions should return
--   valid sets except those with unchecked preconditions:
--   <a>fromAscList</a>, <a>fromNormalizedRangeList</a>
valid :: RIntSet -> Bool

-- | <i>O(1)</i>. The empty set.
empty :: RIntSet

-- | <i>O(1)</i>. The full set.
full :: RIntSet

-- | <i>O(1)</i>. Create a singleton set.
singleton :: Int -> RIntSet

-- | <i>O(1)</i>. Create a continuos range set.
singletonRange :: (Int, Int) -> RIntSet

-- | <i>O(n)</i>. Insert an element in a set.
insert :: Int -> RIntSet -> RIntSet

-- | <i>O(n)</i>. Insert a continuos range in a set.
insertRange :: (Int, Int) -> RIntSet -> RIntSet

-- | /O(n). Delete an element from a set.
delete :: Int -> RIntSet -> RIntSet

-- | /O(n). Delete a continuos range from a set.
deleteRange :: (Int, Int) -> RIntSet -> RIntSet

-- | <i>O(n*m)</i>. The union of two sets.
union :: RIntSet -> RIntSet -> RIntSet

-- | <i>O(n*m)</i>. Difference of two sets.
difference :: RIntSet -> RIntSet -> RIntSet

-- | <i>O(n*m)</i>. The intersection of two sets.
intersection :: RIntSet -> RIntSet -> RIntSet

-- | <i>O(log n)</i>. The expression (<tt><a>split</a> x set</tt>) is a
--   pair <tt>(set1,set2)</tt> where <tt>set1</tt> comprises the elements
--   of <tt>set</tt> less than <tt>x</tt> and <tt>set2</tt> comprises the
--   elements of <tt>set</tt> greater than <tt>x</tt>.
split :: Int -> RIntSet -> (RIntSet, RIntSet)

-- | <i>O(log n)</i>. Performs a <a>split</a> but also returns whether the
--   pivot element was found in the original set.
splitMember :: Int -> RIntSet -> (RIntSet, Bool, RIntSet)

-- | <i>O(log n)</i>. The minimal element of a set.
findMin :: RIntSet -> Int

-- | <i>O(log n)</i>. The maximal element of a set.
findMax :: RIntSet -> Int

-- | <i>O(n)</i>. Complement of the set.
complement :: RIntSet -> RIntSet

-- | <i>O(n*r)</i>. An alias of <a>toAscList</a>. The elements of a set in
--   ascending order. <i>r</i> is the size of longest range.
elems :: RIntSet -> [Int]

-- | <i>O(n*r)</i>. Convert the set to a list of elements (in arbitrary
--   order). <i>r</i> is the size of longest range.
toList :: RIntSet -> [Int]

-- | <i>O(n*log n)</i>. Create a set from a list of elements.
--   
--   Note that unlike <a>Data.Set</a> and other binary trees, this always
--   requires a full sort and traversal to create distinct, disjoint ranges
--   before constructing the tree.
fromList :: [Int] -> RIntSet

-- | <i>O(n)</i>. Create a set from a list of ascending elements.
--   
--   <i>The precondition is not checked.</i> You may use <a>valid</a> to
--   check the result. Note that unlike <a>Data.Set</a> and other binary
--   trees, this always requires a full traversal to create distinct,
--   disjoint ranges before constructing the tree.
fromAscList :: [Int] -> RIntSet

-- | <i>O(n*r)</i>. Convert the set to an ascending list of elements.
toAscList :: RIntSet -> [Int]

-- | <i>O(n)</i>. Convert the set to a list of range pairs.
toRangeList :: RIntSet -> [(Int, Int)]

-- | <i>O(n*log n)</i>. Create a set from a list of range pairs.
--   
--   Note that unlike <a>Data.Set</a> and other binary trees, this always
--   requires a full sort and traversal to create distinct, disjoint ranges
--   before constructing the tree.
fromRangeList :: [(Int, Int)] -> RIntSet

-- | <i>O(n)</i>. Convert a list-based <a>RSet</a> to a map-based
--   <a>RIntSet</a>.
fromRList :: RSet Int -> RIntSet

-- | <i>O(n)</i>. Convert a map-based <a>RIntSet</a> to a list-based
--   <a>RSet</a>.
toRList :: RIntSet -> RSet Int

-- | <i>O(n)</i>. Convert a normalized, non-adjacent, ascending list of
--   ranges to a set.
--   
--   <i>The precondition is not checked.</i> In general you should only use
--   this function on the result of <a>toRangeList</a> or ensure
--   <a>valid</a> on the result.
fromNormalizedRangeList :: [(Int, Int)] -> RIntSet
instance GHC.Classes.Ord Data.RangeSet.IntMap.RIntSet
instance GHC.Classes.Eq Data.RangeSet.IntMap.RIntSet
instance GHC.Show.Show Data.RangeSet.IntMap.RIntSet
instance Data.Semigroup.Semigroup Data.RangeSet.IntMap.RIntSet
instance GHC.Base.Monoid Data.RangeSet.IntMap.RIntSet
instance Control.DeepSeq.NFData Data.RangeSet.IntMap.RIntSet


-- | A slightly less trivial implementation of range sets.
--   
--   This is nearly identical to <a>Data.RangeSet.List</a> except for some
--   important performance differences:
--   
--   <ul>
--   <li>Most query functions in this module are <i>O(log n)</i> rather
--   than <i>O(n)</i>, so may be much faster.</li>
--   <li>Most composition functions have the same time complexity but a
--   higher constant, so may be somewhat slower.</li>
--   </ul>
--   
--   If you're mainly calling <a>member</a>, you should consider using this
--   module, but if you're calling <a>union</a>, <a>deleteRange</a>, and
--   other range manipulation functions as often as querying, you might
--   stick with the list implementation.
--   
--   This module is intended to be imported qualified, to avoid name
--   clashes with Prelude functions, e.g.
--   
--   <pre>
--   import Data.RangeSet.Map (RSet)
--   import qualified Data.RangeSet.Map as RSet
--   </pre>
--   
--   The implementation of <a>RSet</a> is based on <a>Data.Map.Strict</a>.
module Data.RangeSet.Map

-- | Internally set is represented as sorted list of distinct inclusive
--   ranges.
data RSet a

-- | <i>O(n+m)</i>. See <a>difference</a>.
(\\) :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a
infixl 9 \\

-- | <i>O(1)</i>. Is this the empty set?
null :: RSet a -> Bool

-- | <i>O(1)</i>. Is this the empty set?
isFull :: (Eq a, Bounded a) => RSet a -> Bool

-- | <i>O(n)</i>. The number of the elements in the set.
size :: Enum a => RSet a -> Int

-- | <i>O(log n)</i>. Is the element in the set?
member :: (Ord a, Enum a) => a -> RSet a -> Bool

-- | <i>O(log n)</i>. Is the element not in the set?
notMember :: (Ord a, Enum a) => a -> RSet a -> Bool

-- | <i>O(log n)</i>. Find largest element smaller than the given one.
lookupLT :: (Ord a, Enum a) => a -> RSet a -> Maybe a

-- | <i>O(log n)</i>. Find smallest element greater than the given one.
lookupGT :: (Ord a, Enum a) => a -> RSet a -> Maybe a

-- | <i>O(log n)</i>. Find largest element smaller or equal to than the
--   given one.
lookupLE :: Ord a => a -> RSet a -> Maybe a

-- | <i>O(log n)</i>. Find smallest element greater or equal to than the
--   given one.
lookupGE :: Ord a => a -> RSet a -> Maybe a

-- | <i>O(log n)</i>. Is the entire range contained within the set?
containsRange :: Ord a => (a, a) -> RSet a -> Bool

-- | <i>O(n+m)</i>. Is this a subset? <tt>(s1 <a>isSubsetOf</a> s2)</tt>
--   tells whether <tt>s1</tt> is a subset of <tt>s2</tt>.
isSubsetOf :: Ord a => RSet a -> RSet a -> Bool

-- | <i>O(n)</i>. Ensure that a set is valid. All functions should return
--   valid sets except those with unchecked preconditions:
--   <a>fromAscList</a>, <a>fromNormalizedRangeList</a>
valid :: (Ord a, Enum a, Bounded a) => RSet a -> Bool

-- | <i>O(1)</i>. The empty set.
empty :: RSet a

-- | <i>O(1)</i>. The full set.
full :: Bounded a => RSet a

-- | <i>O(1)</i>. Create a singleton set.
singleton :: a -> RSet a

-- | <i>O(1)</i>. Create a continuos range set.
singletonRange :: Ord a => (a, a) -> RSet a

-- | <i>O(n)</i>. Insert an element in a set.
insert :: (Ord a, Enum a) => a -> RSet a -> RSet a

-- | <i>O(n)</i>. Insert a continuos range in a set.
insertRange :: (Ord a, Enum a) => (a, a) -> RSet a -> RSet a

-- | /O(n). Delete an element from a set.
delete :: (Ord a, Enum a) => a -> RSet a -> RSet a

-- | /O(n). Delete a continuos range from a set.
deleteRange :: (Ord a, Enum a) => (a, a) -> RSet a -> RSet a

-- | <i>O(n*m)</i>. The union of two sets.
union :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a

-- | <i>O(n*m)</i>. Difference of two sets.
difference :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a

-- | <i>O(n*m)</i>. The intersection of two sets.
intersection :: (Ord a, Enum a) => RSet a -> RSet a -> RSet a

-- | <i>O(log n)</i>. The expression (<tt><a>split</a> x set</tt>) is a
--   pair <tt>(set1,set2)</tt> where <tt>set1</tt> comprises the elements
--   of <tt>set</tt> less than <tt>x</tt> and <tt>set2</tt> comprises the
--   elements of <tt>set</tt> greater than <tt>x</tt>.
split :: (Ord a, Enum a) => a -> RSet a -> (RSet a, RSet a)

-- | <i>O(log n)</i>. Performs a <a>split</a> but also returns whether the
--   pivot element was found in the original set.
splitMember :: (Ord a, Enum a) => a -> RSet a -> (RSet a, Bool, RSet a)

-- | <i>O(log n)</i>. The minimal element of a set.
findMin :: RSet a -> a

-- | <i>O(log n)</i>. The maximal element of a set.
findMax :: RSet a -> a

-- | <i>O(n)</i>. Complement of the set.
complement :: (Ord a, Enum a, Bounded a) => RSet a -> RSet a

-- | <i>O(n*r)</i>. An alias of <a>toAscList</a>. The elements of a set in
--   ascending order. <i>r</i> is the size of longest range.
elems :: Enum a => RSet a -> [a]

-- | <i>O(n*r)</i>. Convert the set to a list of elements (in arbitrary
--   order). <i>r</i> is the size of longest range.
toList :: Enum a => RSet a -> [a]

-- | <i>O(n*log n)</i>. Create a set from a list of elements. Note that
--   unlike <a>Data.Set</a> and other binary trees, this always requires a
--   full sort and traversal to create distinct, disjoint ranges before
--   constructing the tree.
fromList :: (Ord a, Enum a) => [a] -> RSet a

-- | <i>O(n)</i>. Create a set from a list of ascending elements. <i>The
--   precondition is not checked.</i> You may use <a>valid</a> to check the
--   result. Note that unlike <a>Data.Set</a> and other binary trees, this
--   always requires a full traversal to create distinct, disjoint ranges
--   before constructing the tree.
fromAscList :: (Ord a, Enum a) => [a] -> RSet a

-- | <i>O(n*r)</i>. Convert the set to an ascending list of elements.
toAscList :: Enum a => RSet a -> [a]

-- | <i>O(n)</i>. Convert the set to a list of range pairs.
toRangeList :: RSet a -> [(a, a)]

-- | <i>O(n*log n)</i>. Create a set from a list of range pairs. Note that
--   unlike <a>Data.Set</a> and other binary trees, this always requires a
--   full sort and traversal to create distinct, disjoint ranges before
--   constructing the tree.
fromRangeList :: (Ord a, Enum a) => [(a, a)] -> RSet a

-- | <i>O(n)</i>. Convert a list-based <a>RSet</a> to a map-based
--   <a>RSet</a>.
fromRList :: RSet a -> RSet a

-- | <i>O(n)</i>. Convert a map-based <a>RSet</a> to a list-based
--   <a>RSet</a>.
toRList :: RSet a -> RSet a

-- | <i>O(n)</i>. Convert a normalized, non-adjacent, ascending list of
--   ranges to a set. <i>The precondition is not checked.</i> In general
--   you should only use this function on the result of <a>toRangeList</a>
--   or ensure <a>valid</a> on the result.
fromNormalizedRangeList :: [(a, a)] -> RSet a
instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.RangeSet.Map.RSet a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.RangeSet.Map.RSet a)
instance GHC.Show.Show a => GHC.Show.Show (Data.RangeSet.Map.RSet a)
instance (GHC.Classes.Ord a, GHC.Enum.Enum a) => Data.Semigroup.Semigroup (Data.RangeSet.Map.RSet a)
instance (GHC.Classes.Ord a, GHC.Enum.Enum a) => GHC.Base.Monoid (Data.RangeSet.Map.RSet a)
instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.RangeSet.Map.RSet a)
