[m-dev.] For review: improve verbose warning about using "call" in an expression
Robert Ernst Johann JESCHOFNIK
rejj at cat.cs.mu.OZ.AU
Wed Dec 8 20:23:47 AEDT 1999
Estimated hours taken: 0.1
compiler/typecheck.m:
Add a comment to the verbose message given as a warning when "call" is seen
in an expression, discussing what to do if the user really did mean to
use "call" (perhaps as a type constructor).
Suggestions are made to check the arity of the "call" they are using, as
well as to ensure that it really is defined.
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury1/repository//mercury/compiler/typecheck.m,v
retrieving revision 1.267
diff -u -r1.267 typecheck.m
--- typecheck.m 1999/11/08 15:00:07 1.267
+++ typecheck.m 1999/12/08 09:09:25
@@ -5169,7 +5169,25 @@
" see the ""Creating higher-order terms"" section of the\n"),
prog_out__write_context(Context),
io__write_string(
- " Mercury Language Reference Manual.\n")
+ " Mercury Language Reference Manual.\n"),
+ prog_out__write_context(Context),
+ io__write_string(
+ " If you really are trying to use `call' as an expression\n"),
+ prog_out__write_context(Context),
+ io__write_string(
+ " and not as an application of the predicate call/N, make\n"),
+ prog_out__write_context(Context),
+ io__write_string(
+ " sure that you have the arity correct, and that the\n"),
+ prog_out__write_context(Context),
+ io__write_string(
+ " functor `call' is actually defined (if it is defined in\n"),
+ prog_out__write_context(Context),
+ io__write_string(
+ " a seperate module, check that the module is correctly\n"),
+ prog_out__write_context(Context),
+ io__write_string(
+ " imported).\n")
;
[]
)
--------------------------------------------------------------------------
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