[m-rev.] for review: make many integer casts into builtins

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun May 27 07:30:01 AEST 2018



On Fri, 25 May 2018 11:37:33 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> No objections, but a couple of comments.
> 
> s/won't/will not/ in a spot.
> 
> I think the function that return the limits of the type (min_int64 and
> max_int64) should live in their own section and not be grouped together
> with the comparison predicates.

OK, done for both.

Here is the diff to all eight modules, for post-commit review by Julien.

I left the to_int functions as they were, but I propose that the non-cast
conversion functionality, i.e. the version that for may fail for *some*
of these eight types, be predicates for all eight types, being semidet when
they can fail and det when they cannot. That would also make it easier
to change one of these types for another.

I also propose that we should move all the predicates that convert
to doc from these modules to pretty_printer.m once the existence of these
modules is officially announced.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.ints
Type: application/octet-stream
Size: 797 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180526/491262e8/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.ints
Type: application/octet-stream
Size: 122096 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180526/491262e8/attachment-0003.obj>


More information about the reviews mailing list