[Haskell-cafe] FFI and modifying haskell memory

Joel Reymont joelr1 at gmail.com
Mon Oct 24 11:20:32 EDT 2005


Is "with" better than allocaBytes?

On Oct 22, 2005, at 12:42 AM, John Meacham wrote:

> because haskell values don't have the same representation as C values.
> haskell values are pointers to updatable thunks. in any case 'with'
> just allocates 4 bytes on the stack (the same as a auto C declaration)
> so is quite speedy compared to what it would take to make a haskell
> value look like a C one. not to mention haskell values can't be
> modified.

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list