On Mon, Aug 11, 2003 at 07:16:08PM +0200, Tomasz Zielonka wrote:
I think it would be better to derive Show instance for Tree instead of
providing a pretty printing one. Then it would be possible to have a
complementing Read instance. The pretty printing function could be
provided under a
On Tue, Aug 12, 2003 at 12:30:27PM +0200, Johannes Waldmann wrote:
On Mon, 11 Aug 2003, Tomasz Zielonka wrote:
The Tree datatype in new Data.Tree module has a Show instance ...
[...]
On the other hand, it is my opinion that for a clean program design,
you should normally define your own
On Mon, 11 Aug 2003, Tomasz Zielonka wrote:
The Tree datatype in new Data.Tree module has a Show instance ...
I agree that Read/Show should normally come as a pair.
It is debatable whether a library should contain a Show instance
that makes it rather impossible to write the corresponding Read
Hi!
The Tree datatype in new Data.Tree module has a Show instance that works
like shown below:
Prelude Data.Tree print (Node 'a' [Node 'b' [], Node 'c' []])
- 'a' -+- 'b'
|
`- 'c'
I use a similar module for Trees in conjunction with WASH for generating
web pages. WASH