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

Simon Peyton-Jones simonpj at microsoft.com
Wed Jun 28 03:13:18 EDT 2006


Can I urge any of you who learn stuff that "I wish I'd know at the
beginning" to add that information to GHC's FFI Wiki page?
	http://haskell.org/haskellwiki/GHC/Using_the_FFI
Anyone can add to this material, and it's extremely helpful to jot down
what you've learned while it's fresh in your mind.

The current page is largely about C++ bindings, but that's only because
that's what the last contributor was interested in.  Feel free to
re-structure it, add  new sections etc.

Simon


| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Brian
| Hulley
| Sent: 27 June 2006 22:56
| To: Jared Updike
| Cc: Haskell-cafe
| Subject: Re: [Haskell-cafe] Are FunPtr's stable? (was: how to write an
haskellbinding)
| 
| 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.
| 
| http://www.metamilk.com
| 
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list