git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Switch to ExceptT and transformers/mtl 0.4.*
commite005ea016ff99a53892f7af4e273f780eaec30d7 authorHarry Garrood <harry@garrood.me> dateThu 19 Feb 2015, 21:49 (12 years ago) parent2cb85f6
3 files changed+9−9
psc-make/Main.hs+4−4 psci/Main.hs+4−4 purescript.cabal+1−1
psc-make/Main.hs+4−4
@@ -17,7 +17,7 @@
1717module Main where
1818
1919import Control.Applicative
20−import Control.Monad.Error
20+import Control.Monad.Except
2121import Control.Monad.Reader
2222
2323import 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
5858runMake :: 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
6161makeIO :: 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
6464instance P.MonadMake Make where
6565 getTimestamp path = makeIO $ do
psci/Main.hs+4−4
@@ -31,7 +31,7 @@ import qualified Data.Map as M
3131
3232import Control.Applicative
3333import Control.Monad
34−import Control.Monad.Error (ErrorT(..), MonadError)
34+import Control.Monad.Except (ExceptT(..), MonadError, runExceptT)
3535import Control.Monad.Reader (MonadReader, ReaderT, runReaderT)
3636import Control.Monad.Trans.Class
3737import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
@@ -325,14 +325,14 @@ newtype PSCI a = PSCI { runPSCI :: InputT (StateT PSCiState IO) a } deriving (Fu
325325psciIO :: IO a -> PSCI a
326326psciIO 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
331331runMake :: Make a -> IO (Either String a)
332−runMake = runErrorT . flip runReaderT options . unMake
332+runMake = runExceptT . flip runReaderT options . unMake
333333
334334makeIO :: 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
337337instance P.MonadMake Make where
338338 getTimestamp path = makeIO $ do
purescript.cabal+1−1
@@ -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,