[m-dev.] Existentially quantified data constructors

Ralph Becket rafe at csse.unimelb.edu.au
Tue Apr 15 17:33:26 AEST 2008


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 usual answer is "go, read this
paper", but that (a) takes a non-trivial amount of time and (b) tends to
have the mental residency time of a few hours (unless you're one of the
people developing the code for the type checker...).  In the vernacular
of the tree-huggers, it's not a sustainable explanatory method.

The reference manual is pretty clear about saying what you are allowed
to do with type classes most of the time.  It does not make it clear why
that is *all* you are allowed to do.  Surely these things can be
explained without having to grok the entire type (and type class)
checking algorithm?

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