[isabelle] Pretty-printing for trees in 2D



Dear list,

For an Isabelle demo, I'd like to pretty-print a binary tree in a 2D layout, say given by the datatype

datatype tree = Leaf nat | Node tree tree

The output should be 2-dimensional, e.g., what drawVerticalTree in Haskell does:

  http://hackage.haskell.org/package/pretty-tree-0.1.0.0/docs/Data-Tree-Pretty.html

I'm happy to write a print translation for the tree constructors to do that, but I have no clue how I could achieve this with Isabelle's syntax AST. Is this possible at all? Has anyone done something similar before?

Best,
Andreas




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.