[m-rev.] For post-commit review: improve ambiguity reporting

Ralph Becket rafe at cs.mu.OZ.AU
Tue Jun 6 13:26:35 AEST 2006


mercury/compiler/typecheck_errors.m:
	Report full ambiguity information when two symbols with the same name
	and signature are defined in different imported modules.

Index: mercury/compiler/typecheck_errors.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck_errors.m,v
retrieving revision 1.20
diff -u -r1.20 typecheck_errors.m
--- mercury/compiler/typecheck_errors.m	20 Apr 2006 05:37:03 -0000	1.20
+++ mercury/compiler/typecheck_errors.m	6 Jun 2006 03:15:24 -0000
@@ -1202,17 +1202,8 @@
     report_ambiguity_error_2(Vars1, VarSet, Info, TypeAssign1, TypeAssign2,
         no, Found, !IO),
     globals.io_lookup_bool_option(verbose_errors, VerboseErrors, !IO),
-    typecheck_info_get_context(Info, Context),
     ( Found = no ->
-        prog_out.write_context(Context, !IO),
-        io.write_string("  One or more of the predicates or " ++
-            "functions called\n", !IO),
-        prog_out.write_context(Context, !IO),
-        io.write_string("  is declared in more than one module.\n",
-            !IO),
-        prog_out.write_context(Context, !IO),
-        io.write_string("  Try adding explicit module qualifiers.\n",
-            !IO)
+        report_warning_too_much_overloading(Info, !IO)
     ; VerboseErrors = yes ->
         io.write_strings([
 "\tYou will need to add an explicit type qualification to resolve the\n",
--------------------------------------------------------------------------
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