From e0471e95ea3f3429eab57378712aab7e9794acb5 Mon Sep 17 00:00:00 2001 From: FĂ©lix Sipma Date: Mon, 20 Jun 2016 16:30:24 +0200 Subject: Exception: prevent use of Functor --- src/Propellor/Exception.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor') 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) -- cgit v1.2.3