[Haskell-cafe] Dynamic types through unsafeCoerce
alfonso.acosta at gmail.com
Sat Dec 9 17:29:02 EST 2006
On 12/9/06, Udo Stenzel <u.stenzel at web.de> wrote:
> 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.
I'm using StablePtrs already, what made you assume I wasn't using them?
> > would the use of unsafeCoerce be dangerous?
> If you have to ask, then yes.
The name of the function makes it clear, it is unsafe, but it is still
used in many cases. I just wanted to know if it was dangerous is this
Taral gave a good reason
> "Never confuse motion with action." -- Ernest Hemingway
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> -----END PGP SIGNATURE-----
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe