From c5a1503c0c2eb1974e6d3491db61ed75ce2ddd61 Mon Sep 17 00:00:00 2001 From: FĂ©lix Sipma Date: Mon, 20 Jun 2016 16:25:34 +0200 Subject: Exception: prevent use of Control.Applicative (ghc compatibility) --- src/Propellor/Exception.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Propellor/Exception.hs') diff --git a/src/Propellor/Exception.hs b/src/Propellor/Exception.hs index b297a740..49977370 100644 --- a/src/Propellor/Exception.hs +++ b/src/Propellor/Exception.hs @@ -10,7 +10,6 @@ import Utility.Exception import Control.Exception (AsyncException) import Control.Monad.Catch import Control.Monad.IO.Class (MonadIO) -import Control.Applicative import Prelude -- | Catches all exceptions (except for `StopPropellorException` and @@ -30,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 = (Right <$> a) `catchPropellor'` (pure . Left) +tryPropellor a = fmap Right a `catchPropellor'` (return . Left) -- cgit v1.2.3