[Haskell-cafe] Stable pointers: use of cast to/from Ptr

Yves Parès yves.pares at gmail.com
Mon Feb 13 08:15:38 CET 2012

You mean I have to use a type like StablePtr (IORef Stuff)?
Because there I can only "peek" (deRefStablePtr) the pointer, not "poke" it.

I take it I should return to C a StablePtr to the new value if I don't want
to use IORefs...

Or else I have to use regular Ptrs with Foreign.Marshall.Alloc.malloc

2012/2/12 Antoine Latter <aslatter at gmail.com>

> On Sun, Feb 12, 2012 at 3:09 PM, Yves Parès <yves.pares at gmail.com> wrote:
> > But then,
> > In use case 1), how can a Haskell function modify the data addressed?
> >
> http://hackage.haskell.org/packages/archive/base/latest/doc/html/Foreign-StablePtr.html#v:deRefStablePtr
> Antoine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120213/08746bb5/attachment.htm>

More information about the Haskell-Cafe mailing list