[m-rev.] Trivial diff: bugfix for missing solver init preds

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Mar 16 10:23:10 AEDT 2005


On Wed, 16 Mar 2005, Ralph Becket wrote:

> Julien Fischer, Thursday, 10 March 2005:
> >
> > On Wed, 9 Mar 2005, Ralph Becket wrote:
> >
> > > Estimated hours taken: 3
> > > Branches: main, release
> > >
> > > compiler/special_pred.m:
> > > 	Ensure that initialisation special preds are type checked (without
> > > 	this, the compiler will abort during purity checking if the user
> > > 	defines a solver type, but not its initialisation predicate.)
> >
> > This change seems to have broken the CLP(R) interface,
> > extras/trailed_update and tests/warnings/non_term_user_special.
>
> After close inspection, it seems to have revealed a bug in
> non_term_user_special.m!  That file was declaring a solver type foo/1
> and defining a solver type foo/0.  The error message was quite correct.
>
Yes, although oddly I didn't get when I originally wrote that test case.

> I've fixed the test case and improved the compiler so that it won't
> complain about missing equality or comparison predicates for solver
> types if the `where ...' part of the solver type definition doesn't
> specify them.
>
Does that fix the broken stuff in extras as well?

> Estimated hours taken: 16
> Branches: main, release
>
> Fix a test case bug; improve compiler error messages for solver types.
>
> compiler/make_hlds.m:
> 	Minor formatting improvements.
>
> compiler/special_pred.m:
> 	special_pred_for_type_needs_typecheck now also takes a special_pred_id
> 	argument (only special preds using user-supplied code need
> 	typechecking).
>
> compiler/typecheck.m:
> 	Pass the special_pred_id to special_pred_for_type_needs_typecheck.
>
> tests/warnings/non_term_user_special.m:
> tests/warnings/non_term_user_special.exp:
> 	Fix test case and expected output.
>
That looks fine.

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