[m-rev.] for review: fix mantis bug #43

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Mar 5 14:43:38 AEDT 2008


On Wed, 5 Mar 2008, Peter Wang wrote:

> Branches: main
>
> Fix Mantis bug #43.  The compiler was aborting when making an `.opt' file when
> `--intermod-unused-args' was enabled for the following test case.  The problem
> was that polymorphism wasn't adding all type variables in typeclass
> constraints into the procedure's type_info varmap.
>
> It also revealed a problem where we were writing out unused args pragmas for
> type specialised procedures.  The compiler aborts when reading them back in,
> as for other analyses.
>
> compiler/polymorphism.m:
> 	In `record_constraint_type_info_locns', when working out which type
> 	variables we haven't seen before, we only checked type variables which
> 	appear directly in a constraint, e.g. `tc(T)'.  We also need to check
> 	variables which appear in type constructors, e.g. `tc(tt(T))'.
>
> compiler/unused_args.m:
> 	Don't write out unused args pragmas for type specialised procedures.
>
> 	Convert some lambdas into predicates.
>
> tests/valid/Mercury.options:
> tests/valid/Mmakefile:
> tests/valid/intermod_ua_type_spec.m:
> 	Add test case.

That looks fine.

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