[m-dev.] trivial diff: define `int:is/2' in Mercury

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 22 22:50:08 AEDT 1999


On 22-Mar-1999, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> On Mon, Mar 22, 1999 at 02:28:05PM +1100, Simon Taylor wrote:
> > > > library/int.m:
> > > > 	Define `int:is/2' in Mercury.
> > > Shouldn't you do the same for float:is/2?
> > 
> > There's no such predicate.
> 
> Hmmmmm.  That's odd.
> 
> > It could be argued that `int:is/2' should be made obsolete
> > and removed in a later release.
> 
> Yup, I think that's a good idea.  I can't think of any reason to
> maintain it, and it does seem rather a shame to take such a nice
> name/arity from users.

The reason for maintaining it is to make it easier to convert
Prolog programs to Mercury.

Ideally it ought to be defined in prolog.m rather than int.m.
But unfortunately there isn't any simple way of moving a predicate
from one module to another module in a backwards-compatible way;
`pragma obsolete' isn't quite enough in this case.

In the long run I would like to see some mechanism for moving
a predicate from one module to another module in a backwards
compatible way without requiring users to add explicit module
qualifiers to avoid ambiguity between the old and the new
versions.  Until we have that, I think `int:is/2' should stay
as is.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list