Safe Haskell | None |
---|

Ranges are half-open.

- data Ranges n
- fmap :: Ord b => ((a, a) -> (b, b)) -> Ranges a -> Ranges b
- extract :: Ranges n -> Maybe [(n, n)]
- ranges :: Ord n => [(n, n)] -> Ranges n
- sorted_ranges :: Ord n => [(n, n)] -> Ranges n
- merge_sorted :: Ord n => [(n, n)] -> [(n, n)]
- range :: Ord n => n -> n -> Ranges n
- point :: Ord n => 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

Eq n => Eq (Ranges n) # | |

Show n => Show (Ranges n) # | |

Ord n => Monoid (Ranges n) # | |

DeepSeq.NFData n => DeepSeq.NFData (Ranges n) # | |

Pretty.Pretty n => Pretty.Pretty (Ranges n) # | |

fmap :: Ord b => ((a, a) -> (b, b)) -> Ranges a -> Ranges b Source #

It has a different type from the real fmap, but it wants to be an fmap.

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.