Felipe Lessa <felipe.le...@gmail.com> writes: > On Tue, Jul 6, 2010 at 7:15 PM, Ivan Lazar Miljenovic > <ivan.miljeno...@gmail.com> wrote: >> As such, I probably won't be implementing the canonical form stuff any >> time soon in graphviz, and might need to examine Graphviz's source code >> to compare it and ensure that it's at least similar :s > > I'm sorry for being silly, but what's the motivation of having this > canonic form? =)
A few things come to mind: * Easier to reason about, as the various items of different types (global attributes, subgraphs/clusters, nodes and edges) are grouped together rather than being all mixed up; compare the layout of Data.GraphViz.Types.DotGraph to Data.GraphViz.Types.Generalised.GDotGraph. * A non-canonical graph can have the same node specified several times with different attributes; in the canonical form they are all merged into one (see the `a' node in the examples in my original email). * Less ambiguity: in the email I just sent out, I had a graph which I expected `a' to be outside the box and `b' to be inside it; the canonical representation of this explicitly puts both of them inside the cluster such that that ambiguity is no longer present. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe