[m-rev.] diff: fix a bug in collect

Erwan Jahier Erwan.Jahier at irisa.fr
Wed Jul 11 20:57:49 AEST 2001


Estimated hours taken: 0.2
branches: main.


extras/morphine/source/collect.op
	Fix a bug: type declarations such as ":- type collected_type
 	---> ..." are parsed ":- type(--->(collected_type ..." by Prolog, not
	":- type(collected_type ...".

Index: extras/morphine/source/collect.op
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/morphine/source/collect.op,v
retrieving revision 1.8
diff -u -d -u -r1.8 collect.op
--- extras/morphine/source/collect.op	2001/07/05 08:05:32	1.8
+++ extras/morphine/source/collect.op	2001/07/11 10:48:35
@@ -380,9 +380,13 @@
 
 is_collected_type_defined_do(S) :-
 	read_mercury_term(S, Term),
+	term_string(Term, String),
 	(
-	        term_string(Term, String),
-		append_strings(":- type(collected_type", _,  String)
+		append_strings(":- type(--->(collected_type", _,  String),
+		!
+	;
+		append_strings(":- type(collected_type", _,  String),
+		!
 	;
 		Term = end_of_file,
 		!,

-- 
R1.


--------------------------------------------------------------------------
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