[Haskell-cafe] Portable implementation of unsafeCoerce
alfonso.acosta at gmail.com
Tue Feb 6 10:58:28 EST 2007
Reading the sources of Lava (a Haskell Hardware Description DSL) I run
into this definition ...
unsafeCoerce :: a -> b
unsafeCoerce a = unsafePerformIO $
do writeIORef ref a
ref = unsafePerformIO $
do newIORef undefined
Is this actually equivalent to the infamous unsafeCoerce# ?
Thanks in advance,
More information about the Haskell-Cafe