Data.Tree.NTree.TypeDefs

hxt-9.3.1.22: A collection of tools for processing XML with Haskell.

Copyright | Copyright (C) 2005-2010 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe\@fh-wedel.de)
Stability | stable
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Tree.NTree.TypeDefs

Description

Interface definition for trees

n-ary tree structure (rose trees)

Synopsis

- data NTree a = NTree a (NTrees a)
- type NTrees a = [NTree a]

# Documentation

data NTree a #

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 # | 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 # | 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 # | 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 # | Implementation of Data.Tree.Class interface for rose trees
Instance details Defined in Data.Tree.NTree.TypeDefs Methods mkTree :: a -> [NTree a] -> NTree a # mkLeaf :: a -> NTree a # isLeaf :: NTree a -> Bool # isInner :: NTree a -> Bool # getNode :: NTree a -> a # getChildren :: NTree a -> [NTree a] # changeNode :: (a -> a) -> NTree a -> NTree a # changeChildren :: ([NTree a] -> [NTree a]) -> NTree a -> NTree a # setNode :: a -> NTree a -> NTree a # setChildren :: [NTree a] -> NTree a -> NTree a # foldTree :: (a -> [b] -> b) -> NTree a -> b # nodesTree :: NTree a -> [a] # depthTree :: NTree a -> Int # cardTree :: NTree a -> Int # formatTree :: (a -> String) -> NTree a -> String #
NavigatableTreeModify NTZipper NTree # |
Instance details Defined in Data.Tree.NTree.Zipper.TypeDefs Methods addTreeLeft :: NTree a -> NTZipper a -> Maybe (NTZipper a) # addTreeRight :: NTree a -> NTZipper a -> Maybe (NTZipper a) # dropTreeLeft :: NTZipper a -> Maybe (NTZipper a) # dropTreeRight :: NTZipper a -> Maybe (NTZipper a) # substThisTree :: NTree a -> NTZipper a -> NTZipper a #
NavigatableTreeToTree NTZipper NTree # |
Instance details Defined in Data.Tree.NTree.Zipper.TypeDefs Methods fromTree :: NTree a -> NTZipper a # toTree :: NTZipper a -> NTree a #
Binary a => Binary (NTree a) # |
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) # |
Instance details Defined in Data.Tree.NTree.TypeDefs Methods rnf :: NTree a -> () #
Read a => Read (NTree a) # |
Instance details Defined in Data.Tree.NTree.TypeDefs Methods readsPrec :: Int -> ReadS (NTree a) # readList :: ReadS [NTree a] # readPrec :: ReadPrec (NTree a) # readListPrec :: ReadPrec [NTree a] #
Show a => Show (NTree a) # |
Instance details Defined in Data.Tree.NTree.TypeDefs Methods showsPrec :: Int -> NTree a -> ShowS # show :: NTree a -> String # showList :: [NTree a] -> ShowS #
Eq a => Eq (NTree a) # |
Instance details Defined in Data.Tree.NTree.TypeDefs Methods (==) :: NTree a -> NTree a -> Bool # (/=) :: NTree a -> NTree a -> Bool #
Ord a => Ord (NTree a) # |
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 #
WNFData a => WNFData (NTree a) # |
Instance details Defined in Data.Tree.NTree.TypeDefs Methods rwnf :: NTree a -> () # rwnf2 :: NTree a -> () #

type NTrees a = [NTree a] #

shortcut for a sequence of n-ary trees