Haskell Xml Toolbox 7.5: The Arrow APISource 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
upNT :: NavTree a -> Maybe (NavTree a)
downNT :: NavTree a -> Maybe (NavTree a)
leftNT :: NavTree a -> Maybe (NavTree a)
rightNT :: 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
maybeStar :: (a -> Maybe a) -> a -> [a]
maybePlus :: (a -> Maybe a) -> a -> [a]
Documentation
data NavTree a

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
??? a => Eq (NavTree a)
??? a => Ord (NavTree a)
??? a => Show (NavTree a)
ntree :: NTree a -> NavTree a
converts a n-ary tree in a navigable tree
subtreeNT :: NavTree a -> NTree a
converts a navigable tree in a n-ary tree
dataNT :: NavTree a -> a
function for selecting the value of the current fragment tree
upNT :: NavTree a -> Maybe (NavTree a)
downNT :: NavTree a -> Maybe (NavTree a)
leftNT :: NavTree a -> Maybe (NavTree a)
rightNT :: 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
Kleisli composition:
maybeStar :: (a -> Maybe a) -> a -> [a]
maybePlus :: (a -> Maybe a) -> a -> [a]
Produced by Haddock version 0.8