regexdot-0.11.1.0: A polymorphic, POSIX, extended regex-engine.

Safe HaskellSafe-Inferred

RegExDot.Tree

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines a specific type of tree-structure, which is composed from either a datum, or a list of Tree-lists; http://en.wikipedia.org/wiki/Rose_Tree.
  • This more general tree-structure has the shape of a regular-expression match.
  • This contrasts with the typical binary-tree, which is either empty, or contains a (left Tree, datum, right Tree).

Synopsis

Types

Type-synonyms

Data-types

data Tree a Source

A general purpose tree-type structure.

Constructors

Leaf a

The payload.

Node [TreeList a]

Recurse. NB: a list of lists is required to contain the MatchLists resulting from repeated Alternatives.

Instances

Functor Tree 
Foldable Tree 
Eq a => Eq (Tree a) 
Read a => Read (Tree a) 
Show a => Show (Tree a) 
NFData a => NFData (Tree a) 

Functions

popSource

Arguments

:: Tree a

The tree from which to extract the list of trees hanging immediately beneath its apex.

-> [TreeList a] 

Deconstruct the specified Node; i.e. lop the apex from the Tree, leaving a flat top.