-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Ranges and various functions on them. -- -- Ranges and some functions allowing things like fast membership lookup -- on ranges with holes in them and so on. @package ranges @version 0.2 module Data.Ranges -- | Construct a Range from a lower and upper bound. range :: (Ord a) => a -> a -> Range a -- | Construct a Ranges from a list of lower and upper bounds. ranges :: (Ord a) => [(a, a)] -> Ranges a data (Ord a) => Range a data (Ord a) => Ranges a -- | Tests if a given range contains a particular value. inRange :: (Ord a) => a -> Range a -> Bool -- | Tests if any of the ranges contains a particular value. inRanges :: (Ord a) => a -> Ranges a -> Bool -- | Allows quick lookups using ranges. toSet :: (Ord a) => Ranges a -> Set (Range a) -- | A range consisting of a single value. single :: (Ord a) => a -> Range a instance (Ord a, Show a) => Show (Ranges a) instance (Ord a) => Ord (Range a) instance (Ord a) => Eq (Range a) instance (Ord a, Show a) => Show (Range a)