1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 05:27:08 +03:00

Document rethrowing.

This commit is contained in:
Patrick Thomson 2019-05-15 18:28:21 -04:00
parent e421dbeb20
commit 0197e40f38

View File

@ -116,5 +116,6 @@ findFiles dir exts paths = send (FindFiles dir exts paths pure)
write :: (Member Files sig, Carrier sig m) => Destination -> B.Builder -> m ()
write dest builder = send (Write dest builder (pure ()))
-- | Catch exceptions thrown in 'IO' and rethrow them in an 'Error' effect.
rethrowing :: (Member Catch sig, Member (Error SomeException) sig, Carrier sig m) => m a -> m a
rethrowing act = act `catchSync` (throwError @SomeException)