Are there plans to include C99 'complex' type
in Foreign, maybe as CFloatComplex, CDoubleComplex
A separate library for new types to add to Foreign would be the easiest
way forward. Just put the foreign-c99 package on Hackage?
(...) 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?

I'm sorry, maybe I didn't understand you well. Are
you saying that I could get this 'CComplex' type using
unboxed types and other things already available?

Yes, because the C standard guarantees that a complex <type> is
stored as <type>[2].

I have been using the following, for binding to FFTW:

The way you wrote CComplex a, is it possible to write

foreign import ccall "somename" somename
  :: CComplex CDouble -> IO CComplex CDouble

?

Thanks,
Maurício

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to