> ...and indeed it can't be done, except by the naive brute-force method > of comparing every subtree, possibly optimized by cryptographically > hashing a representation of every subtree, since sharing isn't an > observable property.
i was thinking that instead of having a reference to a node, each node just holds an index from an array of nodes. Traversal would take an extra step, but it should fix the problem with encode/decode. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe