[m-dev.] Contribution: Pretty Printing Library

Ralph Becket rbeck at microsoft.com
Thu Apr 13 21:16:14 AEST 2000


> Agreed.  If it is going into the standard library then its format will
> need to be a bit more consistent with the existing library modules,
> particularly since the manual is derived from the source code.
> 
> Could you address some of these things, Ralph?
> 	- File header, with the stability and author fields.  The
> 	  author field usually just contains a key (eg login name),
> 	  and full contact details are in compiler/notes/authors.html.
> 	  You could add yourself there, or otherwise someone else will
> 	  (so people know who to blame ;-)).  It's probably best if
> 	  Fergus judges the "stability" it should initially have.

No problem.

> 	- Tab size.

Hmm.  I've recently (following discussion on this list) adopted the
convention of using four space tabs for code layout.  Since Mercury's
syntax does tend to lead to long lines of text, this often means one
can avoid having to break a goal over more than one line.

I can redo it all using standard eight space tabs, but is it really
necessary?  The guidelines do say that ``highly intended code which 
may be indented at 4 spaces per level of indentation.''

> 	- The dividing lines (mostly) are quite a bit shorter in
> 	  the library modules.

I've just had a quick look through some of the library modules and
a 79 column dividing line seems to be the norm (mine are 80).  Is
this a problem?

> 	- Anything else you notice from the coding standards document.

I use `if then else' rather than `-> ;' and `not' rather than `\+',
but I take it this is okay?

Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list