[m-dev.] Term browser/printer

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Sep 9 01:33:59 AEST 1998


On 07-Sep-1998, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Just thought I'd toss in my 2c.
> 
> I happen to think a utility/facility for the browsing or "pretty printing" 
> of Mercury terms is a pointless waste of time.  I find output like the 
> following perfectly comprehensible as it stands:
> 
> golf.m:143:   Final instantiatedness of `HeadVar__3' was 
> `unique(list:'.'(any, b
> ound(list:'.'(bound(list:'.'(any, $unify(dead, $typed_inst((list:list((cint:c
> int
> ))), (hal_modes:list_of_old)), $typed_inst((list:list((cint:cint))), 
> (hal_modes:
> list_of_old)), fake)) ; (list:[])), $unify(dead, $typed_inst((list:list((list
> :li
> st((cint:cint))))), list:list_skel((hal_modes:list_of_old))), 
> $typed_inst((list:
> list((list:list((cint:cint))))), list:list_skel((hal_modes:list_of_old))), 
> fake)
> ) ; (list:[]))) ; (list:[]))',
> 
> :-)

One of the items on my long list of things to do is to expand all references
to compiler-defined insts (`$unify', `$typed_inst', etc.) in mode
error messages.  Of course in general such insts might be recursive,
but it would be safe to replace any recursive parts with `...'.
This would improve error messages like the one above a fair bit.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list