The tree-traversals package defines
in-order, pre-order, post-order, level-order, and reversed level-order traversals
for tree-like types:
The package also provides newtype wrappers for the various traversals so they
may be used with traverse, i.e.
To implement the various orders, the tree-traversals package provides the
Control.Applicative.Phases.Phases applicative transformer for organizing effects
into distinct phases.
Instances of Data.Traversable.TreeLike.TreeLike are provided for
rose trees (Data.Tree.Tree),
binary trees (Data.BinaryTree.BinaryTree),
forests (Data.Traversable.TreeLike.Forest),
and algebraic combinations of trees (Data.Functor.Compose.Compose outerTree innerTree,
Data.Functor.Product fstTree sndTree, Data.Functor.Sum leftTree rightTree).