[Haskell-cafe] Dynamic types through unsafeCoerce

Lemmih lemmih at gmail.com
Sun Dec 10 10:23:30 EST 2006

On 12/10/06, Alfonso Acosta <alfonso.acosta at gmail.com> wrote:
> On 12/10/06, Lemmih <lemmih at gmail.com> wrote:
> > How about using a StablePtr to a Dynamic?
> I'm using them, but just forgot to put them in the example I wrote.
> myfunc :: (Tyeable a, Typeable b) => StablePtr (MyType a b) ...
> Either the way, it doesn't work due to the class context, which is not
> accepted byt the FFI.

You can go from 'MyType a b' to 'Dynamic' to 'StablePtr Dynamic' to
'Dynamic' to 'MyType a b'.


More information about the Haskell-Cafe mailing list