Rodrigo Mesquita pushed to branch wip/romes/edsko-exceptions-2 at Glasgow Haskell Compiler / GHC
Commits:
-
5affd08b
by Rodrigo Mesquita at 2026-05-08T14:49:38+01:00
-
bdb42453
by Rodrigo Mesquita at 2026-05-08T14:49:38+01:00
1 changed file:
Changes:
| ... | ... | @@ -208,12 +208,10 @@ Caught MismatchedParentheses |
| 208 | 208 | |
| 209 | 209 | -}
|
| 210 | 210 | class (Typeable e, Show e) => Exception e where
|
| 211 | - -- | @toException@ should produce a 'SomeException' with no attached 'ExceptionContext'.
|
|
| 212 | 211 | toException :: e -> SomeException
|
| 213 | 212 | fromException :: SomeException -> Maybe e
|
| 214 | 213 | |
| 215 | - toException e = SomeException e
|
|
| 216 | - where ?exceptionContext = emptyExceptionContext
|
|
| 214 | + toException e = e
|
|
| 217 | 215 | fromException (SomeException e) = cast e
|
| 218 | 216 | |
| 219 | 217 | -- | Render this exception value in a human-friendly manner.
|