hxt-8.1.0: A collection of tools for processing XML with Haskell.Source codeContentsIndex
Data.NavTree
Description
Navigable tree structure which allow a program to traverse up the tree as well as down. copied and modified from HXML (http://www.flightlab.com/~joe/hxml/)
Synopsis
data NavTree a = NT (NTree a) [NavTree a] [NTree a] [NTree a]
ntree :: NTree a -> NavTree a
subtreeNT :: NavTree a -> NTree a
dataNT :: NavTree a -> a
downNT :: NavTree a -> Maybe (NavTree a)
preorderNT :: NavTree a -> [NavTree a]
revPreorderNT :: NavTree a -> [NavTree a]
getChildrenNT :: NavTree a -> [NavTree a]
o' :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
maybePlus :: (a -> Maybe a) -> a -> [a]
module Data.Tree.NTree.TypeDefs
Documentation
data NavTree a Source

navigable tree with nodes of type node

a navigable tree consists of a n-ary tree for the current fragment tree, a navigable tree for all ancestors, and two n-ary trees for the previous- and following siblings

Constructors
NT (NTree a) [NavTree a] [NTree a] [NTree a]
show/hide Instances
Eq a => Eq (NavTree a)
Ord a => Ord (NavTree a)
Show a => Show (NavTree a)
ntree :: NTree a -> NavTree aSource
converts a n-ary tree in a navigable tree
subtreeNT :: NavTree a -> NTree aSource
converts a navigable tree in a n-ary tree
dataNT :: NavTree a -> aSource
function for selecting the value of the current fragment tree
downNT :: NavTree a -> Maybe (NavTree a)Source
preorderNT :: NavTree a -> [NavTree a]Source
revPreorderNT :: NavTree a -> [NavTree a]Source
getChildrenNT :: NavTree a -> [NavTree a]Source
o' :: Monad m => (b -> m c) -> (a -> m b) -> a -> m cSource
Kleisli composition:
maybePlus :: (a -> Maybe a) -> a -> [a]Source
module Data.Tree.NTree.TypeDefs
Produced by Haddock version 2.3.0