[Haskell-cafe] Canonical Graphviz code

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Tue Jul 6 19:20:18 EDT 2010

Felipe Lessa <felipe.lessa at gmail.com> writes:

> On Tue, Jul 6, 2010 at 7:53 PM, Ivan Lazar Miljenovic
> <ivan.miljenovic at gmail.com> wrote:
>> Felipe Lessa <felipe.lessa at gmail.com> writes:
>>> 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, [...]
>> * Less ambiguity: [...]
> So you want to do some post-processing to the Dot graph inside
> Haskell-land?  Or is it just a pretty printer?  I mean, Dot will
> accept both and produce the same result (by definition), so if you
> just wanted to draw it then there wouldn't be any difference.

It's not just to draw it, it's for when you import some Dot code and
then want to edit it (add some extra attributes, etc.).  And to an
extent, it's also a pretty-printer (though graphviz's pretty-printer
will still probably stick to using "dot -Tcanon" as it's using the
pretty library, which doesn't support infinite-length lines with

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list