[m-rev.] diff: throw error on comparison or unification of foreign type

Peter Ross peter.ross at miscrit.be
Wed Feb 13 18:08:57 AEDT 2002


zs wrote:
> On 12-Feb-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> > +nyi_foreign_type_unify(_, _) :-
> > + ( semidet_succeed ->
> > + sorry("unify for foreign types")
> > + ;
> > + semidet_succeed
> > + ).
> > +
> > +nyi_foreign_type_compare(Result, _, _) :-
> > + ( semidet_succeed ->
> > + sorry("compare for foreign types")
> > + ;
> > + Result = (=)
> >  ).
>
> You need to use semidet_succeed for the unify, but compare is det,
> so you can delete the semidet_succeed.
>
> Apart from that, this is fine.
>
I implemented it this way to avoid a warning about the inferred determinism
being more lax than the declared determinism.

--------------------------------------------------------------------------
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