
9 Dec
2006
9 Dec
'06
2:45 p.m.
Alfonso Acosta wrote:
I've been using Data.Dynamic but the Typeable requirement doesn't go well with FFI declarations (which don't accept type contexts).
You wouldn't need a Typeable context anyway; what's biting you is that Dynamic is not one of the primitive types that can pass across the FFI. There are good reasons for that and unsafeCoerce certainly cannot invalidate them. You want a StablePtr.
would the use of unsafeCoerce be dangerous?
If you have to ask, then yes. -Udo -- "Never confuse motion with action." -- Ernest Hemingway