problems with FFI including h files

Sven Moritz Hallberg pesco@gmx.de
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=
es
>
> >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=
he
> 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=
SE
> TransA,
>                  const enum CBLAS_TRANSPOSE TransB, const int M, const =
int
> 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=
e
> -- 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 =
the=20
hood of GHC. But I've encountered quite a lot of errors in C source... an=
d=20
these kinds of things are the reason why everybody shamelessly (and quite=
=20
reasonably) hates cpp. But a one-character (!) preprocessor macro #define=
d=20
within a user-#included file is definately a bug. *wink* *wink*

Greetings,
Sven Moritz