Hi,

Do you think we could have the range of sizes for Int* and Word*
expanded to allow also 128 and 256 bits sizes?

My reason is that I have a long standing issue trying to bind to
C numerical libraries using complex numbers, as those are usually
structs passed by value. See this from GNU GSL:

  typedef struct
    {
      double dat[2];
    }
  gsl_complex;

I imagine I could do:

  type GslComplex = Word128 -- size would depend on architecture

and then write foreign declarations to have:

  get_real :: GslComplex -> CDouble
  get_imag :: GslComplex -> CDouble
  gsl_complex_sin :: GslComplex -> GslComplex
  gsl_complex_cos :: GslComplex -> GslComplex

Do you think this is a reasonable request?

Thanks for your attention,
Maurício

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

Reply via email to