[m-dev.] Re: diff: report errors for missing type decls in interface

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 16 19:21:46 AEST 2000


On 16-Aug-2000, Fergus Henderson <fjh at cs.mu.oz.au> wrote:
> On 16-Sep-2000, Fergus Henderson <fjh at cs.mu.oz.au> wrote:
> > 
> > Fix a bug where the compiler was not reporting errors for some invalid code.
> > 
> > compiler/make_hlds.m:
> > 	Fix a bug: in the code for handling predicates which have
> > 	mode declarations (or clauses, etc.) but no pred/func
> > 	declaration, if --infer-types is enabled, make sure that
> > 	we still report errors for exported predicates and for
> > 	type class methods.  This required passing down a bool
> > 	`IsTypeClassMethod' argument in a number of places.
> 
> I forgot to see if that change would affect any of the other .err_exp
> files in tests/invalid.  It turns out that I need to make the following
> additional change.
> 
> ----------
> 
> tests/invalid/any_mode.err_exp:
> 	Update the expected output for this change to reflect
> 	the additional errors output as a result of my recent change.
> 	The change in question was the one compiler/make_hlds.m to
> 	make it report errors for missing type declarations on
> 	exported predicates even if --infer-types is enabled.

Oops, forgot to attach the diff to that email.  Here it is:

Index: any_mode.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/any_mode.err_exp,v
retrieving revision 1.3
diff -u -d -u -r1.3 any_mode.err_exp
--- any_mode.err_exp	1998/12/07 00:50:35	1.3
+++ any_mode.err_exp	2000/08/16 09:09:02
@@ -1,5 +1,9 @@
+any_mode.m:005: Error: mode declaration for predicate `any_mode:p/1'
+any_mode.m:005:   without preceding `pred' declaration.
 any_mode.m:005: Error: no determinism declaration for exported
 any_mode.m:005:   predicate `any_mode:p/1'.
+any_mode.m:008: Error: mode declaration for predicate `any_mode:q/1'
+any_mode.m:008:   without preceding `pred' declaration.
 any_mode.m:008: Error: no determinism declaration for exported
 any_mode.m:008:   predicate `any_mode:q/1'.
 any_mode.m:006: Warning: clause in module interface.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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