Address review comments of fjh about my change to generate type_ctor and

Estimated hours taken: 1.5
Branches: main

Address review comments of fjh about my change to generate type_ctor and
special preds for the builtin types which don't have an abstract type
declaration.

compiler/make_hlds.m:
	Change parse_tree_to_hlds to use the state variable syntax.

compiler/type_util.m:
	s/builtin_type_ctors/builtin_type_ctors_with_no_type_defn/
	which better reflects which type ctors this function returns.

compiler/type_ctor_info.m:
	Improve the documentation of how the code determines whether
	or not a type_ctor_info needs to be generated.

compiler/typecheck.m:
	Use builtin_type_ctors_with_no_type_defn and make the documentation
	more explicit.
This commit is contained in:
Peter Ross
2003-11-21 15:21:37 +00:00
parent 22e4692ac5
commit 368eaf2d11
4 changed files with 47 additions and 35 deletions

View File

@@ -69,8 +69,10 @@
:- pred type_ctor_is_tuple(type_ctor).
:- mode type_ctor_is_tuple(in) is semidet.
% The list of type_ctors which are builtins.
:- func builtin_type_ctors = list(type_ctor).
% The list of type_ctors which are builtins which do not have a
% hlds_type_defn, ie. those builtin type which are not declared as
% abstract types in the standard library.
:- func builtin_type_ctors_with_no_type_defn = list(type_ctor).
% Succeed iff there was either a `where equality is <predname>' or a
% `where comparison is <predname>' declaration for the principal type
@@ -2060,7 +2062,7 @@ cell_type_name(typeclass_info_cell) = "typeclass_info".
%-----------------------------------------------------------------------------%
builtin_type_ctors =
builtin_type_ctors_with_no_type_defn =
[ qualified(mercury_public_builtin_module, "int") - 0,
qualified(mercury_public_builtin_module, "string") - 0,
qualified(mercury_public_builtin_module, "character") - 0,