[m-rev.] for post-commit review: new pragma type_order_switch
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Jun 18 16:25:54 AEST 2025
On Wed, 18 Jun 2025 15:17:27 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> > > > Can anyone think of a better name for the pragma?
> > >
> > > In line with other pragmas / scopes, it probably wants to be
> > > "require_" something.
> > > Perhaps, "require_switch_type_order"?
> >
> > How about require switch_arms_in_type_order? A bit longer,
> > but a lot more descriptive.
>
> Sure, that works.
>
> > > > Can anyone think of any way to improve the wording of the
> > > > warning message?
> > >
> > > Not so much an improvement, but don't we refer to "cases" as "arms"
> > > elsewhere?
> >
> > I know we do, but I think we may refer to cases as well. I will have a look
> > at the manuals, and act according to what I find.
>
> I was going off the fact that we have scopes whose names refer to switch arms.
The attached diff does both of these changes. Since the concept has been
agreed and the code changes are trivial, there is no need for further review.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.tos2
Type: application/octet-stream
Size: 800 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20250618/31bdd556/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.tos2
Type: application/octet-stream
Size: 11031 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20250618/31bdd556/attachment-0003.obj>
More information about the reviews
mailing list