[m-rev.] for post-commit review: fix recompute_instmap_delta of generic calls

Zoltan Somogyi zs at csse.unimelb.edu.au
Fri Aug 29 14:42:24 AEST 2008


On 28-Aug-2008, Peter Wang <novalazy at gmail.com> wrote:
> +:- module instmap_generic_failure.
> +:- interface.
> +
> +:- import_module list.
> +
> +:- pred int_to_ascii(pred(int, int), int, list(int), list(int)).
> +:- mode int_to_ascii(in(pred(in, out) is failure), in, in, out) is semidet.
> +
> +:- implementation.
> +
> +:- import_module int.
> +
> +int_to_ascii(ConvertNonAscii, U, Old, New) :-
> +    ( U < 128 ->
> +        New = [U | Old]
> +    ;
> +        ConvertNonAscii(U, S),  % failure
> +        New = [S | Old]
> +    ).

The diff to the compiler looks good, but to me this test case looks like
it could pass even BEFORE the fix is applied. Are you sure it fails
with an old compiler? An executable test case with an output would be
better.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list