proposal: add 'unsafeCoerce'
taralx at gmail.com
Tue Nov 21 18:18:40 EST 2006
On 21 Nov 2006 15:41:01 -0500, kahl at cas.mcmaster.ca
<kahl at cas.mcmaster.ca> wrote:
> Or as a hint that we should introduce a ``pseudo-polymorphic pseudo-function''
> safeCoerce :: a -> b
> which can only be used if a and b have the same representation,
> as mandated by the language definition?
It wouldn't be unreasonable for the compiler to provide instances of
TypeEq for newtypes and product types.
Taral <taralx at gmail.com>
"You can't prove anything."
-- Gödel's Incompetence Theorem
More information about the Libraries