radix-tree-1.0.0.0: Radix trees.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.RadixTree.Word8.Key.Unsafe

Description

Radix tree key internals, and unsafe functions for building and destroying them.

Synopsis

Build

newtype Build Source #

Key as stored in the radix tree.

Constructors

Build 

Fields

  • (Tsil ByteArray)

    List of memory chunks that constitute the key.

    The first chunk is at the bottom of the list.

Instances

Instances details
Show Build Source # 
Instance details

Defined in Data.RadixNTree.Word8.Key

Methods

showsPrec :: Int -> Build -> ShowS #

show :: Build -> String #

showList :: [Build] -> ShowS #

data Tsil a Source #

Snoc-list.

Constructors

Lin 
Snoc (Tsil a) a 

Text

unsafeBuildText :: Build -> Text Source #

Convert a key into a strict Text.

No checks are made to ensure the resulting value is a valid sequence of UTF-8 code units.

Feed

newtype Feed Source #

Key as a sequence of individual bytes.

Constructors

Feed 

Fields

  • (forall a. (forall x. (x -> Step Word8 x) -> x -> a) -> a)

    destroy part of the destroy/unfoldr rule.

Instances

Instances details
Show Feed Source # 
Instance details

Defined in Data.RadixNTree.Word8.Key

Methods

showsPrec :: Int -> Feed -> ShowS #

show :: Feed -> String #

showList :: [Feed] -> ShowS #

data Step a b Source #

Single step of destroying a key.

Constructors

More a b 
Done