From cd5193b7e19e7ff5e49cdeafe149fdeec8e19fb0 Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 13 Aug 2014 22:16:18 +0000 Subject: Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8 --- src/compiler/GF/Infra/SIO.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/compiler/GF/Infra/SIO.hs') diff --git a/src/compiler/GF/Infra/SIO.hs b/src/compiler/GF/Infra/SIO.hs index ff2072987..39c3da489 100644 --- a/src/compiler/GF/Infra/SIO.hs +++ b/src/compiler/GF/Infra/SIO.hs @@ -19,10 +19,11 @@ module GF.Infra.SIO( restricted,restrictedSystem ) where import Prelude hiding (putStrLn,print) -import Control.Monad(liftM) +import Control.Applicative(Applicative(..)) +import Control.Monad(liftM,ap) import System.IO(hPutStrLn,hFlush,stdout) import GF.System.Catch(try) -import System.Cmd(system) +import System.Process(system) import System.Environment(getEnv) import Control.Concurrent.Chan(newChan,writeChan,getChanContents) import qualified System.CPUTime as IO(getCPUTime) @@ -39,6 +40,10 @@ newtype SIO a = SIO {unS::PutStrLn->IO a} instance Functor SIO where fmap = liftM +instance Applicative SIO where + pure = return + (<*>) = ap + instance Monad SIO where return x = SIO (const (return x)) SIO m1 >>= xm2 = SIO $ \ h -> m1 h >>= \ x -> unS (xm2 x) h -- cgit v1.2.3