tz 0.1.3.5 → 0.1.3.6
raw patch · 13 files changed
+58/−49 lines, 13 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −test-frameworkdep −test-framework-hunitdep −test-framework-quickcheck2dep ~bytestringdep ~containersdep ~criterionnew-uploader
Dependencies added: tasty, tasty-hunit, tasty-quickcheck, tasty-th
Dependencies removed: test-framework, test-framework-hunit, test-framework-quickcheck2, test-framework-th
Dependency ranges changed: bytestring, containers, criterion, data-default, template-haskell, time, vector
Files
- Data/Time/Zones.hs +1/−1
- Data/Time/Zones/All.hs +1/−1
- Data/Time/Zones/Internal.hs +1/−1
- Data/Time/Zones/Internal/CoerceTH.hs +10/−2
- Data/Time/Zones/Read.hs +1/−1
- Data/Time/Zones/TH.hs +1/−1
- Data/Time/Zones/Types.hs +1/−1
- stack.yaml +1/−4
- tests/testAll.hs +2/−3
- tests/testTH.hs +2/−3
- tests/testTZ.hs +2/−3
- tests/testTZSys.hs +11/−5
- tz.cabal +24/−23
Data/Time/Zones.hs view
@@ -2,7 +2,7 @@ Module : Data.Time.Zones Copyright : (C) 2014 Mihaly Barasz License : Apache-2.0, see LICENSE-Maintainer : Mihaly Barasz <klao@nilcons.com>+Maintainer : Janus Troelsen <ysangkok@gmail.com> Stability : experimental -}
Data/Time/Zones/All.hs view
@@ -2,7 +2,7 @@ Module : Data.Time.Zones.All Copyright : (C) 2014 Mihaly Barasz License : Apache-2.0, see LICENSE-Maintainer : Mihaly Barasz <klao@nilcons.com>+Maintainer : Janus Troelsen <ysangkok@gmail.com> Stability : experimental -}
Data/Time/Zones/Internal.hs view
@@ -2,7 +2,7 @@ Module : Data.Time.Zones.Internal Copyright : (C) 2014 Mihaly Barasz License : Apache-2.0, see LICENSE-Maintainer : Mihaly Barasz <klao@nilcons.com>+Maintainer : Janus Troelsen <ysangkok@gmail.com> Stability : experimental -}
Data/Time/Zones/Internal/CoerceTH.hs view
@@ -2,7 +2,7 @@ Module : Data.Time.Zones.Internal.CoerceTH Copyright : (C) 2014 Mihaly Barasz License : Apache-2.0, see LICENSE-Maintainer : Mihaly Barasz <klao@nilcons.com>+Maintainer : Janus Troelsen <ysangkok@gmail.com> Stability : experimental -} @@ -31,6 +31,14 @@ constructNewType :: Name -> Q Exp constructNewType newTy = ConE `fmap` getNewTypeCon newTy +mkConP :: Name -> [Pat] -> Pat+mkConP name pats =+#if MIN_VERSION_template_haskell(2,18,0)+ ConP name [] pats+#else+ ConP name pats+#endif+ destructNewType :: Name -> Q Exp destructNewType newTy = do con <- getNewTypeCon newTy@@ -39,4 +47,4 @@ return $ LamE [VarP lamV] (CaseE (VarE lamV) [- Match (ConP con [VarP patV]) (NormalB (VarE patV)) []])+ Match (mkConP con [VarP patV]) (NormalB (VarE patV)) []])
Data/Time/Zones/Read.hs view
@@ -2,7 +2,7 @@ Module : Data.Time.Zones.Read Copyright : (C) 2014 Mihaly Barasz License : Apache-2.0, see LICENSE-Maintainer : Mihaly Barasz <klao@nilcons.com>+Maintainer : Janus Troelsen <ysangkok@gmail.com> Stability : experimental -}
Data/Time/Zones/TH.hs view
@@ -2,7 +2,7 @@ -- Module : Data.Time.Zones.TH -- Copyright : (C) 2014 Mihaly Barasz -- License : Apache-2.0, see LICENSE--- Maintainer : Mihaly Barasz <klao@nilcons.com>+-- Maintainer : Janus Troelsen <ysangkok@gmail.com> -- Stability : experimental -- -- /Example usage:/
Data/Time/Zones/Types.hs view
@@ -2,7 +2,7 @@ Module : Data.Time.Zones.Types Copyright : (C) 2014 Mihaly Barasz License : Apache-2.0, see LICENSE-Maintainer : Mihaly Barasz <klao@nilcons.com>+Maintainer : Janus Troelsen <ysangkok@gmail.com> Stability : experimental -}
stack.yaml view
@@ -1,7 +1,7 @@ # For more information, see: https://docs.haskellstack.org/en/stable/yaml_configuration/ # Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)-resolver: lts-9.21+resolver: lts-15.13 # Local packages, usually specified by relative directory name packages:@@ -9,9 +9,6 @@ # Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3) # extra-deps: []-extra-deps:-- ../haskell-tzdata-# - tzdata-0.2.20201021.0 # Override default flag values for local packages and extra-deps # flags: {}
tests/testAll.hs view
@@ -3,9 +3,8 @@ import Data.Time.Zones import Data.Time.Zones.All-import Test.Framework.Providers.HUnit-import Test.Framework.TH-import Test.HUnit hiding (Test, assert)+import Test.Tasty.HUnit+import Test.Tasty.TH case_Budapest_is_Budapest :: IO () case_Budapest_is_Budapest = do
tests/testTH.hs view
@@ -2,9 +2,8 @@ import Data.Time.Zones import Data.Time.Zones.TH-import Test.Framework.Providers.HUnit-import Test.Framework.TH-import Test.HUnit hiding (Test, assert)+import Test.Tasty.HUnit+import Test.Tasty.TH tzBudapest :: TZ tzBudapest = $(includeTZFromDB "Europe/Budapest")
tests/testTZ.hs view
@@ -5,9 +5,8 @@ import Data.Time import Data.Time.Zones-import Test.Framework.Providers.HUnit-import Test.Framework.TH-import Test.HUnit hiding (Test, assert)+import Test.Tasty.TH+import Test.Tasty.HUnit case_utcTZ_is_utc = timeZoneForPOSIX utcTZ 0 @?= utc
tests/testTZSys.hs view
@@ -9,19 +9,25 @@ import Data.Time import Data.Time.Clock.POSIX import Data.Time.Zones+import Data.Time.Zones.Read (pathForSystemTZ) import System.Environment import System.IO.Unsafe-import Test.Framework.Providers.QuickCheck2-import Test.Framework.TH-import Test.HUnit hiding (Test, assert)-import Test.QuickCheck+import Test.Tasty.HUnit+import Test.Tasty.TH+import Test.Tasty.QuickCheck import Test.QuickCheck.Monadic foreign import ccall safe "time.h tzset" c_tzset :: IO () setupTZ :: String -> IO TZ setupTZ zoneName = do- setEnv "TZ" zoneName+ -- tzset(3) doesn't necessarily understand TZDIR, since it is+ -- not mandated by POSIX. To avoid trouble with non-glibc+ -- libc implementations (musl, libSystem, ...) we set TZ+ -- to an absolute path (with a leading ':') which all+ -- POSIX-conforming implementations must support.+ tzPath <- pathForSystemTZ zoneName+ setEnv "TZ" $ ":" ++ tzPath c_tzset loadSystemTZ zoneName
tz.cabal view
@@ -1,15 +1,15 @@ Name: tz-Version: 0.1.3.5+Version: 0.1.3.6 License: Apache-2.0 License-File: LICENSE Author: Mihaly Barasz, Gergely Risko-Maintainer: Mihaly Barasz <klao@nilcons.com>, Gergely Risko <errge@nilcons.com>+Maintainer: Janus Troelsen <ysangkok@gmail.com> Cabal-Version: >= 1.10 Build-Type: Simple Category: Data Stability: experimental-Homepage: https://github.com/nilcons/haskell-tz-Bug-Reports: https://github.com/nilcons/haskell-tz/issues+Homepage: https://github.com/ysangkok/haskell-tz+Bug-Reports: https://github.com/ysangkok/haskell-tz/issues Synopsis: Efficient time zone handling Description: The goal of this package is to provide a library that can read time@@ -31,7 +31,7 @@ Source-Repository head Type: git- Location: https://github.com/nilcons/haskell-tz.git+ Location: https://github.com/ysangkok/haskell-tz.git Flag template-haskell Description: Enable the use of and export Template Haskell@@ -51,11 +51,11 @@ Build-Depends: base >= 4 && < 5, binary >= 0.5 && < 0.11,- bytestring >= 0.9 && < 0.11,+ bytestring >= 0.9 && < 0.12, containers >= 0.5 && < 0.7, data-default >= 0.5 && < 0.8, deepseq >= 1.1 && < 2,- time >= 1.2 && < 1.10,+ time >= 1.2 && < 1.14, tzdata >= 0.1 && < 0.3, vector >= 0.9 && < 0.13 if flag(template-haskell)@@ -63,7 +63,7 @@ Data.Time.Zones.TH, Data.Time.Zones.Internal.CoerceTH Build-Depends:- template-haskell >= 2.6 && < 2.17+ template-haskell >= 2.6 && < 2.19 CPP-Options: -DTZ_TH @@ -77,10 +77,10 @@ tz, base >= 4 && < 5, HUnit >= 1.2 && < 1.7,- test-framework >= 0.4 && < 1,- test-framework-hunit >= 0.2 && < 0.4,- test-framework-th >= 0.2 && < 0.4,- time >= 1.2 && < 1.10+ tasty,+ tasty-hunit,+ tasty-th,+ time >= 1.2 && < 1.14 Test-Suite testsSys Default-Language: Haskell2010@@ -95,10 +95,11 @@ base >= 4 && < 5, HUnit >= 1.2 && < 1.7, QuickCheck >= 2.4 && < 3,- test-framework >= 0.4 && < 1,- test-framework-quickcheck2 >= 0.2 && < 0.4,- test-framework-th >= 0.2 && < 0.4,- time >= 1.2 && < 1.10+ tasty,+ tasty-hunit,+ tasty-th,+ tasty-quickcheck,+ time >= 1.2 && < 1.14 Test-Suite th-test Default-Language: Haskell2010@@ -112,9 +113,9 @@ tz, base >= 4 && < 5, HUnit >= 1.2 && < 1.7,- test-framework >= 0.4 && < 1,- test-framework-hunit >= 0.2 && < 0.4,- test-framework-th >= 0.2 && < 0.4+ tasty,+ tasty-hunit,+ tasty-th Test-Suite test-all Default-Language: Haskell2010@@ -127,9 +128,9 @@ tzdata, base >= 4 && < 5, HUnit >= 1.2 && < 1.7,- test-framework >= 0.4 && < 1,- test-framework-hunit >= 0.2 && < 0.4,- test-framework-th >= 0.2 && < 0.4+ tasty,+ tasty-hunit,+ tasty-th Benchmark bench Default-Language: Haskell2010@@ -141,7 +142,7 @@ tz, base >= 4 && < 5, criterion >= 0.8 && < 1.6,- time >= 1.2 && < 1.10,+ time >= 1.2 && < 1.14, timezone-olson, timezone-series