Modulecontainers-0.8Haskell2010
Data.IntSet.Internal.IntTreeCommons
WARNING
This module is considered internal.
The Package Versioning Policy does not apply.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Authors importing this module are expected to track development closely.
Description
This module defines common constructs used by both Data.IntSet and Data.IntMap.
- 4 types
- 7 values
- Packagecontainers-0.8
- Exports11
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceIntTreeCommons.hs
Whether the Int does not start with the given Prefix.
An Int starts with a Prefix if it shares the high bits with the internal
Int value of the Prefix up to the mask bit.
nomatch is usually used to determine whether a key belongs in a Bin,
since all keys in a Bin share a Prefix.
Whether the Int is to the left of the split created by a Bin with this
Prefix.
This does not imply that the Int belongs in this Bin. That fact is
usually determined first using nomatch.
Whether this Prefix splits a Bin at the sign bit.
This can only be True at the top level. If it is true, the left child contains non-negative keys and the right child contains negative keys.
A TreeTreeBranch is returned by treeTreeBranch to indicate how two
Bins relate to each other.
Consider that A and B are the Bins whose Prefixes are given to
treeTreeBranch as the first and second arguments respectively.
The prefix of key i up to (but not including) the switching
bit m.
The first switching bit where the two prefixes disagree.
Precondition for defined behavior: p1 /= p2