If this is valid:

    import qualified Control.Exception as Exc

    genericFromException :: Typeable a => Exc.SomeException -> Maybe a
    genericFromException (Exc.SomeException e) = cast e
    instance Exc.Exception SomeType where fromException =
genericFromException

then why not have an auto-deriving rule for Exception (fromException =
cast . unSomeException)?
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to