utility functions

This commit is contained in:
Stephen Diehl
2016-12-10 16:01:47 +00:00
parent 00c2fce11a
commit 6cb17bb94b
8 changed files with 159 additions and 2 deletions
+16 -2
View File
@@ -1,5 +1,5 @@
Exception Handling
==================
Exceptions
==========
#### MonadError
@@ -61,6 +61,20 @@ throwSTM :: Exception e => e -> STM a
throwError :: MonadError e m => e -> m a
```
#### Utilities
```haskell
hush :: Alternative m => Either e a -> m a
```
```haskell
note :: (MonadError e m, Applicative m) => e -> Maybe a -> m a
```
```haskell
tryIO :: MonadIO m => IO a -> ExceptT IOException m a
```
#### Fatal Errors
```haskell