
26 Oct
2005
26 Oct
'05
10:58 p.m.
On Mon, Oct 24, 2005 at 02:58:03PM +0200, Tomasz Zielonka wrote:
BTW, I noticed with slight horror that Data.Tree.Tree gained labeled fields in GHC 6.4, and of course they are included in the output of derived Show. This makes Tree's show'ed in 6.4 unreadable in earlier versions of GHC (like 6.2.2). Also, such represenation is too lenghty IMO.
Perhaps rootLabel and subForest could be ordinary functions (but this could break someones code), or we could use a hand-written Show instance, showing without labels and reading both versions?
Sorry, I didn't think about Read. Maybe I should make them functions. However it's quite common to define fields even when you only want the extractor, especially with newtypes.