git.iko.soy/distributed-process
on master help sign in
Add compatibility with ghc-7.10: support old-locale removal.
3417155Alexander Vershilov
distributed-process.cabal+11−2
@@ -38,6 +38,13 @@ flag prof
38 description: Compiling with profiling enabled
38 description: Compiling with profiling enabled
39 default: False
39 default: False
40
40
41+
42+flag old-locale
43+ description: If false then depend on time >= 1.5.
44+ .
45+ If true then depend on time < 1.5 together with old-locale.
46+ default: False
47+
41Library
48Library
42 Build-Depends: base >= 4.4 && < 5,
49 Build-Depends: base >= 4.4 && < 5,
43 binary >= 0.6.3 && < 0.8,
50 binary >= 0.6.3 && < 0.8,
@@ -48,8 +55,6 @@ Library
48 mtl >= 2.0 && < 2.3,
55 mtl >= 2.0 && < 2.3,
49 data-accessor >= 0.2 && < 0.3,
56 data-accessor >= 0.2 && < 0.3,
50 bytestring >= 0.9 && < 0.11,
57 bytestring >= 0.9 && < 0.11,
51− old-locale >= 1.0 && < 1.1,
52− time >= 1.2 && < 1.5,
53 random >= 1.0 && < 1.2,
58 random >= 1.0 && < 1.2,
54 ghc-prim >= 0.2 && < 0.4,
59 ghc-prim >= 0.2 && < 0.4,
55 distributed-static >= 0.2 && < 0.4,
60 distributed-static >= 0.2 && < 0.4,
@@ -90,6 +95,10 @@ Library
90 else
95 else
91 Build-Depends: containers >= 0.4 && < 0.6,
96 Build-Depends: containers >= 0.4 && < 0.6,
92 deepseq >= 1.3.0.1 && < 1.4
97 deepseq >= 1.3.0.1 && < 1.4
98+ if flag(old-locale)
99+ Build-Depends: time < 1.5, old-locale >= 1.0 && <1.1
100+ else
101+ Build-Depends: time >= 1.5
93 if flag(th)
102 if flag(th)
94 if impl(ghc <= 7.4.2)
103 if impl(ghc <= 7.4.2)
95 Build-Depends: template-haskell >= 2.7 && < 2.8
104 Build-Depends: template-haskell >= 2.7 && < 2.8
src/Control/Distributed/Process/Internal/Primitives.hs+4
@@ -124,7 +124,11 @@ import Prelude hiding (catch)
124import Data.Binary (decode)
124import Data.Binary (decode)
125import Data.Time.Clock (getCurrentTime)
125import Data.Time.Clock (getCurrentTime)
126import Data.Time.Format (formatTime)
126import Data.Time.Format (formatTime)
127+#if MIN_VERSION_time(1,5,0)
128+import Data.Time.Format (defaultTimeLocale)
129+#else
127import System.Locale (defaultTimeLocale)
130import System.Locale (defaultTimeLocale)
131+#endif
128import System.Timeout (timeout)
132import System.Timeout (timeout)
129import Control.Monad (when)
133import Control.Monad (when)
130import Control.Monad.Reader (ask)
134import Control.Monad.Reader (ask)
src/Control/Distributed/Process/Management/Internal/Trace/Tracer.hs+4
@@ -88,7 +88,11 @@ import System.IO
88 , hPutStrLn
88 , hPutStrLn
89 , hSetBuffering
89 , hSetBuffering
90 )
90 )
91+#if MIN_VERSION_time(1,5,0)
92+import Data.Time.Format (defaultTimeLocale)
93+#else
91import System.Locale (defaultTimeLocale)
94import System.Locale (defaultTimeLocale)
95+#endif
92import System.Mem.Weak
96import System.Mem.Weak
93 ( Weak
97 ( Weak
94 )
98 )