[mercury-users] sub-modules
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jun 16 10:26:52 AEST 2000
On 15-Jun-2000, Peter Ross <peter.ross at miscrit.be> wrote:
>
> 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?
You can only use `t' if, in addition to importing `p', you also import `p__c'.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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