On 12/12/06, Alfonso Acosta <[EMAIL PROTECTED]> wrote:
On 12/10/06, Lemmih <[EMAIL PROTECTED]> wrote:
> How about using a StablePtr to a Dynamic?

Uhm, that's a good idea cause  no Typeable context will then be
required and thus the function can be exported by the FFI.

On the other hand, using Data.Dynamic requires any type to be an
instance of Typeable. And thus requires the user to make such
instantiation (which is a pain)

GHC supports the "deriving" clause for the Typeable class, but it's
not standard Haskell98 (and as far as I know, for example hugs doesn't
support it)

So it would be great to be able to use unsafeCoerce.

Ah, you want type-safe casts without using Typeable? Good luck, you'll need it.

--
Cheers,
 Lemmih
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to