[m-dev.] [reuse] diff: minor change -- rename some constructors

Nancy Mazur Nancy.Mazur at cs.kuleuven.ac.be
Wed Feb 7 21:35:56 AEDT 2001


Hi,


===================================================================


Estimated hours taken: 0.2

Change of the name of some functors so as to be more understandable. 

pa_alias.m:
	For computing the alternating closure there was the notion
	of a single/1 of compressed/1 path. The names undirected/1
	and directed/1 make much more sense.


Index: pa_alias.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_alias.m,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 pa_alias.m
--- pa_alias.m	2001/02/07 10:19:08	1.1.2.3
+++ pa_alias.m	2001/02/07 10:33:45
@@ -533,16 +533,16 @@
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
 
-:- type altclos_path ---> single(alias)		% can be rotated
-			; compressed(alias).	% fixed order: shortcut of
+:- type altclos_path ---> undirected(alias)	% can be rotated
+			; directed(alias).	% fixed order: shortcut of
 						% path(alias, ... , alias)
 
 :- pred alias_to_altclos_path(alias::in, altclos_path::out) is det.
-alias_to_altclos_path(Alias, single(Alias)). 
+alias_to_altclos_path(Alias, undirected(Alias)). 
 
 :- pred altclos_path_to_alias(altclos_path::in, alias::out) is det.
-altclos_path_to_alias( single(Alias), Alias ).
-altclos_path_to_alias( compressed(Alias), Alias ). 
+altclos_path_to_alias( undirected(Alias), Alias ).
+altclos_path_to_alias( directed(Alias), Alias ). 
 
 %-----------------------------------------------------------------------------%
 
@@ -612,7 +612,7 @@
 		altclos_path::out) is semidet.
 single_altclos_path( StartPath, EndAlias, NewPath) :- 
 	(
-		StartPath = single(StartAlias)
+		StartPath = undirected(StartAlias)
 	-> 
 		( 
 			single_directed_altclos_path_verify(StartAlias,
@@ -625,7 +625,7 @@
 				EndAlias, NewPath)
 		)
 	;
-		StartPath = compressed(StartAlias),
+		StartPath = directed(StartAlias),
 		single_directed_altclos_path_verify(StartAlias, 
 			EndAlias, NewPath)
 	).
@@ -670,7 +670,7 @@
 		% to be termshifted:
 		pa_datastruct__termshift(StartDatastructure1, Ext, 
 				NewStartDatastructure1),
-		NewPath = compressed( NewStartDatastructure1 -  
+		NewPath = directed( NewStartDatastructure1 -  
 				EndDatastructure2 )
 	;
 		% or StartSelector <= EndSelector
@@ -680,7 +680,7 @@
 		% be termshifted:
 		pa_datastruct__termshift(EndDatastructure2, Ext, 
 				NewEndDatastructure2), 
-		NewPath = compressed(StartDatastructure1 - NewEndDatastructure2)
+		NewPath = directed(StartDatastructure1 - NewEndDatastructure2)
 	;
 		fail
 	).

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list