on master help sign in
Remove old-locale flag
commit88a4dd989fd4553c0140258ddd49ad36bac8e1fc authorOleg Grenrus <oleg.grenrus@iki.fi> dateMon 6 Jun 2016, 20:21 (10 years ago) parented2162a
3 files changed+4−34
aeson.cabal+3−17 benchmarks/aeson-benchmarks.cabal−11 tests/UnitTests.hs+1−6
aeson.cabal+3−17
@@ -58,12 +58,6 @@ flag developer
5858 default: False
5959 manual: True
6060
61−flag old-locale
62− description: If false then depend on time >= 1.5.
63− .
64− If true then depend on time < 1.5 together with old-locale.
65− default: False
66−
6761library
6862 default-language: Haskell2010
6963
@@ -93,7 +87,6 @@ library
9387 attoparsec >= 0.13.0.1,
9488 base >= 4.5 && < 5,
9589 base-compat >= 0.9.1 && <0.10,
96− time-locale-compat >=0.1.1 && <0.2,
9790 bytestring >= 0.10.4.0,
9891 containers,
9992 deepseq,
@@ -104,6 +97,8 @@ library
10497 tagged >=0.8.3 && <0.9,
10598 template-haskell >= 2.7,
10699 text >= 1.1.1.0,
100+ time,
101+ time-locale-compat >=0.1.1 && <0.2,
107102 unordered-containers >= 0.2.5.0,
108103 vector >= 0.8
109104
@@ -118,11 +113,6 @@ library
118113 -- `Numeric.Natural` is available in base only since GHC 7.10 / base 4.8
119114 build-depends: nats >=1 && <1.2
120115
121− if flag(old-locale)
122− build-depends: time < 1.5, old-locale
123− else
124− build-depends: time >= 1.5
125−
126116 if flag(developer)
127117 ghc-options: -Werror
128118 ghc-prof-options: -auto-all
@@ -171,6 +161,7 @@ test-suite tests
171161 test-framework-quickcheck2,
172162 text,
173163 time,
164+ time-locale-compat,
174165 unordered-containers,
175166 vector,
176167 quickcheck-instances >=0.3.12
@@ -178,11 +169,6 @@ test-suite tests
178169 if !impl(ghc >= 8.0)
179170 build-depends: semigroups >= 0.16.1 && < 0.19
180171
181− if flag(old-locale)
182− build-depends: time < 1.5, old-locale
183− else
184− build-depends: time >= 1.5
185−
186172 if !impl(ghc >= 7.10)
187173 build-depends: nats >=1 && <1.2
188174
benchmarks/aeson-benchmarks.cabal−11
@@ -4,12 +4,6 @@ build-type: Simple
44
55cabal-version: >=1.8
66
7−flag old-locale
8− description: If false then depend on time >= 1.5.
9− .
10− If true then depend on time < 1.5 together with old-locale.
11− default: False
12−
137library
148 hs-source-dirs: .. .
159
@@ -64,11 +58,6 @@ library
6458 -- `Data.Semigroup` is available in base only since GHC 8.0 / base 4.9
6559 build-depends: semigroups >= 0.16.1 && < 0.19
6660
67− if flag(old-locale)
68− build-depends: time < 1.5, old-locale
69− else
70− build-depends: time >= 1.5
71−
7261 include-dirs: ../include
7362
7463 ghc-options: -O2 -Wall
tests/UnitTests.hs+1−6
@@ -23,6 +23,7 @@ import Data.Sequence (Seq)
2323import Data.Tagged (Tagged(..))
2424import Data.Time (UTCTime)
2525import Data.Time.Format (parseTime)
26+import Data.Time.Locale.Compat (defaultTimeLocale)
2627import GHC.Generics (Generic)
2728import Test.Framework (Test, testGroup)
2829import Test.Framework.Providers.HUnit (testCase)
@@ -34,12 +35,6 @@ import qualified Data.Text.Lazy.Encoding as TLE
3435import qualified Data.Text.Lazy as LT
3536import qualified Data.Text.Lazy.Encoding as LT
3637
37−#if MIN_VERSION_time(1,5,0)
38−import Data.Time.Format (defaultTimeLocale)
39−#else
40−import System.Locale (defaultTimeLocale)
41−#endif
42−
4338tests :: Test
4439tests = testGroup "unit" [
4540 testGroup "camelCase" [