[m-rev.] diff: workaround problems with cairo binding in LLDS grades
Ian MacLarty
maclarty at csse.unimelb.edu.au
Wed Sep 8 14:27:43 AEST 2010
On Wed, Sep 8, 2010 at 12:04 AM, Julien Fischer
<juliensf at csse.unimelb.edu.au> wrote:
>
> The problem here is caused by the fact that in low-level C grades the
> .mh file for a parent module is not #included in the .c file for a child
> module until after the .mh file for the child is #included in the .c file
> for the child. This doesn't occur with the high-level C grades because
> the .mih files are #included in the correct order.
>
> The reference manual doesn't spell out whether the contents of a parent
> module's foreign_decl pragmas should be visible to
> foreign_{decl,type,export} pragmas in its children.
> (It does suggest using pragma foreign_import_module, but that doesn't
> work for the case below as the resulting #includes still occur too late.)
>
> For the high-level C backend the parent's foreign_decl pragmas are
> visible in the children. This is a consequence of the order in which
> .mih files are #included in child .c files.
>
> I propose that we alter the order in which .mh files are #included in
> low-level C grade, so that the parents .mh file is first. The current
> lack of consistency between the two backends is a bit of a pain.
>
> Additionally, we could specify that for C foreign_decl pragmas in
> a parent module are automatically visible in C foreign_decl pragmas
> in a child.
>
> Thoughts?
>
Sounds reasonable to me.
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list