You mean I have to use a type like <span style="font-family:courier new,monospace">StablePtr (IORef Stuff)</span>?<br>Because there I can only "peek" (deRefStablePtr) the pointer, not "poke" it.<br><br>
I take it I should return to C a StablePtr to the new value if I don't want to use IORefs...<br><br>Or else I have to use regular Ptrs with Foreign.Marshall.Alloc.malloc<br><br><div class="gmail_quote">2012/2/12 Antoine Latter <span dir="ltr"><<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, Feb 12, 2012 at 3:09 PM, Yves Parès <<a href="mailto:yves.pares@gmail.com">yves.pares@gmail.com</a>> wrote:<br>
> But then,<br>
> In use case 1), how can a Haskell function modify the data addressed?<br>
><br>
<br>
</div><a href="http://hackage.haskell.org/packages/archive/base/latest/doc/html/Foreign-StablePtr.html#v:deRefStablePtr" target="_blank">http://hackage.haskell.org/packages/archive/base/latest/doc/html/Foreign-StablePtr.html#v:deRefStablePtr</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Antoine<br>
</font></span></blockquote></div><br>