On 12/9/06, Alfonso Acosta <[EMAIL PROTECTED]> wrote:
Functions like this one are not directy exportable

myfunc :: (Tyeable a, Typeable b) => MyType a b ...

Well, that's true. Then again, you can't export that type anyway
without use of a StablePtr. All StablePtrs are exportable.

Uhm thinking about it right now I realized that mgt2mt is hidden to
the user, so I guess it wouldn't be dangerous if transformations like
the following one are not.

MyType Int Char ---> MyGenType ----> MyType a b

So to summarize, Is transforming a monomorphic type to it's
polymorphic equivalent through unsafeCoerce a dangerous operation?

Sure it is. The type you gave (MyType Int Char -> MyType a b) can
easily crash your program.

--
Taral <[EMAIL PROTECTED]>
"You can't prove anything."
   -- Gödel's Incompetence Theorem
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to