-
-
Save dminuoso/c7c96ecd3ebc8405fdcc062f6608c227 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
catchesHandler :: [Handler a] -> SomeException -> IO a | |
catchesHandler handlers e = foldr tryHandler (throw e) handlers | |
where tryHandler (Handler handler) res | |
= case fromException e of | |
Just e' -> handler e' | |
Nothing -> res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment