#2483: mapException type under extensible exceptions
-----------------------------+----------------------------------------------
Reporter: Isaac Dupree | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/base
Version: 6.9 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
-----------------------------+----------------------------------------------
The old type is {{{mapException :: (Exception -> Exception) -> a -> a}}}
e.g. you might map have mapped a !DivZeroError to a dynamic exception of
some sort (gee, I don't know). Of course the "dynamic exception" will be
less of a hack when the code is converted to extensible exceptions.
In any case that doesn't work with the 6.9-current signature
{{{mapException :: (Exception e) => (e -> e) -> a -> a}}}
because !DivZeroErrors are not necessarily the same type as the exceptions
you're throwing, obviously!
The old signature is closer in meaning to {{{mapException ::
(SomeException -> SomeException) -> a -> a}}}
which is isomorphic to {{{mapException :: (Exception e1, Exception e2) =>
(e1 -> e2) -> a -> a}}}
which I think is the inferred type, and ought to be the explicit type too.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2483>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs