ContentsIndex
DrawTree
Synopsis
drawTreeTopDown :: Tree String -> String
drawFolder :: Tree (String, String) -> String
numberTreeNodes :: Tree a -> Tree (String, a)
renderTreeNodes :: Int -> Tree (String, Doc) -> Tree (String, String)
Documentation
drawTreeTopDown :: Tree String -> String
A top-down drawing of a tree with root on top and leafs at the bottom.
drawFolder
:: Tree (String, String)Tree with (label, contents) pairs
-> String

Does the same as drawTree except that

  1. Every node has a label. All labels are displayed to the left of the dree drawing. For instance you could represent some program code as a tree and output it with lines numbered.
  2. Strings containing newlines in the tree are handled properly.
numberTreeNodes :: Tree a -> Tree (String, a)
Attach labes with numbers to nodes, startin with 1, in preorder.
renderTreeNodes
:: Intline width
-> Tree (String, Doc)
-> Tree (String, String)
renderTreeNodes tree w tries to render all the nodes with appropriate line lengths so that when the result is drawn with drawFolder, the drawing fits into width w.
Produced by Haddock version 0.8