tree-view-0.4: Render trees as foldable HTML and Unicode art
Data.Tree.View
Synopsis
showTree :: Tree String -> String Source #
Show a Tree using Unicode art
Tree
drawTree :: Tree String -> IO () Source #
Draw a Tree on the terminal using Unicode art
Example:
*Data.Tree.View> drawTree $ Node "Add" [Node "Sub" [Node "3" [], Node "Mul" [Node "1" [], Node "2" []]], Node "4" []] Add ├╴Sub │ ├╴3 │ └╴Mul │ ├╴1 │ └╴2 └╴4
data NodeInfo Source #
A tree node
Constructors
Fields
Node name (to be displayed in the HTML tree view)
Additional information (to be displayed when hovering the mouse over the node). This field may contain line breaks.
htmlTree :: Tree NodeInfo -> String Source #
Convert a Tree to HTML with foldable nodes
writeHtmlTree :: FilePath -> Tree NodeInfo -> IO () Source #
Convert a Tree to an HTML file with foldable nodes