module Data.Set.Range.Modify
( insertPoint
, insertRange
, removePoint
, removeRange
) where
import Data.Set.Range.Combine
import Data.Set.Range.Types
insertPoint :: (Ord a, Enum a)
=> a
-> RangeSet a
-> RangeSet a
insertPoint p = union [(p,p)]
insertRange :: (Ord a, Enum a)
=> (a,a)
-> RangeSet a
-> RangeSet a
insertRange r = union [r]
removePoint :: (Ord a, Enum a)
=> a
-> RangeSet a
-> RangeSet a
removePoint p = flip difference [(p,p)]
removeRange :: (Ord a, Enum a)
=> (a,a)
-> RangeSet a
-> RangeSet a
removeRange r = flip difference [r]