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⑈
_______________________________________________
Haskell-prime mailing list
[email protected]
http://haskell.org/mailman/listinfo/haskell-prime