[m-rev.] for review: Define behaviour of string.to_char_list (and rev) on ill-formed sequences.

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Oct 23 05:04:20 AEDT 2019



On Tue, 22 Oct 2019 10:52:47 +1100, Peter Wang <novalazy at gmail.com> wrote:
> > The warning for calls to obsolete predicates is done by code in simplify_goal_call.m
> > that has access to the mode of the call. There is no reason why the obsolete pragma
> > can't be extended to allow the specification of a mode. At the moment, its first arg
> > must have the form predname/arity, but the compiler already has code to parse
> > terms of the form predname(modelist), which is used by e.g. pragma foreign_export.
> > We could extend obsolete pragmas to allow this form as well, and if used, we would
> > generate the obsolete warning only in the nominated mode.
> > 
> > If you want, I can implement this in a day or two.
> 
> Thanks, that would be useful for my proposed course of action.
> Most likely the feature would see little use other than this instance,
> but I think it's worth adding if the code is mostly there already.

This diff implements my proposal, and is for post commit review by Peter.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.op
Type: application/octet-stream
Size: 3382 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20191023/e4999083/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.op
Type: application/octet-stream
Size: 128166 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20191023/e4999083/attachment-0003.obj>


More information about the reviews mailing list