úÎ!?ÿ<“=      !"#$%&'()*+,-./0123456789:;<None"#&'.17>DHSX_/áForestStructures Wrapped quickcheck instance for =.ForestStructures A static forest structure. While traversals are always explicitly possible by following the indices, the nodes themselves shall always be ordered by the type p :: TreeOrder/. This is not completely enforced, given that Forestj is exporting the constructor, but encouraged via construction with helper functions. The labels of type a (in label) require a vector structure v for O(1) access.ForestStructures Each node k in [0..n-1] has a label at  label ! k. ForestStructures Each node k has a parent node, or -1 if there is no such parent. ForestStructures Each node kP has a vector of indices for its children. For leaf nodes, the vector is empty. ForestStructuresThe left sibling for a node k&. Will *not* cross subtrees. I.e. if k is lsib of l, then k and l have the same parent. ForestStructuresThe right sibling for a node k. ForestStructuresDThe roots of the individual trees, the forest was constructed from.ForestStructuresKind of possible  TreeOrders.TODO In for in-order traversal?TODO  Unordered% for trees that have no sorted order?ForestStructuresConstruct a static ' with a tree traversal function. I.e. forestWith preorderF trees5 will construct a pre-order forest from the list of trees."Siblings span trees in the forest!ForestStructuresConstruct a pre-ordered forest.ForestStructures Construct a post-ordered forest.ForestStructuresAdd  pre-ordered (!)/ indices. First argument is the starting index.ForestStructuresAdd  pre-ordered (!) indices, but to a forest.ForestStructuresAdd  pre-ordered (!)8 indices to a forest, but throw the label away as well.ForestStructures+Add parent + children information. Yields (Index,Parent,[Child],Label) . Parent is -1 if root node.ForestStructuresGReturn a map with all the nearest siblings for each node, for a forest.ForestStructuresEReturn a map with all the nearest siblings for each node, for a tree.ForestStructures(Return the left-most leaf for each node.ForestStructures+Just the leaf-most leaf for a certain node.ForestStructures)Return the right-most leaf for each node.ForestStructuresIGiven a tree, and a node index, return the right-most leaf for the node.ForestStructuresjReturn all left key roots. These are the nodes that have no (super-) parent with the same left-most leaf.7This function is somewhat specialized for tree editing. TODO group by ForestStructuresŸReturns the list of all sorted subsets of subforests in the forest. If the forest is given in pre-order, then The subsets are returned in reversed pre-order.TODO turn this into newtype vectors that enforce  size >= 1.!ForestStructuresCGiven a forest, return the list of trees that constitue the forest.%  !"#$%  !"#$None"#&'.17>DHSX_b) should hold.-ForestStructures_A tree within the forest brackets the forest on the left and right side with elements of type t..ForestStructures”Juxtaposition of two forests. This allows for simple concatenation of forests. In particular, there is no particular position, while lists prefer x:xs vs xs++[x]./ForestStructuresAn empty forest.  SPJ SPE SPE equiv SPE should hold.9ForestStructures:Structured Forests can be transformed into static forests.TODO types involved! +/.-,56789 +/.-,87659>      !"#$%&'()*+,-./0123456789:;<=>?@/ForestStructures-0.0.1.0-82bQfB0BoZu5AE6gQL6IE9Data.Forest.StaticData.Forest.StructuredPairedQCTreegetTreeSrtunSrtForestlabelparentchildrenlsibrsibroots TreeOrderPrePost Unordered forestWith forestPre forestPost addIndices addIndicesF addIndicesF'parentChildrenF lrSiblingF lrSiblingleftMostLeaves leftMostLeafrightMostLeaves rightMostLeaf leftKeyRootssortedSubForests forestToTreestest1test2runtest$fOrdSrt$fArbitraryQCTree$fEqSrt $fShowSrt $fShowQCTree $fShowForestSPForestSPRSPTSPJSPE$fReadSPForest$fShowSPForest $fEqSPForest $fOrdSPForest$fGenericSPForest_SPR_SPT_SPJ_SPEtoStaticForest$fBitraversableSPForest$fBifoldableSPForest$fBifunctorSPForestcontainers-0.6.0.1 Data.TreeTree