diff options
| author | Félix Sipma <felix.sipma@no-log.org> | 2016-06-20 16:30:24 +0200 |
|---|---|---|
| committer | Félix Sipma <felix.sipma@no-log.org> | 2016-06-20 16:30:24 +0200 |
| commit | e0471e95ea3f3429eab57378712aab7e9794acb5 (patch) | |
| tree | 7ecd2e0b5cb92e72dc089cf7bc631d19aea7e107 /src/Propellor/Exception.hs | |
| parent | c5a1503c0c2eb1974e6d3491db61ed75ce2ddd61 (diff) | |
Exception: prevent use of Functor
Diffstat (limited to 'src/Propellor/Exception.hs')
| -rw-r--r-- | src/Propellor/Exception.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Exception.hs b/src/Propellor/Exception.hs index 49977370..b62c558a 100644 --- a/src/Propellor/Exception.hs +++ b/src/Propellor/Exception.hs @@ -29,4 +29,4 @@ catchPropellor' a onerr = a `catches` -- | Catches all exceptions (except for `StopPropellorException` and -- `AsyncException`). tryPropellor :: MonadCatch m => m a -> m (Either SomeException a) -tryPropellor a = fmap Right a `catchPropellor'` (return . Left) +tryPropellor a = (return . Right =<< a) `catchPropellor'` (return . Left) |
