[m-rev.] for review: fix interactive queries

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jun 12 23:58:05 AEST 2002


On 12-Jun-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 12-Jun-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > 
> > browser/interactive_query.m:
> > 	Name the query source file mdb_query.m rather than query.m
> > 	to reduce the chance of overwriting a user's file.
> 
> The documentation in the user's guide, which mentions query.m,
> should be updated to reflect this change.
> 
> > tests/debugger/interactive.exp:
> > 	Update expected output.
> 
> You need to also update interactive.exp2.

Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.313
diff -u -u -r1.313 user_guide.texi
--- doc/user_guide.texi	30 May 2002 12:55:18 -0000	1.313
+++ doc/user_guide.texi	12 Jun 2002 13:55:58 -0000
@@ -1994,8 +1994,8 @@
 The current implementation works by compiling the queries on-the-fly
 and then dynamically linking them into the program being debugged.
 Thus it may take a little while for your query to be executed.
-Each query will be written to a file named @file{query.m} in the current
-directory, so make sure you don't name your source file @file{query.m}.
+Each query will be written to a file named @file{mdb_query.m} in the current
+directory, so make sure you don't name your source file @file{mdb_query.m}.
 Note that dynamic linking may not be supported on some systems;
 if you are using a system for which dynamic linking is not supported,
 you will get an error message when you try to run these commands.
Index: tests/debugger/interactive.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/interactive.exp2,v
retrieving revision 1.3
diff -u -u -r1.3 interactive.exp2
--- tests/debugger/interactive.exp2	29 Apr 2002 08:22:06 -0000	1.3
+++ tests/debugger/interactive.exp2	12 Jun 2002 13:54:57 -0000
@@ -123,17 +123,17 @@
 List = [3, 2, 1], true ;
 fail.
 No (more) solutions.
-?- <stdin>:012: In clause for predicate `query:run/2':
+?- <stdin>:012: In clause for predicate `mdb_query:run/2':
 <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:014: In clause for predicate `query:run/2':
+<stdin>:014: In clause for predicate `mdb_query:run/2':
 <stdin>:014:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `query:run/2':
+<stdin>:012: In clause for predicate `mdb_query:run/2':
 <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:015: In clause for predicate `query:run/2':
+<stdin>:015: In clause for predicate `mdb_query:run/2':
 <stdin>:015:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:026: In clause for predicate `query:query/2':
+<stdin>:026: In clause for predicate `mdb_query:query/2':
 <stdin>:026:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `query:query/2':
+<stdin>:001: In clause for predicate `mdb_query:query/2':
 <stdin>:001:   warning: variable `_2' occurs more than once in this scope.
 <stdin>:026: Inferred :- pred query((list:list(int)), (list:list(int))).
 <stdin>:026: Inferred :- mode query(out, out) is nondet.
@@ -142,24 +142,24 @@
 List = [2, 3, 1], _2 = [3, 1], true ;
 fail.
 No (more) solutions.
-?- <stdin>:012: In clause for predicate `query:run/2':
+?- <stdin>:012: In clause for predicate `mdb_query:run/2':
 <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:014: In clause for predicate `query:run/2':
+<stdin>:014: In clause for predicate `mdb_query:run/2':
 <stdin>:014:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `query:run/2':
+<stdin>:012: In clause for predicate `mdb_query:run/2':
 <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:015: In clause for predicate `query:run/2':
+<stdin>:015: In clause for predicate `mdb_query:run/2':
 <stdin>:015:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:026: In clause for predicate `query:query/2':
+<stdin>:026: In clause for predicate `mdb_query:query/2':
 <stdin>:026:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `query:query/2':
+<stdin>:001: In clause for predicate `mdb_query:query/2':
 <stdin>:001:   warning: variable `_2' occurs more than once in this scope.
 <stdin>:026: Inferred :- pred query((list:list(int)), (list:list(int))).
 <stdin>:026: Inferred :- mode query(out, out) is nondet.
 qperm([1,2,3], List), List = [4 | _].
 fail.
 No (more) solutions.
-?- <stdin>:001: In clause for predicate `query:query/1':
+?- <stdin>:001: In clause for predicate `mdb_query:query/1':
 <stdin>:001:   in argument 1 of call to predicate `qperm/2':
 <stdin>:001:   in argument 2 of functor `[|]/2':
 <stdin>:001:   in argument 2 of functor `[|]/2':
@@ -169,12 +169,11 @@
 <stdin>:001:   argument has type `int',
 <stdin>:001:   constant `"foo"' has type `string'.
 For more information, try recompiling with `-E'.
-** Error making `query.c'.
 qperm([1,2,"foo"], List).
 Compilation error(s) occurred.
 ?- <stdin>:026: Inferred :- pred query((list:list(int))).
 <stdin>:014: In clause for `run(di, uo)':
-<stdin>:014:   in call to predicate `query:query/1':
+<stdin>:014:   in call to predicate `mdb_query:query/1':
 <stdin>:014:   mode error: arguments `List'
 <stdin>:014:   have insts `free',
 <stdin>:014:   which does not match any of the valid modes for
@@ -184,7 +183,6 @@
 <stdin>:026:   mode error: variable `HeadVar__2' has instantiatedness `free',
 <stdin>:026:   expected instantiatedness was `ground'.
 For more information, try recompiling with `-E'.
-** Error making `query.c'.
 qperm(List, [1]).
 Compilation error(s) occurred.
 ?- quit.
@@ -198,25 +196,25 @@
 <stdin>:017: Inferred :- mode query(out) is nondet.
 qperm([1,2,3], List).
 List = [1, 2, 3], true.
-?- <stdin>:011: In clause for predicate `query:run/2':
+?- <stdin>:011: In clause for predicate `mdb_query:run/2':
 <stdin>:011:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `query:run/2':
+<stdin>:012: In clause for predicate `mdb_query:run/2':
 <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:017: In clause for predicate `query:query/2':
+<stdin>:017: In clause for predicate `mdb_query:query/2':
 <stdin>:017:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `query:query/2':
+<stdin>:001: In clause for predicate `mdb_query:query/2':
 <stdin>:001:   warning: variable `_2' occurs more than once in this scope.
 <stdin>:017: Inferred :- pred query((list:list(int)), (list:list(int))).
 <stdin>:017: Inferred :- mode query(out, out) is nondet.
 qperm([1,2,3], List), List = [2 | _].
 List = [2, 1, 3], _2 = [1, 3], true.
-?- <stdin>:011: In clause for predicate `query:run/2':
+?- <stdin>:011: In clause for predicate `mdb_query:run/2':
 <stdin>:011:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:012: In clause for predicate `query:run/2':
+<stdin>:012: In clause for predicate `mdb_query:run/2':
 <stdin>:012:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:017: In clause for predicate `query:query/2':
+<stdin>:017: In clause for predicate `mdb_query:query/2':
 <stdin>:017:   warning: variable `_2' occurs more than once in this scope.
-<stdin>:001: In clause for predicate `query:query/2':
+<stdin>:001: In clause for predicate `mdb_query:query/2':
 <stdin>:001:   warning: variable `_2' occurs more than once in this scope.
 <stdin>:017: Inferred :- pred query((list:list(int)), (list:list(int))).
 <stdin>:017: Inferred :- mode query(out, out) is nondet.
--------------------------------------------------------------------------
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