
8 Apr
2006
8 Apr
'06
5:18 a.m.
On Sat, Apr 08, 2006 at 12:11:51AM -0400, David Menendez wrote:
newtype ArithException a = ArithException a
data DivideByZero
throw (ArithException DivideByZero)
your code:
data MultiplyByZero throw (ArithException MultiplyByZero)
How would you use this to write a handler that captures any ArithException?
You would use the Typeable1 class in Data.Typeable. not perfect, but exception hierarchies shouldn't be too deep so it is not so bad. John -- John Meacham - ⑆repetae.net⑆john⑈
6990
Age (days ago)
6990
Last active (days ago)
0 comments
1 participants
participants (1)
-
John Meacham