diff options
| author | hallgren <hallgren@chalmers.se> | 2014-08-13 22:16:18 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-08-13 22:16:18 +0000 |
| commit | cd5193b7e19e7ff5e49cdeafe149fdeec8e19fb0 (patch) | |
| tree | c006a3b453b8b290b09379cf5cb2777421558e70 /src/compiler/GF/Compile | |
| parent | a06351b6250dd456299565f13eba6ed02dd2a07b (diff) | |
Fix warnings in 16 modules, mostly forward compatibility warnings from GHC 7.8
Diffstat (limited to 'src/compiler/GF/Compile')
| -rw-r--r-- | src/compiler/GF/Compile/GeneratePMCFG.hs | 5 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/GetGrammar.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/compiler/GF/Compile/GeneratePMCFG.hs b/src/compiler/GF/Compile/GeneratePMCFG.hs index b8edda00f..e6067c854 100644 --- a/src/compiler/GF/Compile/GeneratePMCFG.hs +++ b/src/compiler/GF/Compile/GeneratePMCFG.hs @@ -36,6 +36,7 @@ import Data.Array.IArray import Data.Array.Unboxed --import Data.Maybe --import Data.Char (isDigit) +import Control.Applicative(Applicative(..)) import Control.Monad import Control.Monad.Identity --import Control.Exception @@ -247,6 +248,10 @@ newtype CnvMonad a = CM {unCM :: SourceGrammar -> ([ProtoFCat],[Symbol]) -> Branch b} +instance Applicative CnvMonad where + pure = return + (<*>) = ap + instance Monad CnvMonad where return a = CM (\gr c s -> c a s) CM m >>= k = CM (\gr c s -> m gr (\a s -> unCM (k a) gr c s) s) diff --git a/src/compiler/GF/Compile/GetGrammar.hs b/src/compiler/GF/Compile/GetGrammar.hs index 4647cfcb4..e10081cff 100644 --- a/src/compiler/GF/Compile/GetGrammar.hs +++ b/src/compiler/GF/Compile/GetGrammar.hs @@ -30,7 +30,7 @@ import GF.Compile.ReadFiles(parseSource,lift) import qualified Data.ByteString.Char8 as BS import Data.Char(isAscii) import Control.Monad (foldM,when,unless) -import System.Cmd (system) +import System.Process (system) import System.Directory(removeFile,getCurrentDirectory) import System.FilePath(makeRelative) diff --git a/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs b/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs index 67f6e5fda..0701b23f4 100644 --- a/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs +++ b/src/compiler/GF/Compile/TypeCheck/ConcreteNew.hs @@ -9,6 +9,8 @@ import GF.Compile.TypeCheck.Primitives import GF.Infra.CheckM --import GF.Infra.UseIO import GF.Data.Operations +import Control.Applicative(Applicative(..)) +import Control.Monad(ap) import GF.Text.Pretty import Data.List (nub, (\\), tails) @@ -467,6 +469,10 @@ instance Monad TcM where TcFail msgs -> TcFail msgs) fail = tcError . pp +instance Applicative TcM where + pure = return + (<*>) = ap + instance Functor TcM where fmap f g = TcM (\ms msgs -> case unTcM g ms msgs of TcOk x ms msgs -> TcOk (f x) ms msgs |
