radix-tree-1.0.0.2: Radix trees
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Patricia.Word.Strict.Debug

Contents

Description

Safe functions for datatype introspection.

Synopsis

Show

showsTree :: (a -> ShowS) -> Patricia a -> ShowS Source #

\(\mathcal{O}(n)\). Shows the internal structure of the tree.

Validate

data Validity Source #

Whether the tree is well-formed.

Constructors

Valid 
Invalid Reason 

Instances

Instances details
Show Validity Source # 
Instance details

Defined in Data.Patricia.Word.Debug

data Reason Source #

Reason for why the tree is considered malformed.

Constructors

ZeroPrefix

Prefix is 0.

PrefixBelow Prefix Prefix

Prefix below diverges from the prefix above.

KeyBelow Prefix Key

Key diverges the prefix above.

MalformedBin Prefix

One of the branches is empty.

Instances

Instances details
Show Reason Source # 
Instance details

Defined in Data.Patricia.Word.Debug

validate :: Patricia a -> Validity Source #

\(\mathcal{O}(n)\). Checks whether the tree is well-formed.