Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move functionality into base #15

Open
Mathnerd314 opened this issue Jul 17, 2016 · 0 comments
Open

Move functionality into base #15

Mathnerd314 opened this issue Jul 17, 2016 · 0 comments

Comments

@Mathnerd314
Copy link

According to the blog post, this library implements a simple exception hierarchy:

SomeException
|- SomeAsyncException
`- SomeSyncException

and then provides catchAny :: m a -> (SomeSyncException -> m a) -> m a, a specialized version of Control.Exception's catch.

Also quoting from the blog post:

The ideal solution is to make a stronger distinction in the core libraries themselves between sync and async exceptions.

This could be done in two ways:

  1. SomeException is redefined to mean only synchronous exceptions; a new parent is added containing both SomeException and SomeAsyncException
  2. SomeException continues its existing behavior; SomeSyncException is added, and all of Hackage is rewritten to use SomeSyncExcepion or SomeAsyncException as appropriate.

I will note the strong similarity between SomeException / SomeAsyncException / SomeSyncException and Java's Throwable / Error / Exception; if (1) is chosen then it would make sense to call the new parent SomeThrowable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant