Re: Haskell and Maple FFI

Sven Panne <[email protected]> Thu, 21 Oct 2004 19:49:28 +0200
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <[email protected]>
Rafael Martinez Torres wrote:
> Well, after reading some doc, I realised it may not be  feasible
> without a FFI preprocessor.

It's feasible without a FFI preprocessor, but probably not very portable.

> For the time beeing, as I don't want to access the internals of Kernel
> descriptor, but to deal with it through the given API, I will declare
> 
> type MKernelDescriptor = Ptr ()
> 
> as a transient solution. It seems to be OK.

A common idiom for an opaque pointer is:

    newtype Foo = Foo (Ptr Foo)

Cheers,
    S.