[mercury-users] Nested submodules no longer working?

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Sep 16 14:07:20 AEST 2006


On Fri, 15 Sep 2006, Tom Breton (Tehom) wrote:

> Nested submodules don't seem to compile here.  After being unable to
> use them in my code, I tried compiling the submodule tests
> (mercury-tests-0.12.2/hard_coded/sub-modules).  They don't compile on
> my machine.
>
> I include the result of an attempted compile of nested.m The other
> nested submodule tests give essentially the same result.  A sampling
> of unrelated tests had no such problem.
>
> I have 0.12.2; I understand the stable version just became 0.13
> yesterday but I didn't see any mention of nested submodules in the
> 0.13 release notes.
>
> [include result of attempted compile]
>

Hi,

The problem here is that you cannot build a multi-module program
using by just invoking mmc on the command line as you have done below.
(The full details of what needs to happen are covered in section 3 of 
the user's guide).

You shoudl use one of the build systems, either mmake:

 	$ mmake nested.depend
 	$ mmake nested

or mmc --make:

 	$ mmc --make nested

($ is the command prompt)

Julien.



> [tehom at mancha sub-modules]$ pwd
> /home/tehom/mercury/mercury-tests-0.12.2/hard_coded/sub-modules
> [tehom at mancha sub-modules]$ mmc -E nested.m
> mercury_compile: cannot find `nested.child.int' in directories .,
> /usr/local/mercury-0.12.2/lib/mercury/ints.
> mercury_compile: cannot find `nested.child2.int' in directories .,
> /usr/local/mercury-0.12.2/lib/mercury/ints.
> nested.m:051: In definition of type `nested.t1'/0:
> nested.m:051:   error: undefined type `nested.child.foo'/0.
> nested.m:052: In definition of type `nested.t2'/0:
> nested.m:052:   error: undefined type `child.foo'/0
> nested.m:052:   (the module `child' has not been imported).
> nested.m:053: In definition of type `nested.t3'/0:
> nested.m:053:   error: undefined type `foo'/0.
> nested.m:054: In definition of type `nested.t4'/0:
> nested.m:054:   error: undefined type `nested.child2.foo'/0.
> nested.m:055: In definition of type `nested.t5'/0:
> nested.m:055:   error: undefined type `child2.foo'/0
> nested.m:055:   (the module `child2' has not been imported).
> mercury_compile: cannot find `nested.int0' in directories .,
> /usr/local/mercury-0.12.2/lib/mercury/ints.
> mercury_compile: cannot find `nested.int0' in directories .,
> /usr/local/mercury-0.12.2/lib/mercury/ints.
> [tehom at mancha sub-modules]$ uname -a
> Linux mancha 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 i686
> i386 GNU/Linux
> [tehom at mancha sub-modules]$ mmc --version
> Mercury Compiler, version 0.12.2, configured for i686-pc-linux-gnu
> Copyright (C) 1993-2006 The University of Melbourne
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list