proposal: add 'unsafeCoerce'
ndmitchell at gmail.com
Sun Nov 19 08:30:16 EST 2006
> So presumably Neil and Don think there are situations where it can be
> safely used across implementations. What are they?
Yhc translates Haskell to a well-typed (using rank-2 types, but not
explicitly typed) language. To translate this language back to Haskell
requires type annotations (which were lost ages ago), or lots of
unsafeCoerce, which is the significantly easier method. In practice
the unsafeCoerce's have never gone wrong on any compiler.
More information about the Libraries