Re: problems with FFI including h files

2002-05-31 Thread Alastair Reid
> So it looks like you were right. How can I get ghc to *not* do > this? :) Any time you take two large C programs/libraries and try to merge them, you're likely to run into preprocessor (or compiler) related errors like those you describe. How many libraries provide something like the follow

Re: problems with FFI including h files

2002-05-31 Thread Sven Moritz Hallberg
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 files > > >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 the > problem wasn't wi

Re: problems with FFI including h files

2002-05-31 Thread Hal Daume III
Well, I'm not sure exactly how to do this -- i can dump hspp and hc files 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 the problem wasn't with the beta, but with float *C. If I changed "C" to "bC", as in

Re: problems with FFI including h files

2002-05-31 Thread Sven Moritz Hallberg
On Friday 31. May 2002 22:47, Hal Daume III wrote: > [...] > /nfs/isd/hdaume/download/ATLAS/include/cblas.h:591: parse error before > numeric constant > > > if I look at cblas.h, line 444 is the last line of this definition: > > void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANS

Re: monomorphism/hugs98/ghc-5.02.3

2002-05-31 Thread Sigbjorn Finne
This is actually no longer an issue, as H98's behaviour for derived Show and Read instances have changed recently. When Simon next has the time (and inclination) to put out a Report revision, text describing the change will be included. In the meantime, have a look at static.c:mkReadInfix() and

Re: monomorphism/hugs98/ghc-5.02.3

2002-05-31 Thread Matt Fairtlough
Hmm. It might be related but I somehow doubt it. The buggy program is -- module Bug2 where data Bug2 = Bug2 instance Show Bug2 where showsPrec _ Bug2 str = showChar '?' str -- (stack overflow on Bug2> Bug2) and t

Re: monomorphism/hugs98/ghc-5.02.3

2002-05-31 Thread Alastair Reid
> It encourages me to submit my next problem: stack overflow with > simple Show instances...more later Let me guess that this involves a data declaration of the form: data Foo = ... | Foo ... | ... That is an infix data constructor whose first argument is a recursive reference to the datat

Re: monomorphism/hugs98/ghc-5.02.3

2002-05-31 Thread Matt Fairtlough
Thanks a lot for the solution! And of course the ghci behaviour is much more sensible than the hugs one. And for pointing me to the mail archive. It encourages me to submit my next problem: stack overflow with simple Show instances...more later I wonder if there is a list of Hugs to GHCI "got

Re: instance Show (Ptr a)

2002-05-31 Thread Sven Panne
Hal Daume III wrote: > The GHC docs claim Ptr a is an instance of Eq, Ord and Show, but it > doesn't actually seem to have a Show instance. [...] The CVS version of GHC already has this instance, but none for FunPtr. I've just added the latter, so docs and implementation are in synch again...