[m-dev.] diff: update doc for c_pointer
Thomas Conway
conway at cs.mu.OZ.AU
Wed Feb 9 08:45:30 AEDT 2000
On Tue, Feb 08, 2000 at 11:31:49PM EST, Tyson Dowd wrote:
> On 08-Feb-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> >
> > Personally I don't think the extra effort of defining special syntax
> > for this construct would be worth it, since it is only going to be
> > used in a few places within the implementation. The major
> > argument in favour of it would be that we could then detect
> > types which are declared and not defined at compile time rather
> > than at link time. But that is not a very strong argument, IMHO.
>
> Nor do I, but if we define a new syntax for types defined externally
> in foreign languages, it would be good if it could provide this
> functionality too.
For example see the curses binding. There are a gazillion casts there.
It would be nice to be able to write something like:
:- interface.
:- type window.
...
:- implementation.
:- pragma c_type(window, "WindowPtr").
and have the C interface make the parameters `WindowPtr's rather
than `Word's.
--
Thomas Conway )O+ Every sword has two edges.
Mercurian <conway at cs.mu.oz.au>
--------------------------------------------------------------------------
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