[Haskell-beginners] How to "insert" a cross reference into a tree structure
Stephen Tetley
stephen.tetley at gmail.com
Sun Dec 19 16:40:33 CET 2010
Hi Tim
Trees - even complex ones like abstract syntax trees for programming
languages - are straight-forward to manipulate. Its easy to manipulate
simple trees, it isn't too hard to manipulate complex trees - though
you might want a "boilerplate removal library" like Uniplate,
Scrap-Your-Boilerplate, or even an attribute grammar (UUAG).
The difficulty comes when you add links / references between parts of
the tree as this turns the tree into a graph. Graph manipulation
without pointers is convoluted. The "moral" is to avoid turning trees
into graphs if you possibly can.
Best wishes
Stephen
More information about the Beginners
mailing list