Rename the types 'type', 'inst' and 'mode' to 'mer_type', 'mer_inst'

Estimated hours taken: 8
Branches: main

compiler/*.m:
	Rename the types 'type', 'inst' and 'mode' to 'mer_type', 'mer_inst'
	and 'mer_mode'. This is to avoid the need to parenthesize these type
	names in some contexts, and to prepare for the possibility of a parser
	that considers those words to be reserved words.

	Rename some other uses of those names (e.g. as item types in
	recompilation.m).

	Delete some redundant synonyms (prog_type, mercury_type) for mer_type.

	Change some type names (e.g. mlds__type) and predicate names (e.g.
	deforest__goal) to make them unique even without module qualification.

	Rename the function symbols (e.g. pure, &) that need to be renamed
	to avoid the need to parenthesize them. Make their replacement names
	more expressive.

	Convert some more modules to four space indentation.

	Avoid excessively long lines, such as those resulting from the
	automatic substitution of 'mer_type' for 'type'.
This commit is contained in:
Zoltan Somogyi
2005-10-24 04:14:34 +00:00
parent 521af06432
commit b2012c0c0e
213 changed files with 16730 additions and 17075 deletions

View File

@@ -313,7 +313,7 @@ neg_rval(Rval, NegRval) :-
( neg_rval_2(Rval, NegRval0) ->
NegRval = NegRval0
;
NegRval = unop(not, Rval)
NegRval = unop(logical_not, Rval)
).
:- pred neg_rval_2(rval::in, rval::out) is semidet.
@@ -326,7 +326,7 @@ neg_rval_2(const(Const), const(NegConst)) :-
Const = false,
NegConst = true
).
neg_rval_2(unop(not, Rval), Rval).
neg_rval_2(unop(logical_not, Rval), Rval).
neg_rval_2(binop(Op, X, Y), binop(NegOp, X, Y)) :-
neg_op(Op, NegOp).
@@ -334,10 +334,10 @@ neg_rval_2(binop(Op, X, Y), binop(NegOp, X, Y)) :-
neg_op(eq, ne).
neg_op(ne, eq).
neg_op(<, >=).
neg_op(<=, >).
neg_op(>, <=).
neg_op(>=, <).
neg_op(int_lt, int_ge).
neg_op(int_le, int_gt).
neg_op(int_gt, int_le).
neg_op(int_ge, int_lt).
neg_op(str_eq, str_ne).
neg_op(str_ne, str_eq).
neg_op(str_lt, str_ge).