[Haskell-cafe] Auto-deriving Control.Exception.Exception

eyal.lotem at gmail.com eyal.lotem at gmail.com
Sun Jan 4 12:50:20 EST 2009

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 =

then why not have an auto-deriving rule for Exception (fromException =
cast . unSomeException)?

More information about the Haskell-Cafe mailing list