diff --git a/effectful-core/CHANGELOG.md b/effectful-core/CHANGELOG.md index 23dd20a..1f150a8 100644 --- a/effectful-core/CHANGELOG.md +++ b/effectful-core/CHANGELOG.md @@ -1,6 +1,7 @@ # effectful-core-2.6.0.0 (????-??-??) * **Breaking changes**: - Change the order of type parameters in `raise` for better usability. + - `Effectful.Error.Static.ErrorWrapper` is no longer caught by `catchSync`. # effectful-core-2.5.1.0 (2024-11-27) * Add `passthrough` to `Effectful.Dispatch.Dynamic` for passing operations to diff --git a/effectful-core/src/Effectful/Error/Static.hs b/effectful-core/src/Effectful/Error/Static.hs index c457c53..3bfe887 100644 --- a/effectful-core/src/Effectful/Error/Static.hs +++ b/effectful-core/src/Effectful/Error/Static.hs @@ -247,7 +247,10 @@ instance Show ErrorWrapper where . ("\n" ++) . (prettyCallStack cs ++) -instance Exception ErrorWrapper +instance Exception ErrorWrapper where + -- See discussion in https://github.com/haskell-effectful/effectful/pull/232. + toException = asyncExceptionToException + fromException = asyncExceptionFromException matchError :: ErrorId -> ErrorWrapper -> Maybe (CallStack, e) matchError eid (ErrorWrapper etag cs _ e) diff --git a/effectful/CHANGELOG.md b/effectful/CHANGELOG.md index 7a56caf..b5806a2 100644 --- a/effectful/CHANGELOG.md +++ b/effectful/CHANGELOG.md @@ -1,6 +1,7 @@ # effectful-core-2.6.0.0 (????-??-??) * **Breaking changes**: - Change the order of type parameters in `raise` for better usability. + - `Effectful.Error.Static.ErrorWrapper` is no longer caught by `catchSync`. # effectful-2.5.1.0 (2024-11-27) * Add `passthrough` to `Effectful.Dispatch.Dynamic` for passing operations to