[m-rev.] For revew: a new, improved pretty printer

Ian MacLarty maclarty at csse.unimelb.edu.au
Thu Aug 2 09:59:50 AEST 2007


On Thu, Aug 02, 2007 at 09:56:37AM +1000, Zoltan Somogyi wrote:
> On 02-Aug-2007, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:
> > Out of curiosity, what's the reason for putting the comment after the
> > functor and not before?  In all other situations we put the comment
> > *before* the thing the comment is about.
> 
> A type definition looks like this:
> 
> :- type t
> 	--->	f1(...)
> 	;	f2(...)
> 
> Putting the comment on the line before the function symbol just looks weird to
> me, as well as being easily confusable with the comment that should be before
> the line with ":- type", which should describe the whole type, not just f1.
> 

I was thinking of something like:

    % Comment about t.
    %
:- type t

        % Comment about f1.
        %
    --->    f1(...)

        % Comment about f2.
        %
    ;       f2(...).

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



More information about the reviews mailing list