Safe Haskell | None |
---|

Ranges are half-open.

## Synopsis

- data Ranges n
- extract :: Ranges n -> 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

## Instances

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

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

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

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

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

Defined in Util.Ranges | |

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

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.