
On 19 December 2010 09:54, Edward Z. Yang
Related to editing values embedded deep in structures, but not related to cross-references, you might find this post interesting:
Zippers are another view on editing nested structures, try to find Gerard Huet's original Zipper functional pearl if you can (I think it is probably accessible via Citeseer), although the code is in OCaml its a better eplanation than the haskellwiki page. For the original problem, it may be more appealing to have cross-references outside the syntax tree and put them in a "relational structure" like a finite map (e.g. Data.Map or a variant that is better for one-to-many relations). As information then gets separated into two places, there is perhaps more book-keeping to be done than with tying-the-knot, however the book-keeping itself will be simpler.