[m-rev.] for post-commit review: better diagnostic for missing higher order insts

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Jul 27 19:59:46 AEST 2023


On 2023-07-27 03:27 +02:00 CEST, "Peter Wang" <novalazy at gmail.com> wrote:
> On Wed, 26 Jul 2023 20:01:08 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>> I think the footnote should be moved here, since
>> it talks about this construct.
> 
> I left the footnote directly after the example showing how you give
> names to higher order insts and modes. The footnote explains why the
> names do not conflict, and recommends against defining new modes.

That's fair.

> After the example of using higher order mode syntax, we could add a
> slight recommendation against it, e.g.
> 
>     For example,
> 
>         :- mode foldl(in(pred(in, in, out) is det), in, in, out) is det.
> 
>     can also be written as
> 
>         :- mode foldl(pred(in, in, out) is det, in, in, out) is det.
> 
>     but the former may be easier to understand.

I agree that is a good idea. The attached diff adds that last line
(the rest were already there).

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.rm
Type: application/vnd.rn-realmedia
Size: 1833 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20230727/f819d179/attachment.bin>


More information about the reviews mailing list