[mercury-users] sub-modules

Peter Ross peter.ross at miscrit.be
Thu Jun 15 23:26:22 AEST 2000


Hi

>From the Mercury Reference Manual:

If an `:- include_module' declaration occurs in the interface section of a
module, then only the declarations (interfaces) of the sub-modules are
included in the parent module's interface; the definitions (implementations)
of the sub-modules are considered to be implicitly part of the parent
module's implementation.

and we have defined

:- module p.
:- interface
:- inculde_module p__c.
:- implementation.
:- end_module p.

:- module p__c.
:- interface.
:- type t ---> a;b;c.
:- implementation.
:- end_module p__c.

Now if we import p into some module, then we can use the definition of type
't' inside that
module. Correct?
--------------------------------------------------------------------------
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