[m-rev.] for review: Define equality for version_hash_tables

Zoltan Somogyi zs at unimelb.edu.au
Mon May 27 16:50:37 AEST 2013


On 27-May-2013, Peter Wang <novalazy at gmail.com> wrote:
> I think the changes would be cleaner by (un)wrapping within the heads
> only, e.g.
> 
>     num_occupants(wrap(HT)) = HT ^ ht_num_occupants.
> 
>     copy(wrap(HT0)) = wrap(HT) :- ...
> 
> where
> 
>     :- func wrap(ht_inner(K, V)) = version_hash_table(K, V).
>     :- mode wrap(out) = in is det.
>     :- mode wrap(in) = out is det.

I think wrapping and unwrapping should be done by unifications, not function
calls. Even if the compiler could replace the latter by the former, that
inlining happens at too late a stage of compilation.

Zoltan.



More information about the reviews mailing list