[m-rev.] trivial diff: document type variable name conventions

Mark Brown dougl at cs.mu.OZ.AU
Thu Apr 25 03:43:00 AEST 2002


Estimated hours taken: 0.1
Branches: main

browser/declarative_analyser.m:
	Document the type variable naming conventions for mercury_edt.

browser/declarative_execution.m:
	Document the type variable naming conventions for annotated_trace.

browser/declarative_debugger.m:
	Document the type edt_node/1.

Index: browser/declarative_analyser.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_analyser.m,v
retrieving revision 1.9
diff -u -r1.9 declarative_analyser.m
--- browser/declarative_analyser.m	23 Apr 2002 08:52:33 -0000	1.9
+++ browser/declarative_analyser.m	24 Apr 2002 17:36:23 -0000
@@ -22,6 +22,18 @@
 	% node is represented implicitly.  In this case, the analyser
 	% must request that it be made explicit before continuing.
 	%
+	% The first argument is intuitively a "store", which maps
+	% references to the things they reference.  The second argument
+	% is the type of trees themselves.  By convention, we use the
+	% names S and T for type variables which are constrained by
+	% mercury_edt.
+	%
+	% By convention, we also use the names S and T in type declarations
+	% where it is *intended* that the type variables be constrained by
+	% mercury_edt.
+	%
+	% (Compare with the similar conventions for annotated_trace/2.)
+	%
 :- typeclass mercury_edt(S, T) where [
 		
 		% Gives the root node of an EDT.
Index: browser/declarative_debugger.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_debugger.m,v
retrieving revision 1.24
diff -u -r1.24 declarative_debugger.m
--- browser/declarative_debugger.m	23 Apr 2002 08:52:33 -0000	1.24
+++ browser/declarative_debugger.m	24 Apr 2002 17:36:34 -0000
@@ -347,6 +347,12 @@
 	% any instance of execution tree.
 	%
 
+	% The type of nodes in our implementation of EDTs.  The parameter
+	% is meant to be the type of references to trace nodes.  In
+	% particular, the references should be to trace nodes that could
+	% be considered nodes in the EDT, namely those for exit, fail
+	% and exception events.
+	% 
 :- type edt_node(R)
 	--->	dynamic(R).
 
Index: browser/declarative_execution.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.17
diff -u -r1.17 declarative_execution.m
--- browser/declarative_execution.m	23 Apr 2002 08:52:33 -0000	1.17
+++ browser/declarative_execution.m	24 Apr 2002 17:36:34 -0000
@@ -189,10 +189,17 @@
 :- type event_number == int.
 
 	% Members of this typeclass represent an entire annotated
-	% trace.  The second parameter is the type of identifiers
-	% for trace nodes, and the first parameter is the type of
-	% an abstract mapping from identifiers to the nodes they
-	% identify.
+	% trace.  The second parameter is the type of references
+	% to trace nodes, and the first parameter is the type of
+	% a "store": an abstract mapping from references to the
+	% nodes they refer to.
+	%
+	% By convention, we use the names S and R for type variables
+	% which are constrained by annotated_trace.  We also use
+	% these names in type declarations where it is *intended* that
+	% the type variables be constrained by annotated_trace.
+	%
+	% (Compare with the similar conventions for mercury_edt/2.)
 	%
 :- typeclass annotated_trace(S, R) where [
 
--------------------------------------------------------------------------
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