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

Introduce Throws typeclass #5

Open
chshersh opened this issue Mar 20, 2021 · 0 comments
Open

Introduce Throws typeclass #5

chshersh opened this issue Mar 20, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@chshersh
Copy link
Contributor

Currently, we need to specify list of exceptions precisely. But the order of exceptions in the list doesn't actually matter. So the following two actions are the same, but they won't typecheck to each other:

foo :: EIO '[ E1, E2 ] Int
bar :: EIO '[ E2, E1 ] Int

This is usually handled by typeclasses:

foo :: Throws e '[ E1, E2 ] => EIO e Int
@chshersh chshersh added the enhancement New feature or request label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant