Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Util.Ranges

Description

Ranges are half-open.

Synopsis

Documentation

data Ranges n Source #

Instances

Instances details
Ord n => Monoid (Ranges n) Source # 
Instance details

Defined in Util.Ranges

Methods

mempty :: Ranges n #

mappend :: Ranges n -> Ranges n -> Ranges n #

mconcat :: [Ranges n] -> Ranges n #

Ord n => Semigroup (Ranges n) Source # 
Instance details

Defined in Util.Ranges

Methods

(<>) :: Ranges n -> Ranges n -> Ranges n #

sconcat :: NonEmpty (Ranges n) -> Ranges n #

stimes :: Integral b => b -> Ranges n -> Ranges n #

Show n => Show (Ranges n) Source # 
Instance details

Defined in Util.Ranges

Methods

showsPrec :: Int -> Ranges n -> ShowS #

show :: Ranges n -> String #

showList :: [Ranges n] -> ShowS #

DeepSeq.NFData n => DeepSeq.NFData (Ranges n) Source # 
Instance details

Defined in Util.Ranges

Methods

rnf :: Ranges n -> () #

Eq n => Eq (Ranges n) Source # 
Instance details

Defined in Util.Ranges

Methods

(==) :: Ranges n -> Ranges n -> Bool #

(/=) :: Ranges n -> Ranges n -> Bool #

Pretty.Pretty n => Pretty.Pretty (Ranges n) Source # 
Instance details

Defined in Util.Ranges

extract :: Ranges n -> Maybe [(n, n)] Source #

Nothing means an everything range.

extract1 :: Ranges n -> Maybe (Maybe (n, n)) Source #

Nothing means no ranges, Just Nothing means Everything.

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

ranges :: Ord n => [(n, n)] -> Ranges n Source #

This doesn't ensure that, given (s, e), s <= e.

sorted_ranges :: Ord n => [(n, n)] -> Ranges n Source #

merge_sorted :: Ord n => [(n, n)] -> [(n, n)] Source #

range :: n -> n -> Ranges n Source #

point :: n -> 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.

invert :: Ord n => (n, n) -> Ranges n -> Ranges n Source #

Given a complete range, invert the ranges.