[m-dev.] for review: fix for spurious mode errors
Thomas Charles CONWAY
conway at cs.mu.OZ.AU
Thu Oct 29 10:24:26 AEDT 1998
Fergus Henderson, you write:
> On 02-Oct-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 21-Apr-1998, Thomas Charles CONWAY <conway at hydra.cs.mu.oz.au> wrote:
> > >
> > > The following module reports a mode error in main when you try to compile it.
> > > It also has an undefined predicate foobie called from foldit.
> > > If you fix the undefined predicate error in foldit, the mode error in main
> > > goes away.
> >
> > After much debugging, I have figured out the cause of this error.
> > Basically what happens is that since foldit has a type error,
> > typecheck.m deletes it from the list of predicates.
> > This means that purity.m does not call post_typecheck__finish_pred
> > for that predicate, which means that the mode declaration for that
> > predicate does not get module-qualified. This then leads to
> > a spurious mode error in main/2 where it calls foldit.
>
> Here's the fix. Tom, could you please review this one?
>
This looks fine, thanks.
Thomas
--
Thomas Conway <conway at cs.mu.oz.au>
Nail here [] for new monitor. )O+
More information about the developers
mailing list