[m-dev.] Existentially quantified data constructors

Mark Brown mark at csse.unimelb.edu.au
Tue Apr 15 23:23:23 AEST 2008


On 15-Apr-2008, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> Mark Brown, Tuesday, 15 April 2008:
> > On 15-Apr-2008, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> > > Julien Fischer, Tuesday, 15 April 2008:
> > > > Presumably you are looking for a more enlightening answer than: it's not
> > > > valid Mercury?
> > > 
> > > I did manage to infer that from the error message...
> > 
> > It surprises me how often that doesn't happen.  :-(
> 
> Not with type classes.  We do find genuine compiler bugs in there from time
> to time.  Worse, it's very hard to understand *why* some apparently
> reasonable things are forbidden.

The fact that you are required to use `=>' rather than `<=' is meant to
be a hint that you are specifying one kind of constraint over another.
Perhaps it isn't strong enough, but the error message *does* try to draw
your attention to this.  It's also covered in section 11.2 of the reference
manual.

Cheers,
Mark.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list