Skip to content

Commit e005ea0

Browse files
committed
Switch to ExceptT and transformers/mtl 0.4.*
1 parent 2cb85f6 commit e005ea0

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

psc-make/Main.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
module Main where
1818

1919
import Control.Applicative
20-
import Control.Monad.Error
20+
import Control.Monad.Except
2121
import Control.Monad.Reader
2222

2323
import Data.Version (showVersion)
@@ -52,14 +52,14 @@ readInput InputOptions{..} = do
5252
content <- forM ioInputFiles $ \inFile -> (Right inFile, ) <$> readFile inFile
5353
return (if ioNoPrelude then content else (Left P.RebuildNever, P.prelude) : content)
5454

55-
newtype Make a = Make { unMake :: ReaderT (P.Options P.Make) (ErrorT String IO) a }
55+
newtype Make a = Make { unMake :: ReaderT (P.Options P.Make) (ExceptT String IO) a }
5656
deriving (Functor, Applicative, Monad, MonadIO, MonadError String, MonadReader (P.Options P.Make))
5757

5858
runMake :: P.Options P.Make -> Make a -> IO (Either String a)
59-
runMake opts = runErrorT . flip runReaderT opts . unMake
59+
runMake opts = runExceptT . flip runReaderT opts . unMake
6060

6161
makeIO :: IO a -> Make a
62-
makeIO = Make . lift . ErrorT . fmap (either (Left . show) Right) . tryIOError
62+
makeIO = Make . lift . ExceptT . fmap (either (Left . show) Right) . tryIOError
6363

6464
instance P.MonadMake Make where
6565
getTimestamp path = makeIO $ do

psci/Main.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import qualified Data.Map as M
3131

3232
import Control.Applicative
3333
import Control.Monad
34-
import Control.Monad.Error (ErrorT(..), MonadError)
34+
import Control.Monad.Except (ExceptT(..), MonadError, runExceptT)
3535
import Control.Monad.Reader (MonadReader, ReaderT, runReaderT)
3636
import Control.Monad.Trans.Class
3737
import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
@@ -325,14 +325,14 @@ newtype PSCI a = PSCI { runPSCI :: InputT (StateT PSCiState IO) a } deriving (Fu
325325
psciIO :: IO a -> PSCI a
326326
psciIO io = PSCI . lift $ lift io
327327

328-
newtype Make a = Make { unMake :: ReaderT (P.Options P.Make) (ErrorT String IO) a }
328+
newtype Make a = Make { unMake :: ReaderT (P.Options P.Make) (ExceptT String IO) a }
329329
deriving (Functor, Applicative, Monad, MonadError String, MonadReader (P.Options P.Make))
330330

331331
runMake :: Make a -> IO (Either String a)
332-
runMake = runErrorT . flip runReaderT options . unMake
332+
runMake = runExceptT . flip runReaderT options . unMake
333333

334334
makeIO :: IO a -> Make a
335-
makeIO = Make . lift . ErrorT . fmap (either (Left . show) Right) . tryIOError
335+
makeIO = Make . lift . ExceptT . fmap (either (Left . show) Right) . tryIOError
336336

337337
instance P.MonadMake Make where
338338
getTimestamp path = makeIO $ do

purescript.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ library
3131
filepath -any,
3232
mtl >= 2.1.0 && < 2.3.0,
3333
parsec -any,
34-
transformers >= 0.3 && < 0.5,
34+
transformers >= 0.4.0 && < 0.5,
3535
utf8-string >= 1 && < 2,
3636
pattern-arrows >= 0.0.2 && < 0.1,
3737
monad-unify >= 0.2.2 && < 0.3,

0 commit comments

Comments
 (0)