[m-rev.] for review: fix sub-module build problem

Peter Ross peter.ross at miscrit.be
Fri Nov 16 09:29:19 AEDT 2001


Here is the final test case. I know check for three things.

    A nested sub-module at the top level.
    A nested sub-module inside a separate sub-module.
    A nested sub-module inside a separate sub-module whose filename
    isn't fully qualified.

Anything else?

===================================================================



Estimated hours taken: 0.5
Branches: main

tests/hard_coded/sub-modules/include_parent.m:
tests/hard_coded/sub-modules/separate2.m:
tests/hard_coded/sub-modules/use_submodule.m:
tests/hard_coded/sub-modules/use_submodule.exp:
    Update the test so that it also tests a separate sub-module whose
    filename isn't fully qualified.

Index: include_parent.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/sub-modules/include_parent.m,v
retrieving revision 1.1
diff -u -r1.1 include_parent.m
--- include_parent.m	15 Nov 2001 15:01:30 -0000	1.1
+++ include_parent.m	15 Nov 2001 22:25:05 -0000
@@ -5,7 +5,7 @@
 :- interface.
 
 :- import_module io.
-:- include_module separate.
+:- include_module separate, separate2.
 
 :- pred hello(io__state::di, io__state::uo) is det.
 
Index: separate2.m
===================================================================
RCS file: separate2.m
diff -N separate2.m
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ separate2.m	15 Nov 2001 22:25:05 -0000
@@ -0,0 +1,25 @@
+% Used by use_submodule.m
+
+:- module include_parent__separate2.
+
+:- interface.
+
+% The parent module includes io.
+
+:- pred hello(io__state::di, io__state::uo) is det.
+
+  :- module include_parent__separate2__nested.
+  :- interface.
+  :- pred hello(io__state::di, io__state::uo) is det.
+  :- end_module include_parent__separate2__nested.
+
+:- implementation.
+
+hello -->
+	io__write_string("include_parent__separate2: hello\n").
+
+  :- module include_parent__separate2__nested.
+  :- implementation.
+  hello -->
+	io__write_string("include_parent__separate2__nested: hello\n").
+  :- end_module include_parent__separate2__nested.
Index: use_submodule.exp
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/sub-modules/use_submodule.exp,v
retrieving revision 1.1
diff -u -r1.1 use_submodule.exp
--- use_submodule.exp	15 Nov 2001 15:01:31 -0000	1.1
+++ use_submodule.exp	15 Nov 2001 22:25:05 -0000
@@ -7,3 +7,5 @@
 include_parent__separate: hello2
 include_parent__separate: hello2
 include_parent__separate__nested: hello
+include_parent__separate2: hello
+include_parent__separate2__nested: hello
Index: use_submodule.m
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/sub-modules/use_submodule.m,v
retrieving revision 1.1
diff -u -r1.1 use_submodule.m
--- use_submodule.m	15 Nov 2001 15:01:31 -0000	1.1
+++ use_submodule.m	15 Nov 2001 22:25:05 -0000
@@ -14,6 +14,8 @@
 :- import_module include_parent__nested.
 :- import_module include_parent__separate.
 :- import_module include_parent__separate__nested.
+:- use_module include_parent__separate2.
+:- use_module include_parent__separate2__nested.
 
 main -->
 	include_parent__hello,
@@ -24,4 +26,6 @@
 	include_parent__separate__hello2,
 	separate__hello2,
 	hello2,
-	hello3.
+	hello3,
+	include_parent__separate2__hello,
+	include_parent__separate2__nested__hello.

--------------------------------------------------------------------------
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