[m-dev.] for review: cleanup of type_ctor_infos, relative diff 1
Tyson Dowd
trd at cs.mu.OZ.AU
Thu Mar 9 16:23:37 AEDT 2000
On 09-Mar-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 09-Mar-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > On 08-Mar-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > > +:- type module_sub_info --->
> > > > + module_sub(
> > >
> > > That change does not match the layout conventions documented
> > > in the "Layout" section of our Mercury coding standard.
> >
> > No, but it does avoid several
>
> That sentence was unfinished. I meant to say that keeping the previous level of
> indentation would have made several lines too long, and would have prevented
> the lining up of the field types (which another part of the coding standard
> requires).
>
> In general, when you have some long field names and some long types,
> having the coding standard require starting the line with *three* tabs
> is excessive. Especially given that the requirement that the types start in
> the same column means that the longest field name and the longest type must
> fit on the *same* line.
I think it would be fine to wrap these, as we have done in the past with
comments. Types should start in the same column, unless they don't fit
in which case you can wrap them to the next line indented one tab
foo :: foo_type
very_long_name_that_doesnt_fit_anywhere ::
very_long_type_name_too_so_nyer
bar_bar_bar :: bar_bar_bar_type
(I have no particular liking for the 3 tab rule, since I think it's
overkill for named fields -- 3 tabs makes unnamed fields look centered
on 80 columns, but field names are often quite long so perhaps 2 tabs
would be acceptable too).
foo :: foo_type
very_long_name_that_doesnt_fit_anywhere ::
very_long_type_name_too_so_nyer
bar_bar_bar :: bar_bar_bar_type
--
The quantum sort:
while (!sorted) { do_nothing(); }
Tyson Dowd <tyson at tyse.net> http://tyse.net/
--------------------------------------------------------------------------
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