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

Peter Ross pro at missioncriticalit.com
Fri Sep 28 16:59:33 AEST 2007


On 9/28/07, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> On Fri, 28 Sep 2007, Mark Brown 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?
> >
> > In any case, putting the check in the front end pass is a good idea, and
> > is better than checking during parsing, IMHO.
>
> I pretty sure there is already code to check that the type variables
> are distinct.
>
Not when they are hidden behind equivalence types.
--------------------------------------------------------------------------
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