utility functions
This commit is contained in:
+16
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user