summaryrefslogtreecommitdiff
path: root/src/Propellor/Exception.hs
diff options
context:
space:
mode:
authorFélix Sipma2016-06-20 16:30:24 +0200
committerFélix Sipma2016-06-20 16:30:24 +0200
commite0471e95ea3f3429eab57378712aab7e9794acb5 (patch)
tree7ecd2e0b5cb92e72dc089cf7bc631d19aea7e107 /src/Propellor/Exception.hs
parentc5a1503c0c2eb1974e6d3491db61ed75ce2ddd61 (diff)
Exception: prevent use of Functor
Diffstat (limited to 'src/Propellor/Exception.hs')
-rw-r--r--src/Propellor/Exception.hs2
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)