[m-rev.] for review: where safe_equality is ...
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue May 13 11:48:06 AEST 2003
On 13-May-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 13-May-2003, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > I don't understand the rationale for this change.
> > If the hand-defined types are being replaced with foreign types,
> > it should be impossible to write a unification which examines
> > their representation, so no unifications of values of those
> > types should be required to be in committed choice contexts.
> >
> > Could you give an example of a type for which `safe_equality'
> > would be necessary?
>
> The thing that prompted me to do this change is that I changed type_desc
> and type_ctor_desc in type_desc.m to foreign types. I then got a bunch of
> errors in std_util, which contains
>
> :- type type_desc == type_desc__type_desc.
> :- type type_ctor_desc == type_desc__type_ctor_desc.
>
> The automatically created unify preds for these types got errors
> because the calls to the unify preds of the underlying types weren't
> in committed choice contexts.
That sounds like a bug. It shouldn't report an error for that.
The (in, in) mode of unification has determinism `semidet',
not `cc_multi', and so it should be fine to call it from a non-cc context.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list