[Haskell-cafe] Re: Complex C99 type in Foreign

Don Stewart dons at galois.com
Sun Feb 1 18:54:00 EST 2009

> >>Are there plans to include C99 'complex' type
> >>in Foreign, maybe as CFloatComplex, CDoubleComplex
> >>and CLongDoubleComplex? This seems an easy addition
> >>to the standard and would allow binding of a few
> >>interesting libraries, like GSL.
> >
> >A separate library for new types to add to Foreign would be the easiest
> >way forward. Just put the foreign-c99 package on Hackage?
> As far as I know, this is not possible. (I tried for
> a long time to do that, actually, until I reallized
> it could not be done.)
> If it's not true, i.e., I could actually have some
> arbitrary sized parameter as argument to a function
> or as a return value (and not its pointer), what
> did I saw wrong? I understand only Foreign.C.C*
> types or forall a. => Foreign.Ptr.Ptr a can be used
> like that.

Oh, you mean you need to teach the compiler about unboxed complex types?

-- Don

More information about the Haskell-Cafe mailing list