[m-dev.] User-controlled pretty-printing

Ian MacLarty maclarty at csse.unimelb.edu.au
Wed Jan 10 14:52:37 AEDT 2007


On Wed, Jan 10, 2007 at 01:42:06PM +1100, Julien Fischer wrote:
> 
> On Wed, 10 Jan 2007, Ian MacLarty wrote:
> 
> >On Thu, Dec 14, 2006 at 09:44:15AM +1100, Ralph Becket wrote:
> >>Recap: I suggested that we could add support for user-defined term
> >>pretty-printing to mdb by allowing programs to provide their own
> >>pretty printers for various types (e.g., for lists, maps, arrays,
> >>etc.)  Each pretty printer would take a univ and some control parameters
> >>(e.g., to control how much of the term is to be printed) and either
> >>succeed, returning a pprint.doc, or fail, if the value contained in the
> >>univ has the wrong type or form.  Zoltan pointed out that we want rich
> >>control over what is printed and also need a sensible mechanism for
> >>navigating through abstract types (e.g., we don't want to have to
> >>specify a path through a 234-tree when looking for a particular entry in
> >>a map).
> >>
> >>So, what we want is:
> >>
> >>- the ability to navigate to a subterm using an abstract address
> >>  e.g., go to the "3rd list item" rather than navigating through cons
> >>  cells with "2/2/2/1";
> >>
> >
> >Just to point out that you can use the cdr browser command to quickly
> >navigate into deep recursive structures.
> 
> Yes, but that's at a lower level of abstraction to what Ralph wants,
> i.e. the ability to say go to the nth element of a list, get the value
> corresponding to this key from a map.
> 

Yes I know, I just thought I'd mention it anyway.

Ian.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list