data IntSet { } #
Nil
Tip
type Key = Int { } #
type Prefix = Int { } #
type Mask = Int { } #
type BitMap = Word { } #
bitsPerWord :: Int { } #
Number of bits in the bitmap (word size).
suffixMask :: Int { } #
Mask for extracting suffix (bits within a tip).
prefixMask :: Int { } #
Mask for extracting prefix (bits above the tip).
empty :: IntSet { } #
The empty set.
singleton :: Key -> IntSet { } #
A set with a single element.
fromList :: [Key] -> IntSet { } #
Build a set from a list.
fromAscList :: [Key] -> IntSet { } #
Build a set from an ascending list.
fromDistinctAscList :: [Key] -> IntSet { } #
Build a set from an ascending list of distinct elements.
insert :: Key -> IntSet -> IntSet { } #
Insert an element.
delete :: Key -> IntSet -> IntSet { } #
Delete an element.
member :: Key -> IntSet -> Bool { } #
Is the element in the set?
notMember :: Key -> IntSet -> Bool { } #
Is the element not in the set?
lookupLT :: Key -> IntSet -> Maybe Key { } #
Find largest element smaller than the given one.
lookupGT :: Key -> IntSet -> Maybe Key { } #
Find smallest element larger than the given one.
lookupLE :: Key -> IntSet -> Maybe Key { } #
Find largest element smaller than or equal to the given one.
lookupGE :: Key -> IntSet -> Maybe Key { } #
Find smallest element larger than or equal to the given one.
null :: IntSet -> Bool { } #
Is the set empty?
size :: IntSet -> Int { } #
Number of elements in the set.
isSubsetOf :: IntSet -> IntSet -> Bool { } #
Is the first set a subset of the second?
isProperSubsetOf :: IntSet -> IntSet -> Bool { } #
Is the first set a proper subset of the second?
disjoint :: IntSet -> IntSet -> Bool { } #
Are the two sets disjoint?
union :: IntSet -> IntSet -> IntSet { } #
Union of two sets.
unions :: [IntSet] -> IntSet { } #
Union of a list of sets.
difference :: IntSet -> IntSet -> IntSet { } #
Difference of two sets.
intersection :: IntSet -> IntSet -> IntSet { } #
Intersection of two sets.
filter :: (Key -> Bool) -> IntSet -> IntSet { } #
Filter elements satisfying a predicate.
partition :: (Key -> Bool) -> IntSet -> (IntSet, IntSet) { } #
Partition by a predicate.
split :: Key -> IntSet -> (IntSet, IntSet) { } #
Split at a value.
splitMember :: Key -> IntSet -> (IntSet, Bool, IntSet) { } #
Split and report membership.
splitRoot :: IntSet -> [IntSet] { } #
Decompose into pieces based on structure.
map :: (Key -> Key) -> IntSet -> IntSet { } #
Map a function over elements.
foldr :: (Key -> b -> b) -> b -> IntSet -> b { } #
Lazy right fold.
f' :: { } #
toAscListAux :: { } #
foldl :: (b -> Key -> b) -> b -> IntSet -> b { } #
Lazy left fold.
foldr' :: (Key -> b -> b) -> b -> IntSet -> b { } #
Strict right fold.
go' :: { } #
foldl' :: (b -> Key -> b) -> b -> IntSet -> b { } #
Strict left fold.
findMin :: IntSet -> Key { } #
Find minimum element (partial).
findMax :: IntSet -> Key { } #
Find maximum element (partial).
lookupMin :: IntSet -> Maybe Key { } #
Lookup minimum element.
lookupMax :: IntSet -> Maybe Key { } #
Lookup maximum element.
deleteMin :: IntSet -> IntSet { } #
Delete minimum element.
deleteMax :: IntSet -> IntSet { } #
Delete maximum element.
deleteFindMin :: IntSet -> (Key, IntSet) { } #
Delete and return minimum.
deleteFindMax :: IntSet -> (Key, IntSet) { } #
Delete and return maximum.
minView :: IntSet -> Maybe (Key, IntSet) { } #
View with minimum removed.
maxView :: IntSet -> Maybe (Key, IntSet) { } #
View with maximum removed.
elems :: IntSet -> [Key] { } #
All elements in ascending order.
toList :: IntSet -> [Key] { } #
Convert to a list.
toAscList :: IntSet -> [Key] { } #
Convert to an ascending list.
toDescList :: IntSet -> [Key] { } #
Convert to a descending list.
tip :: Prefix -> BitMap -> IntSet { } #
Smart constructor for Tip.
bin :: Prefix -> Mask -> IntSet -> IntSet -> IntSet { } #
Smart constructor for Bin.
zero :: Key -> Mask -> Bool { } #
Check if bit is zero.
nomatch :: Key -> Prefix -> Mask -> Bool { } #
Check for match with prefix.
match :: Key -> Prefix -> Mask -> Bool { } #
Check for match.
mask :: Key -> Mask -> Prefix { } #
Get prefix.
prefixOf :: Key -> Prefix { } #
bitmapOf :: Key -> BitMap { } #
Get the bitmap for a key.
shorter :: Mask -> Mask -> Bool { } #
Is the first mask shorter (higher bit)?
branchMask :: Prefix -> Prefix -> Mask { } #
Find branching bit.
highestBitMask :: Int -> Int { } #
Get highest set bit as mask.
foldrBits :: Prefix -> (Key -> b -> b) -> b -> BitMap -> b { } #
Fold right over bits in a bitmap.
foldlBits :: Prefix -> b -> (b -> Key -> b) -> BitMap -> b { } #
Fold left over bits in a bitmap.
instance Show IntSet { }
instance Semigroup IntSet { }
instance Monoid IntSet { }