Skip to content

Commit

Permalink
ErrorWrapper is no longer caught by catchSync
Browse files Browse the repository at this point in the history
  • Loading branch information
arybczak committed Nov 30, 2024
1 parent 4d428c6 commit 401a873
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions effectful-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 4 additions & 1 deletion effectful-core/src/Effectful/Error/Static.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions effectful/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 401a873

Please sign in to comment.