Skip to content

Instantly share code, notes, and snippets.

@dminuoso dminuoso/f.hs
Created May 17, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.