[m-rev.] diff: mlds.m: improve docs for box/unbox

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Aug 3 03:39:39 AEST 2001


Estimated hours taken: 0.25
Branches: main

compiler/mlds.m:
	Improve the documentation of the box and unbox operators.

Workspace: /mnt/venus/home/venus/fjh/ws-venus4/mercury
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.65
diff -u -d -r1.65 mlds.m
--- compiler/mlds.m	2001/07/20 14:13:57	1.65
+++ compiler/mlds.m	2001/08/02 17:38:04
@@ -1323,8 +1323,18 @@
 		% per_instance flag set).
 
 :- type mlds__unary_op
-	--->	box(mlds__type)
+			% box(MLDSType)
+			% convert from MLDSType to mlds__generic_type,
+			% by boxing if necessary, or just casting if not
+	--->	box(mlds__type)	
+
+			% unbox(MLDSType)
+			% convert from mlds__generic_type to MLDSType,
+			% applying the inverse transformation to box/1,
+			% i.e. unboxing if boxing was necessary,
+			% and just casting otherwise.
 	;	unbox(mlds__type)
+		
 			% cast(MLDSType):
 			% Coerce the type of the rval to be MLDSType.
 			% XXX it might be worthwhile adding the 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list