rangeset-0.0.1.0: Efficient sets for semi-contiguous data
Safe HaskellTrustworthy
LanguageHaskell2010

Data.RangeSet.Internal

Synopsis

Documentation

data RangeSet a Source #

A Set type designed for types that are Enum as well as Ord. This allows the RangeSet to compress the data when it is contiguous, reducing memory-footprint and enabling otherwise impractical operations like complement for Bounded types.

Since: 0.0.1.0

Constructors

Fork !Int !Size !E !E !(RangeSet a) !(RangeSet a) 
Tip 

Instances

Instances details
Eq (RangeSet a) Source # 
Instance details

Defined in Data.RangeSet.Internal.Types

Methods

(==) :: RangeSet a -> RangeSet a -> Bool #

(/=) :: RangeSet a -> RangeSet a -> Bool #

Show (RangeSet a) Source # 
Instance details

Defined in Data.RangeSet.Internal.Types

Methods

showsPrec :: Int -> RangeSet a -> ShowS #

show :: RangeSet a -> String #

showList :: [RangeSet a] -> ShowS #

type E = Int Source #

data SRangeList Source #

Constructors

SRangeCons !E !E !SRangeList 
SNil 

data StrictMaybeE Source #

Constructors

SJust !E 
SNothing 

size :: RangeSet a -> Int Source #

Return the number of elements in the set.

Since: 0.0.1.0

foldE Source #

Arguments

:: (E -> E -> b -> b -> b)

Function that combines the lower and upper values (inclusive) for a range with the folded left- and right-subtrees.

-> b

Value to be substituted at the leaves.

-> RangeSet a 
-> b