[m-rev.] diff:

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri May 16 19:44:01 AEST 2003


compiler/mlds.m:
	Allow array/1 to be a foreign type by testing for its name *after*
	testing for foreign types.

Zoltan.

cvs diff: Diffing .
Index: mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.100
diff -u -b -r1.100 mlds.m
--- mlds.m	9 May 2003 00:45:06 -0000	1.100
+++ mlds.m	16 May 2003 05:56:11 -0000
@@ -1687,12 +1687,6 @@
 
 mercury_type_to_mlds_type(ModuleInfo, Type) = MLDSType :-
 	( 
-		type_to_ctor_and_args(Type, TypeCtor, [ElemType]),
-		TypeCtor = qualified(unqualified("array"), "array") - 1
-	->
-		MLDSElemType = mercury_type_to_mlds_type(ModuleInfo, ElemType),
-		MLDSType = mlds__mercury_array_type(MLDSElemType)
-	;
 		type_to_ctor_and_args(Type, TypeCtor, _),
 		module_info_types(ModuleInfo, Types),
 		map__search(Types, TypeCtor, TypeDefn),
@@ -1740,6 +1734,12 @@
 			)
 		),
 		MLDSType = mlds__foreign_type(ForeignType)
+	;
+		type_to_ctor_and_args(Type, TypeCtor, [ElemType]),
+		TypeCtor = qualified(unqualified("array"), "array") - 1
+	->
+		MLDSElemType = mercury_type_to_mlds_type(ModuleInfo, ElemType),
+		MLDSType = mlds__mercury_array_type(MLDSElemType)
 	;
 		classify_type(Type, ModuleInfo, Category),
 		ExportedType = to_exported_type(ModuleInfo, Type),
cvs diff: Diffing notes
--------------------------------------------------------------------------
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