problems with FFI including h files

Sven Moritz Hallberg
Fri, 31 May 2002 23:35:01 +0200

On Friday 31. May 2002 23:15, Hal Daume III wrote:
> Well, I'm not sure exactly how to do this -- i can dump hspp and hc fil=
> >from the haskell source, but I don't think from the h.  *HOWEVER*, i
> modified cblas.h on line 444 because of your guess and found out that t=
> problem wasn't with the beta, but with float *C.  If I changed "C" to
> "bC", as in:
> void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPO=
> TransA,
>                  const enum CBLAS_TRANSPOSE TransB, const int M, const =
> N,
>                  const int K, const float alpha, const float *A,
>                  const int lda, const float *B, const int ldb,
>                  const float beta, float *bC, const int ldc);
> everything works (well, at least i no longer get an error on *that* lin=
> -- the other errors are still there).
> So it looks like you were right.  How can I get ghc to *not* do this?  =

:) Oh, I don't know that, unfortunately, because I've never looked under =
hood of GHC. But I've encountered quite a lot of errors in C source... an=
these kinds of things are the reason why everybody shamelessly (and quite=
reasonably) hates cpp. But a one-character (!) preprocessor macro #define=
within a user-#included file is definately a bug. *wink* *wink*

Sven Moritz