Andreas Klebinger pushed to branch wip/andreask/9.10.4-batch1 at Glasgow Haskell Compiler / GHC
Commits:
-
ffcaf0ff
by Matthew Pickering at 2026-05-21T09:41:54+02:00
1 changed file:
Changes:
| ... | ... | @@ -224,8 +224,10 @@ instance Show a => Show (ExceptionWithContext a) where |
| 224 | 224 | |
| 225 | 225 | instance Exception a => Exception (ExceptionWithContext a) where
|
| 226 | 226 | toException (ExceptionWithContext ctxt e) =
|
| 227 | - SomeException e
|
|
| 228 | - where ?exceptionContext = ctxt
|
|
| 227 | + case toException e of
|
|
| 228 | + SomeException c ->
|
|
| 229 | + let ?exceptionContext = ctxt
|
|
| 230 | + in SomeException c
|
|
| 229 | 231 | fromException se = do
|
| 230 | 232 | e <- fromException se
|
| 231 | 233 | return (ExceptionWithContext (someExceptionContext se) e)
|