[m-rev.] for review: improve check for invalid invalid declarations

Mark Brown mark at csse.unimelb.edu.au
Fri Sep 28 18:32:28 AEST 2007


On 28-Sep-2007, Peter Ross <pro at missioncriticalit.com> wrote:
> On 9/28/07, Mark Brown <mark at csse.unimelb.edu.au> wrote:
> > On 28-Sep-2007, Peter Ross <pro at missioncriticalit.com> wrote:
> > >
> > > For juliensf or pwa to review.
> > >
> > > ===================================================================
> > >
> > >
> > > Estimated hours taken: 4
> > > Branches: main
> > >
> > > Improve check for invalid instance declarations.
> > >
> > > compiler/check_typeclass.m:
> > >       Check that each type in the instance declaration is a type with
> > >       no arguments of a polymorphic type whose arguments are all distinct
> > >       type variables.
> >
> > Hmm, there is already code to check this in parse_underived_instance_2
> > in prog_io_typeclass.m.  I'm a bit puzzled why it apparently isn't working.
> > Any clue?
> >
> because at that point it doesn't know anything about equivalence types.

Ah, right.  I knew its error messages weren't that good, but I didn't
know it was also missing some cases.  You should remove the check during
parsing, and update any further test cases.

> 
> > In any case, putting the check in the front end pass is a good idea, and
> > is better than checking during parsing, IMHO.

Cheers,
Mark.

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



More information about the reviews mailing list