[Haskell-cafe] Are FunPtr's stable? (was: how to write an haskell binding)

Brian Hulley brianh at metamilk.com
Tue Jun 27 17:56:12 EDT 2006

Jared Updike wrote:
>> On a related note, as I was reading the FFI specification again, I
>> can't find any mention of whether or not FunPtr's are stable with
>> respect to garbage collection. I'm assuming they are but am I
>> correct?
> Did you read Tackling the Awkward Squad? I think Section 6 (esp.
> 6.4.2) addresses this:
>   http://research.microsoft.com/~simonpj/papers/marktoberdorf/

Thanks - from 6.4.2:

   "Incidentally, the alert reader may have noticed
    that foreign import "wrapper", described
    in Section 6.2, must use stable pointers."

Perhaps a future revision of the FFI document could also include a direct 
confirmation like this?

Best regards, Brian.

Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us.


More information about the Haskell-Cafe mailing list