[mercury-users] mmc --make and -I option
Ian MacLarty
maclarty at cs.mu.OZ.AU
Thu Feb 23 05:03:00 AEDT 2006
Hello,
In the mmc help message the -I option has the following description:
-I <dir>, --search-directory <dir>
Append <dir> to the list of directories to be searched for
imported modules.
However if I have the following program:
:- module test.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module test2.
main(!IO) :-
test2.print(!IO),
nl(!IO).
which includes the following module:
:- module test2.
:- interface.
:- import_module io.
:- pred print(io::di, io::uo) is det.
:- implementation.
print(!IO) :- io.write_string("hello\n", !IO).
and I put test2.m in a subdirectory of the directory test.m is in,
named test2, and then I try and compile test.m with the following
command:
mmc --make test -I test2
I get the following error:
** Error: error reading file `test2.m' to generate dependencies.
** Module `test2' is imported or included by module `test'.
mercury_compile: can't find source for module `test2'.
Why doesn't mmc find test2.m in the test2 directory? I think it should
because of the value of the -I option I gave.
Is this a bug or do I need to compile the file in the test2 directory first?
Ian.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list