git.iko.soy/distributed-process
on master help sign in
Add compatibility with ghc-7.10: support old-locale removal.
commit341715577f3eac212b1206a777b1b69f455c9c8b authorAlexander Vershilov <alexander.vershilov@gmail.com> dateWed 1 Apr 2015, 14:55 (12 years ago) parentd87528c
3 files changed+19−2
distributed-process.cabal+11−2 src/Control/Distributed/Process/Internal/Primitives.hs+4 src/Control/Distributed/Process/Management/Internal/Trace/Tracer.hs+4
distributed-process.cabal+11−2
@@ -38,6 +38,13 @@ flag prof
3838 description: Compiling with profiling enabled
3939 default: False
4040
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+
4148Library
4249 Build-Depends: base >= 4.4 && < 5,
4350 binary >= 0.6.3 && < 0.8,
@@ -48,8 +55,6 @@ Library
4855 mtl >= 2.0 && < 2.3,
4956 data-accessor >= 0.2 && < 0.3,
5057 bytestring >= 0.9 && < 0.11,
51− old-locale >= 1.0 && < 1.1,
52− time >= 1.2 && < 1.5,
5358 random >= 1.0 && < 1.2,
5459 ghc-prim >= 0.2 && < 0.4,
5560 distributed-static >= 0.2 && < 0.4,
@@ -90,6 +95,10 @@ Library
9095 else
9196 Build-Depends: containers >= 0.4 && < 0.6,
9297 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
93102 if flag(th)
94103 if impl(ghc <= 7.4.2)
95104 Build-Depends: template-haskell >= 2.7 && < 2.8
src/Control/Distributed/Process/Internal/Primitives.hs+4
@@ -124,7 +124,11 @@ import Prelude hiding (catch)
124124import Data.Binary (decode)
125125import Data.Time.Clock (getCurrentTime)
126126import Data.Time.Format (formatTime)
127+#if MIN_VERSION_time(1,5,0)
128+import Data.Time.Format (defaultTimeLocale)
129+#else
127130import System.Locale (defaultTimeLocale)
131+#endif
128132import System.Timeout (timeout)
129133import Control.Monad (when)
130134import Control.Monad.Reader (ask)
src/Control/Distributed/Process/Management/Internal/Trace/Tracer.hs+4
@@ -88,7 +88,11 @@ import System.IO
8888 , hPutStrLn
8989 , hSetBuffering
9090 )
91+#if MIN_VERSION_time(1,5,0)
92+import Data.Time.Format (defaultTimeLocale)
93+#else
9194import System.Locale (defaultTimeLocale)
95+#endif
9296import System.Mem.Weak
9397 ( Weak
9498 )