[m-rev.] for review: Improve warnings generated by --warn-non-tail-recursive

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Oct 30 14:08:53 AEDT 2015



On Thu, 29 Oct 2015 16:31:09 +1100, Paul Bone <paul at bone.id.au> wrote:
>      % The `at_tail' type indicates whether or not a subgoal is at a tail
>      % position, i.e. is followed by a return statement or the end of the
>      % function, and if so, specifies the return values (if any) in the return
>      % statement.
> -:- type at_tail == maybe(list(mlds_rval)).
> +:- type at_tail
> +    --->        yes(list(mlds_rval))
> +    ;           no(seen_reccall).

It is a bad idea to intentionally create more ambiguities. Rename yes and no
to e.g. at_tail and not_at_tail.

I can't judge the rest of the diff without seeing the code in context,
so go ahead and commit the diff after making the change above;
I will look at it post commit.

Zoltan.




More information about the reviews mailing list