[m-dev.] cvs diff: Bug fix for layouts

Fergus Henderson fjh at cs.mu.oz.au
Wed Mar 19 16:54:19 AEDT 1997

Tyson Richard DOWD, you wrote:
> However, when I finish the code for `type_of' ...

What does `type_of' do?

I have been using the name `type_of' for the following function:

	:- type (type).
		% `type' is another name for `type_info(T)'.
		% ... some low-level magic to implement unification (etc.)
		% of values of type `type' omitted ...

		% type_of(X) = T iff T is the type of X.
	:- func type_of(T::unused) = ((type)::out) is det.
	:- pragma c_code(type_of(_X::unused) = (Type::out),
			will_not_call_mercury, "Type = TypeInfo_for_T;").

Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at         |     -- the last words of T. S. Garp.

More information about the developers mailing list