Re: [Haskell-cafe] getting data through foreign layer without marshalling

2009-12-14 Thread Donn Cave
Quoth Bernie Pope florbit...@gmail.com, 2009/12/14 Donn Cave d...@avvanta.com: [...] I don't fully understand what you want to do, but perhaps you can use a StablePtr: http://www.haskell.org/ghc/docs/latest/html/libraries/base/Foreign-StablePtr.html Yes, thank you very much, that does

Re: [Haskell-cafe] getting data through foreign layer without marshalling

2009-12-14 Thread Bulat Ziganshin
Hello Donn, Monday, December 14, 2009, 4:31:58 AM, you wrote: I'm just not sure where AppData lives while it's referenced in a FunPtr via partial application, if there might be multiple copies, etc. GHC RTS creates thunk with this partial call. this thunk references all the data used in

[Haskell-cafe] getting data through foreign layer without marshalling

2009-12-13 Thread Donn Cave
I'm working with a C++ application library, of the sort where you instantiate a subclass of the library object and it dispatches your functions on receipt of various events. With multiple OS threads, by the way. This works all right so far, with some C++ boilerplate and Haskell FunPtrs created

Re: [Haskell-cafe] getting data through foreign layer without marshalling

2009-12-13 Thread Bernie Pope
2009/12/14 Donn Cave d...@avvanta.com: I'm working with a C++ application library, of the sort where you instantiate a subclass of the library object and it dispatches your functions on receipt of various events.  With multiple OS threads, by the way. This works all right so far, with some