@@ 2,7 2,7 @@
-- Mostly used by callers including (soon) XML Conduit Stylist,
-- but also used internally for generating counter text.
module Stylist.Tree(StyleTree(..), treeOrder, treeOrder',
- Path, treeMap, treeFlatten, preorder, preorder', postorder) where
+ Path, treeMap, treeFind, treeFlatten, treeFlattenAll, preorder, preorder', postorder) where
data StyleTree p = StyleTree {
style :: p,
@@ 36,10 36,10 @@ treeFlatten' (StyleTree _ childs:sibs) = treeFlatten' childs ++ treeFlatten' sib
treeFlatten' [] = []
treeFlattenAll :: StyleTree p -> [p]
-treeFlattenAll = treeFlatten' . children
+treeFlattenAll = treeFlattenAll' . children
treeFlattenAll' :: [StyleTree p] -> [p]
-treeFlattenAll' (StyleTree p []:ps) = p : treeFlatten' ps
-treeFlattenAll' (StyleTree p childs:sibs) = p : treeFlatten' childs ++ treeFlatten' sibs
+treeFlattenAll' (StyleTree p []:ps) = p : treeFlattenAll' ps
+treeFlattenAll' (StyleTree p childs:sibs) = p : treeFlattenAll' childs ++ treeFlattenAll' sibs
treeFlattenAll' [] = []
treeFind :: StyleTree p -> (p -> Bool) -> [p]