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

Hoist between ExceptT error types #10

Closed
wants to merge 1 commit into from

Conversation

lrworth
Copy link

@lrworth lrworth commented May 9, 2024

Enables going ExceptT e m a -> ExceptT e' m a.

Copy link

@JackKelly-Bellroy JackKelly-Bellroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overlaps are checked when an instance is demanded; do you have sample code showing that this works? It might cause an overlapping instance error, like the instance for PluckError e (Except e) m used to.

@lrworth
Copy link
Author

lrworth commented May 9, 2024

Overlaps are checked when an instance is demanded; do you have sample code showing that this works? It might cause an overlapping instance error, like the instance for PluckError e (Except e) m used to.

I have successfully used this instance. Perhaps we should add a test file to this package that uses all the instances.

@@ -194,3 +194,6 @@ instance Applicative m => PluckError e (Either e) m where
instance Monad m => PluckError e (ExceptT e m) m where
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
instance Monad m => PluckError e (ExceptT e m) m where
instance (m ~ n, Monad m) => PluckError e (ExceptT e m) n where

I think this is what we want

@lrworth
Copy link
Author

lrworth commented Dec 16, 2024

Not sure about this one.

@lrworth lrworth closed this Dec 16, 2024
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

Successfully merging this pull request may close these issues.

3 participants