[mercury-users] Sneaky pseudo-buglet with typeclasses.

Peter Schachte schachte at cs.mu.OZ.AU
Wed Nov 3 12:07:42 AEDT 1999


> On 01-Nov-1999, Ralph Becket <rbeck at microsoft.com> wrote:
> ...
> > 	:- instance foo(bar) where [
> >         pred (new/1) is bar_new
> > 	].
> ...
> > singlearg.m:015: Error: expected `pred(<Name> / <Arity>) is <InstanceName>':
> > pred new / 1 is bar_new.
> ...
> > The cause of this hard-to-spot error is that I've accidentally inserted a
> > space between `pred' and the `(new/1)' in the instance declaration.

On Tue, Nov 02, 1999 at 03:01:34PM +1100, Fergus Henderson wrote:
> It would also be helpful if you could suggest what kind of message
> you would like to see from the compiler for this sort of thing.

How about supporting this syntax as a synonym for the correct one?  I
understand that the precedence of pred makes this a RRPITA to
implement, but from the user's perspective, it would be a great
kindness.  And similarly for func, of course.


-- 
Peter Schachte                     A closed mouth gathers no foot. 
mailto:schachte at cs.mu.OZ.AU        
http://www.cs.mu.oz.au/~schachte/  
PGP: finger schachte at 128.250.37.3  
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list