[m-rev.] For review: State Variables

Ralph Becket rafe at cs.mu.OZ.AU
Thu May 2 16:36:02 AEST 2002


Addendum:

compiler/typecheck.m:
	Added a case to report_error_undef_cons for cases where !X
	appears as the left or right hand side of a unification.

Index: typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.317
diff -u -r1.317 typecheck.m
--- typecheck.m	7 Apr 2002 10:22:51 -0000	1.317
+++ typecheck.m	2 May 2002 06:24:32 -0000
@@ -5859,6 +5859,17 @@
 	; { Functor = cons(unqualified("."), 2) } ->
 		io__write_string(
 		  "  error: the list constructor is now `[|]/2', not `./2'.\n")
+	; { Functor = cons(unqualified("!"), 1) } ->
+		io__write_string(
+		  "  error: invalid use of `!' state variable operator.\n"),
+		globals__io_lookup_bool_option(verbose_errors, VerboseErrors),
+		( { VerboseErrors = yes } ->
+			prog_out__write_context(Context),
+			io__write_string(
+			  "  You probably meant to use `!.' or `!:'.\n")
+		;
+			[]
+		)
 	; { InvalidFieldUpdates = [_ | _] } ->
 		io__write_string(
 			"  error: invalid field update `"),
--------------------------------------------------------------------------
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