Skip to content

Instantly share code, notes, and snippets.

@benkolera
Created January 20, 2014 06:04
Show Gist options
  • Save benkolera/8515658 to your computer and use it in GitHub Desktop.
Save benkolera/8515658 to your computer and use it in GitHub Desktop.
Does this exist in either the errors or either package?
recoverEitherT :: Monad m => (e -> EitherT e m a) -> EitherT e m a -> EitherT e m a
recoverEitherT lf et = EitherT $ runEitherT et >>= (runEitherT . either lf right)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment