[m-dev.] foreign_type pragmas in module interfaces
Jonathan Morgan
jonmmorgan at gmail.com
Wed Apr 26 17:25:55 AEST 2006
On 4/26/06, Julien Fischer <juliensf at cs.mu.oz.au> wrote:
> The compiler currently compiles the following without complaint:
>
> :- module ftype_in_interface.
> :- interface.
>
> :- type foo.
> :- foreign_type("C", foo, "MR_Word").
>
> Allowing foreign_type pragmas in module interfaces looks like a bug to me.
I'm inclined to agree. My first thought was that it would prevent you
using foreign types from foreign procs outside of the module the
foreign type was defined in (which could be useful in some
circumstances). However, on checking I discovered that the foreign
procs will be given the correct type for any foreign type, whether it
has been declared in the interface or not. Is this likely to be a
problem in any circumstances?
Jon
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list