[m-rev.] diff: bug #241

Julien Fischer juliensf at csse.unimelb.edu.au
Sun Dec 4 00:34:54 AEDT 2011


Branches: main, 11.07

Fix bug #241: a typo was preventing require_semidet scopes from being
recognised.

compiler/prog_io.m;
 	Fix a typo: s/require_semi/require_semidet/

tests/valid/Mmakefile:
tests/valid/require_bug.m:
 	Add a test the above.

Julien.

Index: compiler/prog_io_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_goal.m,v
retrieving revision 1.66
diff -u -r1.66 prog_io_goal.m
--- compiler/prog_io_goal.m	20 Sep 2011 07:17:50 -0000	1.66
+++ compiler/prog_io_goal.m	3 Dec 2011 08:02:13 -0000
@@ -568,7 +568,7 @@
              Functor = "require_det",
              Detism = detism_det
          ;
-            Functor = "require_semi",
+            Functor = "require_semidet",
              Detism = detism_semi
          ;
              Functor = "require_multi",
Index: tests/valid/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/valid/Mmakefile,v
retrieving revision 1.249
diff -u -r1.249 Mmakefile
--- tests/valid/Mmakefile	23 Nov 2011 07:35:07 -0000	1.249
+++ tests/valid/Mmakefile	3 Dec 2011 12:29:22 -0000
@@ -217,6 +217,7 @@
  	record_syntax_bug_5 \
  	recursive_no_tag_type \
  	reg_bug \
+	require_bug \
  	same_length_2 \
  	semidet_disj \
  	shape_type \
Index: tests/valid/require_bug.m
===================================================================
RCS file: tests/valid/require_bug.m
diff -N tests/valid/require_bug.m
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/valid/require_bug.m	3 Dec 2011 12:28:53 -0000
@@ -0,0 +1,16 @@
+% rotd-2011-12-03 nad before didn't recongise the require_semidet
+% scope.
+
+:- module require_bug.
+:- interface.
+
+:- pred foo(int::out, int::out) is failure.
+
+:- implementation.
+
+foo(Y, Z) :-
+	require_det true,
+	require_semidet semidet_succeed,
+	require_multi (Y = 1; Y = 2),
+	require_nondet ((Z = 1; Z = 2), semidet_succeed),
+	require_failure false.

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list