stylist-traits-0.1.2.0: Traits, datatypes, & parsers for Haskell Stylist
Safe HaskellSafe
LanguageHaskell2010

Stylist.Tree

Description

Abstracts away tree traversals. Mostly used by callers including (soon) XML Conduit Stylist, but also used internally for generating counter text.

Documentation

data StyleTree p Source #

Constructors

StyleTree 

Fields

treeOrder :: (c -> c -> Path -> p -> (c, p')) -> c -> StyleTree p -> StyleTree p' Source #

treeOrder' :: (c -> c -> Path -> p -> (c, p')) -> c -> c -> Path -> [StyleTree p] -> (c, [StyleTree p']) Source #

type Path = [Integer] Source #

treeMap :: (p -> p') -> StyleTree p -> StyleTree p' Source #

treeFind :: StyleTree p -> (p -> Bool) -> [p] Source #

preorder :: (Maybe b -> Maybe b -> a -> b) -> StyleTree a -> StyleTree b Source #

preorder' :: (Maybe b -> Maybe b -> a -> b) -> Maybe b -> Maybe b -> [StyleTree a] -> [StyleTree b] Source #

postorder :: (a -> [b] -> [b]) -> StyleTree a -> [StyleTree b] Source #