RE: Safe use of unsafeCoerce?

2004-04-26 Thread Simon Marlow
On 24 April 2004 17:38, Duncan Coutts wrote: All, I'm after advice on whether the following example is a safe use of unsafeCoerce, and if it is safe, if it's worth it. In summary, if the following is ok: castFooToBar :: Ptr Foo - Ptr Bar castFooToBar = castPtr then is the following

Re: Safe use of unsafeCoerce?

2004-04-26 Thread Duncan Coutts
On Mon, 2004-04-26 at 15:42, Alastair Reid wrote: I'm after advice on whether the following example is a safe use of unsafeCoerce, and if it is safe, if it's worth it. It looks like it is safe but it feels like using a sledgehammer to crack a nut ... in the presence of small children