Files
mercury/compiler
David Jeffery c273ecdbcc A re-work of check_typeclass.m. Now, rather than the ad-hoc approach of
Estimated hours taken: 25

A re-work of check_typeclass.m. Now, rather than the ad-hoc approach of
checking each method of each instance declaration for *exact* type and mode
correctness, we generate a new predicate that gets inserted into the HLDS.
This predicate is checked for type, mode, uniqueness and determinism
correctness in the appropriate compiler pass.

As a consequence, the check_typeclass pass now has to come before typecheck.m.
Previously, it was the final semantic analysis pass because it had to use
type, mode, uniqueness and determinism information. The new approach does not
need that information to be available.

This has the following user-visible improvements:
	- constraints on class methods are now checked properly. An
	  instance's implementation of a method may be less constrained.
	  (Previously, these constraints weren't even checked at all. Oops).
	- a method implementation may be more polymorphic than expected
	- implied modes will be used for methods if necessary

This is a much more robust approach (and it co-incides with the typeclass
paper ;-) ).

compiler/check_typeclass.m:
	Introduce the auxiliary predicate for the instance method. As an
	optimisation, do not introduce the predicate if the implementation
	given is an *exact* match (in terms of types, modes and determinism).
compiler/mercury_compile.m:
	Put the check_typeclass pass before typechecking.
compiler/type_util.m:
	Change type_list_matches_exactly to
	type_and_constraint_list_matches_exactly since check_typeclass is
	also responsible for checking constraints on method implementations.
	(This is only used in the optimisation mentioned above).
1998-05-20 17:58:03 +00:00
..
1998-05-15 07:09:29 +00:00
1998-04-08 11:36:13 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-04-08 11:36:13 +00:00
1998-04-08 11:36:13 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-04-08 11:36:13 +00:00
1998-05-15 07:09:29 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-04-08 11:36:13 +00:00
1998-04-27 04:05:12 +00:00
1998-03-03 17:48:14 +00:00
1998-03-24 00:06:59 +00:00
1998-04-27 04:05:12 +00:00
1998-03-03 17:48:14 +00:00
1998-05-15 07:09:29 +00:00
1998-04-27 04:05:12 +00:00
1998-05-15 07:09:29 +00:00
1998-05-15 07:09:29 +00:00
1998-05-15 07:09:29 +00:00
1998-03-24 00:06:59 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-05-15 07:09:29 +00:00
1998-04-08 11:36:13 +00:00
1998-04-27 04:05:12 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-05-15 07:09:29 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-04-27 04:05:12 +00:00
1998-04-27 04:05:12 +00:00
1998-04-27 04:05:12 +00:00
1998-04-27 04:05:12 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-03-05 05:24:47 +00:00
1998-04-27 04:05:12 +00:00
1998-03-03 17:48:14 +00:00
1998-05-15 07:09:29 +00:00
1998-03-03 17:48:14 +00:00
1998-05-15 07:09:29 +00:00
1998-04-08 11:36:13 +00:00
1998-05-15 07:09:29 +00:00
1998-04-08 11:36:13 +00:00
1998-05-15 07:09:29 +00:00
1998-04-08 11:36:13 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-04-27 04:05:12 +00:00
1998-04-27 04:05:12 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00
1998-03-03 17:48:14 +00:00