RE: [Haskell-cafe] FFI and pointers to pointers

2005-04-26 Thread Simon Marlow
On 25 April 2005 21:40, John Meacham wrote: > On Mon, Apr 25, 2005 at 12:51:04PM +0100, Simon Marlow wrote: >> The syntax you want is >> >> foreign import ccall "&bar" :: Ptr CInt >> >> But note that GHC 6.4 has a bug whereby this doesn't work as expected >> when compiling via C. Either use t

Re: [Haskell-cafe] FFI and pointers to pointers

2005-04-25 Thread John Meacham
On Mon, Apr 25, 2005 at 12:51:04PM +0100, Simon Marlow wrote: > The syntax you want is > > foreign import ccall "&bar" :: Ptr CInt > > But note that GHC 6.4 has a bug whereby this doesn't work as expected > when compiling via C. Either use the native code generator (-fasm) or > wait for 6.4.1.

RE: [Haskell-cafe] FFI and pointers to pointers

2005-04-25 Thread Simon Marlow
On 25 April 2005 12:51, Simon Marlow wrote: > On 22 April 2005 16:18, Dimitry Golubovsky wrote: > >> I am trying to generalize my knowledge about FFI declarations when >> dealing with pointers to pointers (import from C to Haskell). Maybe >> these are silly questions, but It seems to me, I am mis

RE: [Haskell-cafe] FFI and pointers to pointers

2005-04-25 Thread Simon Marlow
On 22 April 2005 16:18, Dimitry Golubovsky wrote: > I am trying to generalize my knowledge about FFI declarations when > dealing with pointers to pointers (import from C to Haskell). Maybe > these are silly questions, but It seems to me, I am missing some > understanding. > > Per the FFI Addendum