Safe Haskell | Safe-Inferred |
---|
Ranges are half-open.
Synopsis
- data Ranges n
- extract :: Ranges n -> Maybe [(n, n)]
- extract1 :: Ranges n -> Maybe (Maybe (n, n))
- pair_map :: Ord b => ((a, a) -> (b, b)) -> Ranges a -> Ranges b
- ranges :: Ord n => [(n, n)] -> Ranges n
- sorted_ranges :: Ord n => [(n, n)] -> Ranges n
- merge_sorted :: Ord n => [(n, n)] -> [(n, n)]
- range :: n -> n -> Ranges n
- point :: n -> Ranges n
- everything :: Ranges n
- nothing :: Ranges n
- overlapping :: Ord n => Ranges n -> Ranges n -> Bool
- overlapping_closed :: Ord n => Ranges n -> Ranges n -> Bool
- intersection :: Ord n => Ranges n -> Ranges n -> Ranges n
- invert :: Ord n => (n, n) -> Ranges n -> Ranges n
Documentation
extract1 :: Ranges n -> Maybe (Maybe (n, n)) Source #
Nothing means no ranges, Just Nothing means Everything.
sorted_ranges :: Ord n => [(n, n)] -> Ranges n Source #
merge_sorted :: Ord n => [(n, n)] -> [(n, n)] Source #
everything :: Ranges n Source #
overlapping_closed :: Ord n => Ranges n -> Ranges n -> Bool Source #
This is like overlapping
, except the ranges are closed instead of
half-open.