[m-dev.] :- mode foo == ... (was for review: tuples [1])

Tyson Dowd trd at cs.mu.OZ.AU
Thu Aug 3 15:11:09 AEST 2000


On 02-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 01-Aug-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> > Also, another vote for the rationalisation of the equality/definition
> > symbols.  Would it be possible to just add == as an alternative to ::
> > for mode definitions - or is this already the case?  I seem to recall
> > Fergus saying something to the effect.
> 
> Yes, the compiler already allows "==" as an alternative to "::".

I have a change that also allows >> as an alternative to -> in mode
definitions.  It's very small and very simple.

:- mode foo == oldinst >> newinst.

Seems to work just fine.

I'm willing to change the documentation and so on to say that == and >>
are the "correct" operators to use here.  :: and -> will continue to be
accepted, since they don't cause any problems for the compiler (although
using :: in this situation might confuse users).  Eventually we may want
to deprecate :: and -> in mode definitions.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list