[m-rev.] for review: fix compiler abort with invalid instance
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Nov 14 15:00:49 AEDT 2007
On Mon, 12 Nov 2007, Julien Fischer wrote:
> Estimated hours taken: 1
> Branches: main
>
> Fix a bug (#27) reported by Ralph. The compiler was aborting on instances
> that contained type variables that were not wrapped in functors.
> The problem is that the name mangling scheme used to mangle the names of
> method wrapper predicates cannot handle instances that contain unwrapped
> type variables. The compiler already has code to check for this, but that
> check was not being performed until *after* it had attempted to introduce
> the method wrapper predicates.
>
> The fix is to reorder the phases of check_typeclass.m so that we perform
> the check on the types in an instance first and only run the remaining
> phases if the first one succeeds.
>
> compiler/check_typeclass.m:
> Reorder the phases within this module so that we don't attempt
> to introduce method wrapper predicates for invalid instances.
>
> Update the documentation in this module to conform to the above
> change.
>
> Remove some unnecessary module qualification.
>
> tests/invalid/Mercury.options:
> tests/invalid/Mmakefile:
> tests/invalid/instance_var_bug.{m,err_exp}:
> Test for the above bug.
I have committed this one.
Julien.
--------------------------------------------------------------------------
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