[m-rev.] for review: reversing operator priorities
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sat Nov 12 03:35:29 AEDT 2022
On Sat, 12 Nov 2022 01:32:27 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> > The point of that XXX is that the name lookup_op is misleading.
> > First, lookup_up is a semidet predicate, while everywhere else
> > in the library lookup names det operations. Second, it does not
> > return anything; it merely tests whether the given string is an operator
> > in the given table. I would suggest renaming to something
> > like is_operator or is_op.
>
> I would go with is_op.
Done.
> >>> - % The Mercury operator table used to be the only one allowed.
> >>> - % The old names are no longer appropriate.
> >>> + % We export this type synonym to io.m (for get_op_table/set_op_table)
> >>
> >> The whole setup with io.get/set_op_table seems clunky.
> >
> > Agreed.
> >
> >> The only user of
> >> io.get_op_table is term_io and it could just call ops.init_mercury_op_table
> >> directly. It's not clear to me why io.get/set_op_table need to exist.
> >
> > Nor to me. Should we mark them as obsolete? I think so.
>
> Yes, I think they should be marked as obsolete.
Actually, there is no need for that, since these predicates
were exported, but were not publically documented.
The attached diff does all of the above. I intend to commit it
around lunchtime.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.oprev4
Type: application/octet-stream
Size: 1082 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20221112/1a7fd6ab/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.oprev4
Type: application/octet-stream
Size: 30910 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20221112/1a7fd6ab/attachment-0003.obj>
More information about the reviews
mailing list