@@ -43,9 +43,10 @@ import Control.Applicative
44import Control.Monad
44import Control.Monad
45import Control.Monad.Error.Class (MonadError(..))
45import Control.Monad.Error.Class (MonadError(..))
46+import Control.Monad.Writer.Class (MonadWriter(..))
46import Control.Monad.Trans.Except
47import Control.Monad.Trans.Except
47import Control.Monad.Reader
48import Control.Monad.Reader
48−import Control.Monad.Writer.Strict
49+import Control.Monad.Logger
49import Control.Monad.Supply
50import Control.Monad.Supply
50import Control.Monad.Base (MonadBase(..))
51import Control.Monad.Base (MonadBase(..))
51import Control.Monad.Trans.Control (MonadBaseControl(..))
52import Control.Monad.Trans.Control (MonadBaseControl(..))
@@ -284,22 +285,22 @@ importPrim = addDefaultImport (ModuleName [ProperName C.prim])
285-- A monad for running make actions
286-- A monad for running make actions
287−newtype Make a = Make { unMake :: ReaderT Options (WriterT MultipleErrors (ExceptT MultipleErrors IO)) a }
288+newtype Make a = Make { unMake :: ReaderT Options (ExceptT MultipleErrors (Logger MultipleErrors)) a }
288 deriving (Functor, Applicative, Monad, MonadIO, MonadError MultipleErrors, MonadWriter MultipleErrors, MonadReader Options)
289 deriving (Functor, Applicative, Monad, MonadIO, MonadError MultipleErrors, MonadWriter MultipleErrors, MonadReader Options)
290instance MonadBase IO Make where
291instance MonadBase IO Make where
291 liftBase = liftIO
292 liftBase = liftIO
293instance MonadBaseControl IO Make where
294instance MonadBaseControl IO Make where
294− type StM Make a = Either MultipleErrors (a, MultipleErrors)
295+ type StM Make a = Either MultipleErrors a
295 liftBaseWith f = Make $ liftBaseWith $ \q -> f (q . unMake)
296 liftBaseWith f = Make $ liftBaseWith $ \q -> f (q . unMake)
296 restoreM = Make . restoreM
297 restoreM = Make . restoreM
299-- Execute a 'Make' monad, returning either errors, or the result of the compile plus any warnings.
300-- Execute a 'Make' monad, returning either errors, or the result of the compile plus any warnings.
301−runMake :: Options -> Make a -> IO (Either MultipleErrors (a, MultipleErrors))
302+runMake :: Options -> Make a -> IO (Either MultipleErrors a, MultipleErrors)
302−runMake opts = runExceptT . runWriterT . flip runReaderT opts . unMake
303+runMake opts = runLogger' . runExceptT . flip runReaderT opts . unMake
304makeIO :: (IOError -> ErrorMessage) -> IO a -> Make a
305makeIO :: (IOError -> ErrorMessage) -> IO a -> Make a
305makeIO f io = do
306makeIO f io = do