José Romildo Malaquias wrote:
Hello.
I would like to pretty print a tree in a way that its structure is
easily perceived.
For instance, consider the declarations:
data Node a = Node a [Node a]
type Tree a = [ Node a ]
t = [ Node a [ Node b []
, Node c [ Node c1 []
Hello,
Or --- if you just want pretty trees and you are not confined to the
command line: You can generate GraphViz code and use that program to
draw your tree in PostScript. (There is also a GraphViz-package, but
generating the code yourself is easy.)
Matthias.
Hello.
I would like to pretty print a tree in a way that its structure is
easily perceived.
For instance, consider the declarations:
data Node a = Node a [Node a]
type Tree a = [ Node a ]
t = [ Node a [ Node b []
, Node c [ Node c1 []
,
Perhaps drawTree on
http://www.haskell.org/ghc/docs/latest/html/libraries/containers/Data-Tree.html
2009/5/14 José Romildo Malaquias j.romi...@gmail.com
Hello.
I would like to pretty print a tree in a way that its structure is
easily perceived.
For instance, consider the declarations:
On Thu, May 14, 2009 at 03:58:18PM -0300, José Romildo Malaquias wrote:
Then the resulting of pretty printing the given tree would be something
like the following:
a
|
+-+
|||
bcd
||
+---++---+
| || |