hxt-9.3.1.21: A collection of tools for processing XML with Haskell.
CopyrightCopyright (C) 2005-2010 Uwe Schmidt
LicenseMIT
MaintainerUwe Schmidt (uwe\@fh-wedel.de)
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Tree.NTree.TypeDefs

Description

Interface definition for trees

n-ary tree structure (rose trees)

Synopsis

Documentation

data NTree a Source #

n-ary ordered tree (rose trees)

a tree consists of a node and a possible empty list of children. If the list of children is empty, the node is a leaf, else it's an inner node.

NTree implements Eq, Ord, Show and Read

Constructors

NTree a (NTrees a) 

Instances

Instances details
Functor NTree Source #

NTree implements class Functor

Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

fmap :: (a -> b) -> NTree a -> NTree b #

(<$) :: a -> NTree b -> NTree a #

Foldable NTree Source #

NTree implements class Foldable

Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

fold :: Monoid m => NTree m -> m #

foldMap :: Monoid m => (a -> m) -> NTree a -> m #

foldMap' :: Monoid m => (a -> m) -> NTree a -> m #

foldr :: (a -> b -> b) -> b -> NTree a -> b #

foldr' :: (a -> b -> b) -> b -> NTree a -> b #

foldl :: (b -> a -> b) -> b -> NTree a -> b #

foldl' :: (b -> a -> b) -> b -> NTree a -> b #

foldr1 :: (a -> a -> a) -> NTree a -> a #

foldl1 :: (a -> a -> a) -> NTree a -> a #

toList :: NTree a -> [a] #

null :: NTree a -> Bool #

length :: NTree a -> Int #

elem :: Eq a => a -> NTree a -> Bool #

maximum :: Ord a => NTree a -> a #

minimum :: Ord a => NTree a -> a #

sum :: Num a => NTree a -> a #

product :: Num a => NTree a -> a #

Traversable NTree Source #

NTree implements class Taversable

Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

traverse :: Applicative f => (a -> f b) -> NTree a -> f (NTree b) #

sequenceA :: Applicative f => NTree (f a) -> f (NTree a) #

mapM :: Monad m => (a -> m b) -> NTree a -> m (NTree b) #

sequence :: Monad m => NTree (m a) -> m (NTree a) #

Tree NTree Source #

Implementation of Data.Tree.Class interface for rose trees

Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

mkTree :: a -> [NTree a] -> NTree a Source #

mkLeaf :: a -> NTree a Source #

isLeaf :: NTree a -> Bool Source #

isInner :: NTree a -> Bool Source #

getNode :: NTree a -> a Source #

getChildren :: NTree a -> [NTree a] Source #

changeNode :: (a -> a) -> NTree a -> NTree a Source #

changeChildren :: ([NTree a] -> [NTree a]) -> NTree a -> NTree a Source #

setNode :: a -> NTree a -> NTree a Source #

setChildren :: [NTree a] -> NTree a -> NTree a Source #

foldTree :: (a -> [b] -> b) -> NTree a -> b Source #

nodesTree :: NTree a -> [a] Source #

depthTree :: NTree a -> Int Source #

cardTree :: NTree a -> Int Source #

formatTree :: (a -> String) -> NTree a -> String Source #

NavigatableTreeModify NTZipper NTree Source # 
Instance details

Defined in Data.Tree.NTree.Zipper.TypeDefs

NavigatableTreeToTree NTZipper NTree Source # 
Instance details

Defined in Data.Tree.NTree.Zipper.TypeDefs

Eq a => Eq (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

(==) :: NTree a -> NTree a -> Bool #

(/=) :: NTree a -> NTree a -> Bool #

Ord a => Ord (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

compare :: NTree a -> NTree a -> Ordering #

(<) :: NTree a -> NTree a -> Bool #

(<=) :: NTree a -> NTree a -> Bool #

(>) :: NTree a -> NTree a -> Bool #

(>=) :: NTree a -> NTree a -> Bool #

max :: NTree a -> NTree a -> NTree a #

min :: NTree a -> NTree a -> NTree a #

Read a => Read (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Show a => Show (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

showsPrec :: Int -> NTree a -> ShowS #

show :: NTree a -> String #

showList :: [NTree a] -> ShowS #

Binary a => Binary (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

put :: NTree a -> Put #

get :: Get (NTree a) #

putList :: [NTree a] -> Put #

NFData a => NFData (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

rnf :: NTree a -> () #

WNFData a => WNFData (NTree a) Source # 
Instance details

Defined in Data.Tree.NTree.TypeDefs

Methods

rwnf :: NTree a -> () Source #

rwnf2 :: NTree a -> () Source #

type NTrees a = [NTree a] Source #

shortcut for a sequence of n-ary trees