diff options
Diffstat (limited to 'src/compiler/GF/Infra/UseIO.hs')
| -rw-r--r-- | src/compiler/GF/Infra/UseIO.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/GF/Infra/UseIO.hs b/src/compiler/GF/Infra/UseIO.hs index 14120d811..ad0c75fd5 100644 --- a/src/compiler/GF/Infra/UseIO.hs +++ b/src/compiler/GF/Infra/UseIO.hs @@ -34,8 +34,9 @@ import System.CPUTime --import System.Cmd import Text.Printf --import Control.Applicative(Applicative(..)) -import Control.Monad +import Control.Monad(when,liftM,foldM) import Control.Monad.Trans(MonadIO(..)) +import Control.Monad.State(StateT,lift) import Control.Exception(evaluate) --putIfVerb :: MonadIO io => Options -> String -> io () @@ -201,6 +202,13 @@ instance Output IOE where putStrLnE = liftIO . putStrLnE putStrE = liftIO . putStrE -} + +instance Output m => Output (StateT s m) where + ePutStr = lift . ePutStr + ePutStrLn = lift . ePutStrLn + putStrE = lift . putStrE + putStrLnE = lift . putStrLnE + --putPointE :: Verbosity -> Options -> String -> IO a -> IO a putPointE v opts msg act = do when (verbAtLeast opts v) $ putStrE msg |
