Re: [Haskell-cafe] Pretty printing a tree

2009-05-15 Thread wren ng thornton
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 []

Re: [Haskell-cafe] Pretty printing a tree

2009-05-15 Thread Matthias Görgens
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.

[Haskell-cafe] Pretty printing a tree

2009-05-14 Thread José Romildo Malaquias
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 [] ,

Re: [Haskell-cafe] Pretty printing a tree

2009-05-14 Thread Andrew Wagner
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:

Re: [Haskell-cafe] Pretty printing a tree

2009-05-14 Thread Brent Yorgey
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 || +---++---+ | || |