[m-users.] Suggestion: hash_table should use a hash function instead of a hash predicate

Mark Brown mark at mercurylang.org
Wed Sep 30 14:00:47 AEST 2020

Hi all,

Does using a combined higher-order type and inst help here, instead of
switching to a function? Then the inst for hash tables would just be
unique (or ground, with the current workaround for the lack of nested
uniqueness), and code that sensibly uses the current interface should
keep working.

Speaking of the lack of nested uniqueness, maybe version_hash_table is
a better choice for a recursive data structure? It does not require


On Wed, Sep 30, 2020 at 12:53 PM Zoltan Somogyi
<zoltan.somogyi at runbox.com> wrote:
> 2020-09-29 20:28 GMT+10:00 "Ted Stock" <testock at gmail.com>:
> > I think the fix would be small: switching the module to use hash_func, and adding
> > hash functions for the various types that currently include a hash predicate.
> Yes, the switch to hash functions is a good idea, and implementing it
> is simple. However, the change would break existing code. We would
> need to add code to the compiler to tell users why their code broke,
> and how to fix it.
> I will look into doing that in the next few weeks, once I am done
> working on some current projects.
> Zoltan.
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/users

More information about the users mailing list