
24 Feb
2008
24 Feb
'08
5:24 p.m.
Thanks, I'll try that. -- Uwe
On 2/24/08, Ryan Ingram
This is pretty cool, but I have one warning:
On Sat, Feb 23, 2008 at 4:37 PM, Uwe Hollerbach
wrote: data MyInterrupt = MyInt Int instance Typeable MyInterrupt where typeOf x = typeOf (0 :: Int)
I am pretty sure that this makes Dynamic unsound; you could accidentally cast from an Int to a MyInterrupt or vice versa. Try this instead:
data MyException = Interrupt deriving Typeable
then you can safely use throwDyn and catchDyn on this type.
-- ryan