[m-rev.] diff: use uint literals in library and compiler

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Jun 12 04:45:22 AEST 2017



On Mon, 12 Jun 2017 00:18:34 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> configure.ac:
>       Require that the bootstrap compiler support uint literals.

> --- a/configure.ac
> +++ b/configure.ac
> @@ -406,7 +406,10 @@ then
>           :- type bear ---> brown ; black ; teddy.-        :- pred my_uint_xor(uint::in, uint::out) is det.
+        :- pred my_uint_xor(uint::in, uint::in) is semidet.

>           :- pragma foreign_export_enum("Java", bear/0).
> 
> -        :- type my_uint ---> my_uint(uint).
> +        :- pred my_uint_xor(uint::in, uint::out) is det.
> +
> +        my_uint_xor(A, B) :-
> +            561u = uint.xor(A, B).

This requires the bootstrap compiler not just to support uint literals,
but also the reverse modes of uint.xor. I installed a compiler just *before*
the diff that uncommented those modes, so my installed compiler does
not have them. If anyone else is in my shoes, apply this diff temporarily:

-        :- pred my_uint_xor(uint::in, uint::out) is det.
+        :- pred my_uint_xor(uint::in, uint::in) is semidet.

Zoltan.


More information about the reviews mailing list