mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 23:05:21 +00:00
A few minor changes, including fixing the syntax of a typeclass declaration.
Estimated hours taken: 1/2
A few minor changes, including fixing the syntax of a typeclass declaration.
The methods inside a typeclass declaration no longer have a ":-" at the start.
compiler/make_hlds.m:
Give an error message is a typeclass is multiply defined.
compiler/prog_io.m:
Export parse_decl, and make the output a maybe_item_and_context so
that it is more useful to prog_io_typeclass.
compiler/prog_io_typeclass.m:
Use parse_decl rather than parse_item to parse the class methods. This
way the ":-" is left off.
compiler/notes/compiler_design.html:
Document why check_typeclass is the final semantic analysis pass.
This commit is contained in:
@@ -313,12 +313,13 @@ in an HLDS goal.
|
||||
check_typeclass.m checks that, each instance declaration, that the
|
||||
types, modes and determinism of each predicate/function that is a
|
||||
method of the class is correct (ie. that it matches the typeclass
|
||||
declaration). In this pass, pred_ids and proc_ids are assigned to
|
||||
the methods for each instance. In addition, while checking that the
|
||||
superclasses of a class are satisfied by the instance declaration, a
|
||||
set of constraint_proofs are built up for the superclass constraints.
|
||||
These are used by polymorphism.m when generating the
|
||||
base_typeclass_info for the instance.
|
||||
declaration). This pass is performed at the end of semantic analysis
|
||||
because it needs mode and determinism information. In this pass,
|
||||
pred_ids and proc_ids are assigned to the methods for each instance. In
|
||||
addition, while checking that the superclasses of a class are satisfied
|
||||
by the instance declaration, a set of constraint_proofs are built up
|
||||
for the superclass constraints. These are used by polymorphism.m when
|
||||
generating the base_typeclass_info for the instance.
|
||||
|
||||
<dt> simplification (simplify.m)
|
||||
|
||||
@@ -792,6 +793,6 @@ Some of them are obsolete; other are work-in-progress.
|
||||
<hr>
|
||||
<!-------------------------->
|
||||
|
||||
Last update was $Date: 1998-01-02 00:11:10 $ by $Author: fjh $@cs.mu.oz.au. <br>
|
||||
Last update was $Date: 1998-01-07 06:09:44 $ by $Author: dgj $@cs.mu.oz.au. <br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user