diff options
| author | hallgren <hallgren@chalmers.se> | 2015-02-16 15:05:06 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-02-16 15:05:06 +0000 |
| commit | 54ae70a81e338fd05397ab22890b3ca36284be54 (patch) | |
| tree | c6757f0c7f0d90a39329a2180ad1df33a99e384b /src/compiler | |
| parent | 2b8fe8ea7a4f40445889b80bd7f737d0078e7598 (diff) | |
Changes for compatibility with ghc-7.10-rc2
2 modules: Name clashes caused by Applicative-Monad change in Prelude
2 modules: Ambiguities caused by Foldable/Traversable in Prelude
2 modules: Backwards incompatible changes in time-1.5 for defaultTimeLocale
9 modules: {-# LANGUAGE FlexibleContexts #-} (because GHC checks inferred types
now, in addition to explicitly given type signatures)
Also silenced warnings about tab characters in source files.
Diffstat (limited to 'src/compiler')
| -rw-r--r-- | src/compiler/GF/Compile/CFGtoPGF.hs | 1 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/Compute/Predef.hs | 7 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/GrammarToPGF.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/PGFtoPython.hs | 1 | ||||
| -rw-r--r-- | src/compiler/GF/Compile/SubExOpt.hs | 1 | ||||
| -rw-r--r-- | src/compiler/GF/Grammar/Printer.hs | 1 | ||||
| -rw-r--r-- | src/compiler/GF/Infra/CheckM.hs | 2 | ||||
| -rw-r--r-- | src/compiler/GF/Server.hs | 4 | ||||
| -rw-r--r-- | src/compiler/GF/Speech/SLF.hs | 1 |
9 files changed, 15 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/CFGtoPGF.hs b/src/compiler/GF/Compile/CFGtoPGF.hs index aebf918bb..5f8ddebb6 100644 --- a/src/compiler/GF/Compile/CFGtoPGF.hs +++ b/src/compiler/GF/Compile/CFGtoPGF.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE FlexibleContexts #-} module GF.Compile.CFGtoPGF (cf2pgf) where import GF.Grammar.CFG diff --git a/src/compiler/GF/Compile/Compute/Predef.hs b/src/compiler/GF/Compile/Compute/Predef.hs index ba215ba30..768dc2e6b 100644 --- a/src/compiler/GF/Compile/Compute/Predef.hs +++ b/src/compiler/GF/Compile/Compute/Predef.hs @@ -93,7 +93,7 @@ delta f vs = Occurs -> fromNonExist vs PFalse (ap2 occurs) ToUpper -> fromNonExist vs NonExist (ap1 (map toUpper)) ToLower -> fromNonExist vs NonExist (ap1 (map toLower)) - IsUpper -> fromNonExist vs PFalse (ap1 (all isUpper)) + IsUpper -> fromNonExist vs PFalse (ap1 (all' isUpper)) Length -> fromNonExist vs (0::Int) (ap1 (length::String->Int)) Plus -> ap2 ((+)::Int->Int->Int) EqInt -> ap2 ((==)::Int->Int->Bool) @@ -131,8 +131,9 @@ delta f vs = tk i s = take (max 0 (length s - i)) s :: String dp i s = drop (max 0 (length s - i)) s :: String - occur s t = isInfixOf (s::String) t - occurs s t = any (`elem` t) (s::String) + occur s t = isInfixOf (s::String) (t::String) + occurs s t = any (`elem` (t::String)) (s::String) + all' = all :: (a->Bool) -> [a] -> Bool boolV b = VCApp (cPredef,if b then cPTrue else cPFalse) [] diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index ba400bc82..989b651bb 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE BangPatterns, FlexibleContexts #-} module GF.Compile.GrammarToPGF (mkCanon2pgf) where --import GF.Compile.Export diff --git a/src/compiler/GF/Compile/PGFtoPython.hs b/src/compiler/GF/Compile/PGFtoPython.hs index 01b6437ac..10ff5a7cc 100644 --- a/src/compiler/GF/Compile/PGFtoPython.hs +++ b/src/compiler/GF/Compile/PGFtoPython.hs @@ -6,6 +6,7 @@ -- exports a GF grammar into a Python module ----------------------------------------------------------------------------- +{-# LANGUAGE FlexibleContexts #-} module GF.Compile.PGFtoPython (pgf2python) where import PGF(showCId) diff --git a/src/compiler/GF/Compile/SubExOpt.hs b/src/compiler/GF/Compile/SubExOpt.hs index d1c7842ad..09ec3e568 100644 --- a/src/compiler/GF/Compile/SubExOpt.hs +++ b/src/compiler/GF/Compile/SubExOpt.hs @@ -21,6 +21,7 @@ -- ----------------------------------------------------------------------------- +{-# LANGUAGE FlexibleContexts #-} module GF.Compile.SubExOpt (subexpModule,unsubexpModule) where import GF.Grammar.Grammar diff --git a/src/compiler/GF/Grammar/Printer.hs b/src/compiler/GF/Grammar/Printer.hs index 0bf6ce504..341ff3863 100644 --- a/src/compiler/GF/Grammar/Printer.hs +++ b/src/compiler/GF/Grammar/Printer.hs @@ -7,6 +7,7 @@ --
-----------------------------------------------------------------------------
+{-# LANGUAGE FlexibleContexts #-}
module GF.Grammar.Printer
( -- ** Pretty printing
TermPrintQual(..)
diff --git a/src/compiler/GF/Infra/CheckM.hs b/src/compiler/GF/Infra/CheckM.hs index 43c43ba27..3b6833f0f 100644 --- a/src/compiler/GF/Infra/CheckM.hs +++ b/src/compiler/GF/Infra/CheckM.hs @@ -75,7 +75,7 @@ checkCond s b = if b then return () else checkError s checkWarn :: Message -> Check () checkWarn msg = Check $ \{-ctxt-} (es,ws) -> ((es,("Warning:" <+> msg) : ws),Success ()) -checkWarnings = mapM_ checkWarn +checkWarnings ms = mapM_ checkWarn ms -- | Report a nonfatal (accumulated) error checkAccumError :: Message -> Check () diff --git a/src/compiler/GF/Server.hs b/src/compiler/GF/Server.hs index ce1c1fd0c..34a8c6e57 100644 --- a/src/compiler/GF/Server.hs +++ b/src/compiler/GF/Server.hs @@ -16,7 +16,11 @@ import GF.System.Directory(doesDirectoryExist,doesFileExist,createDirectory, getDirectoryContents,removeFile,removeDirectory, getModificationTime) import Data.Time (getCurrentTime,formatTime) +#if MIN_VERSION_time(1,5,0) +import Data.Time.Format(defaultTimeLocale,rfc822DateFormat) +#else import System.Locale(defaultTimeLocale,rfc822DateFormat) +#endif import System.FilePath(dropExtension,takeExtension,takeFileName,takeDirectory, (</>),makeRelative) #ifndef mingw32_HOST_OS diff --git a/src/compiler/GF/Speech/SLF.hs b/src/compiler/GF/Speech/SLF.hs index d93d1b362..1992baaec 100644 --- a/src/compiler/GF/Speech/SLF.hs +++ b/src/compiler/GF/Speech/SLF.hs @@ -9,6 +9,7 @@ -- ----------------------------------------------------------------------------- +{-# LANGUAGE FlexibleContexts #-} module GF.Speech.SLF (slfPrinter,slfGraphvizPrinter, slfSubPrinter,slfSubGraphvizPrinter) where |
