[m-dev.] for review: allow clauses in instance declarations

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 8 13:16:40 AEDT 2000


On 08-Sep-2000, David Glen Jeffery <dgj at students.cs.mu.oz.au> wrote:
> 
> Looks great. Just one question:
> 
> > +:- instance foo(int) where [
> > +	% method defined by naming the implementation
> > +	func(method1/1) is (+),
> > +
> > +	% method defined by a fact
> > +	method2(X) = X + 1,
> 
> The brackets are deliberately left off here?

Yes.

The point is that you don't need to use parentheses for facts
(although you certain can do so if you want to).

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