~alcinnz/haskell-stylist

6d2737484b2077fcbee4b32a00f6a60aad7225bb — Adrian Cochrane 1 year, 9 months ago 148a305 + 321d7bd
Merge branch 'main' of git.adrian.geek.nz:/srv/git/haskell-stylist into main
2 files changed, 5 insertions(+), 5 deletions(-)

M stylist-traits/src/Stylist/Tree.hs
M stylist-traits/stylist-traits.cabal
M stylist-traits/src/Stylist/Tree.hs => stylist-traits/src/Stylist/Tree.hs +4 -4
@@ 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]

M stylist-traits/stylist-traits.cabal => stylist-traits/stylist-traits.cabal +1 -1
@@ 10,7 10,7 @@ name:                stylist-traits
-- PVP summary:      +-+------- breaking API changes
--                   | | +----- non-breaking API additions
--                   | | | +--- code changes with no API change
version:             0.1.0.0
version:             0.1.1.0

-- A short (one-line) description of the package.
synopsis:            Traits, datatypes, & parsers for Haskell Stylist