[m-rev.] for review: proposed changes to term module

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Apr 18 10:34:51 AEST 2017



On Tue, 18 Apr 2017 09:04:37 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> 1. Zoltan, I believe you have some non-committed changes to
> compiler/fact_table.m.  There will almost certainly be conflicts with the full
> version of this change, so could you please let me know what you want to do
> here.
>

Don't worry about it; such conflicts are easy to resolve by

- saving a copy of the file,
- git pull,
- moving the saved copy back over the updated file,
- fixing the errors reported by the compiler.

The problems come with diffs for which the fourth step isn't trivial.

> 2. The compiler currently accepts non-decimal integer literals in some
> odd places, for example when specifying a symname and arity, for example
> 
>      :- pragma obsolete(foo/0x4).
> 
> My current version of this change will cause it to reject non-decimal
> integers in such places; does anyone want to preserve this behaviour?

In arity specifications in pragmas: no, I don't think we need to preserve
this behavior. For other situations, it may depend on the situation.
Are there any where using non-decimal numbers would actually
make sense? Outside clauses, I can't think of any, but you are the one
who has just looked at all the affected places, not me.

> +:- type integer_size
> +    --->    size_word.
> +    %;       size_8bit
> +    %;       size_16bit
> +    %;       size_32bit
> +    %;       size_64bit
> +

I would make these size_8_bit, size_16_bit etc. That should be
doable with four invocations of the attached script (just in case
you haven't written one for yourself ages ago).

The definitions are otherwise fine; post the full diff.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gres
Type: application/octet-stream
Size: 306 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20170418/738d4f81/attachment.obj>


More information about the reviews mailing list