haskey-btree-0.2.0.0: B+-tree implementation in Haskell.

Safe HaskellNone
LanguageHaskell2010

Data.BTree.Primitives.Key

Documentation

class (Ord k, Value k) => Key k where Source #

Methods

narrow :: k -> k -> (k, k) Source #

Given two keys a, b such that 'a < b' compute two new keys a2, b2 such that 'a <= a2 < b2 <= b'. Obviously this always holds for 'a2 == a' and 'b2 = b' but for ByteStrings we can potentially find smaller a2 and b2. If a equals b, the behaviour is undefined.

Instances

Key Bool Source # 

Methods

narrow :: Bool -> Bool -> (Bool, Bool) Source #

Key Double Source # 

Methods

narrow :: Double -> Double -> (Double, Double) Source #

Key Float Source # 

Methods

narrow :: Float -> Float -> (Float, Float) Source #

Key Int8 Source # 

Methods

narrow :: Int8 -> Int8 -> (Int8, Int8) Source #

Key Int16 Source # 

Methods

narrow :: Int16 -> Int16 -> (Int16, Int16) Source #

Key Int32 Source # 

Methods

narrow :: Int32 -> Int32 -> (Int32, Int32) Source #

Key Int64 Source # 

Methods

narrow :: Int64 -> Int64 -> (Int64, Int64) Source #

Key Integer Source # 
Key Word8 Source # 

Methods

narrow :: Word8 -> Word8 -> (Word8, Word8) Source #

Key Word16 Source # 

Methods

narrow :: Word16 -> Word16 -> (Word16, Word16) Source #

Key Word32 Source # 

Methods

narrow :: Word32 -> Word32 -> (Word32, Word32) Source #

Key Word64 Source # 

Methods

narrow :: Word64 -> Word64 -> (Word64, Word64) Source #

Key () Source # 

Methods

narrow :: () -> () -> ((), ()) Source #

Key ByteString Source # 
Key Text Source # 

Methods

narrow :: Text -> Text -> (Text, Text) Source #

Key TxId Source # 

Methods

narrow :: TxId -> TxId -> (TxId, TxId) Source #

Key PageId Source # 

Methods

narrow :: PageId -> PageId -> (PageId, PageId) Source #

(Key a, Key b) => Key (a, b) Source # 

Methods

narrow :: (a, b) -> (a, b) -> ((a, b), (a, b)) Source #