[m-dev.] trivial diff: fix test case

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jul 26 14:06:50 AEST 2000


On 24-Jul-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Fix a bug reported by Peter Ross <petdr at cs.mu.oz.au>:
> check that type, mode, and determinism of main/2 conform to
> what the Mercury language reference manual requires.

Estimated hours taken: 0.25

Fix a problem where my previous change to report an error if `main'
did not have the right determinism broke one of the test cases.

tests/invalid/mostly_uniq1.m:
tests/invalid/mostly_uniq1.err_exp:
	Rename `main' as `my_main', so that it can have determinism
	`multi'.

Workspace: /home/pgrad/fjh/ws/hg
Index: tests/invalid/mostly_uniq1.err_exp
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/mostly_uniq1.err_exp,v
retrieving revision 1.8
diff -u -d -r1.8 mostly_uniq1.err_exp
--- tests/invalid/mostly_uniq1.err_exp	1997/12/29 05:07:55	1.8
+++ tests/invalid/mostly_uniq1.err_exp	2000/07/26 04:02:38
@@ -1,4 +1,4 @@
-mostly_uniq1.m:018: In clause for `main(di, uo)':
+mostly_uniq1.m:018: In clause for `my_main(di, uo)':
 mostly_uniq1.m:018:   in argument 2 of call to predicate `io:write_int/3':
 mostly_uniq1.m:018:   mode error: variable `DCG_0' has instantiatedness `mostly_unique',
 mostly_uniq1.m:018:   expected instantiatedness was `unique'.
Index: tests/invalid/mostly_uniq1.m
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/mostly_uniq1.m,v
retrieving revision 1.1
diff -u -d -r1.1 mostly_uniq1.m
--- tests/invalid/mostly_uniq1.m	1996/05/14 14:31:16	1.1
+++ tests/invalid/mostly_uniq1.m	2000/07/26 04:02:25
@@ -2,7 +2,7 @@
 :- interface.
 :- import_module io.
 
-:- pred main(io__state::di, io__state::uo) is multi.
+:- pred my_main(io__state::di, io__state::uo) is multi.
 
 :- implementation.
 
@@ -15,4 +15,4 @@
 % only mostly_unique, because p/1 has multiple solutions
 % and we didn't declare main as cc_multi.
 
-main --> { p(X) }, io__write_int(X).
+my_main --> { p(X) }, io__write_int(X).
-- 
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