ghci doesn't run FFi'd code which works under ghc on WinXP

2007-04-01 Thread Vivian McPhail
Hi All, I wrote a binding to matlab matrix.h and mat.h. My test program works when I compile a binary, but when I try to use the code in ghci nothing happens. There are no error messages, but all computations return a blank line. Does this fall into a known class of error? I can provide my s

Re: More on FreeBSD/amd64

2007-04-01 Thread Ian Lynagh
On Sun, Apr 01, 2007 at 06:10:25PM -0400, Gregory Wright wrote: > > >Ah, remove the #if/#endif around the definition of "puts", its export, > >and the GHC.Pack import in libraries/base/GHC/Handle.hs > > > No such luck. I even copied "puts" into libraries/base/GHC/ > ForeignPtr.hs > but I still g

Re: More on FreeBSD/amd64

2007-04-01 Thread Gregory Wright
Hi Ian, On Apr 1, 2007, at 3:57 PM, Ian Lynagh wrote: Hi Gregory, Is there a version of "print" I can use for debugging these libraries? Just adding "print" causes a cycle in module dependencies. Ah, remove the #if/#endif around the definition of "puts", its export, and the GHC.Pack imp

Re: More on FreeBSD/amd64

2007-04-01 Thread Ian Lynagh
Hi Gregory, On Sun, Apr 01, 2007 at 03:40:11PM -0400, Gregory Wright wrote: > > >mallocPlainForeignPtrBytes i@(I# size) = do > > print ('A', i) > > IO $ \s -> > >case newPinnedByteArray# size s of { (# s, mbarr# #) -> > > > >(it might be worth printing something after

Re: More on FreeBSD/amd64

2007-04-01 Thread Gregory Wright
Hi Ian, On Mar 29, 2007, at 8:36 PM, Ian Lynagh wrote: Hmm, oh well. OK, so we know that the wrong value is being passed to newPinnedByteArray#, right? There aren't many calls to that: libraries/base/Foreign/Marshal/Alloc.hs libraries/base/GHC/ForeignPtr.hs (4 calls) libraries/b

Re: [Haskell-cafe] ghc-6.7.20070330 on Mac OS X

2007-04-01 Thread Gregory Wright
Hi Ruben, The GHC wiki also has information on this, and should be your first stop if you are experiencing build problems: http://hackage.haskell.org/trac/ghc/wiki/Building/MacOSX At least under MacPorts, I have had no trouble building 6.7-20070330. I will be releasing a new portfile for ghc-d

Re: [Haskell-cafe] ghc-6.7.20070330 on Mac OS X

2007-04-01 Thread Pepe Iborra
(redirecting to glasgow-haskell-users) It is well known that the readline lib that comes with OS X is no good, and you need to use a replacement. A nice post from the blogosphere explaining all this: http://mult.ifario.us/articles/2006/10/17/ghc-6-6-and-mac-os-x- readline-quick-fix If th