git.iko.soy/typeable/timezone-olson
on master help sign in
.travis.yml−36
since splitsnapshots
unifiedsplit
@@ -28,42 +28,6 @@ before_cache:
28
28
29matrix:
29matrix:
30 include:
30 include:
31− - compiler: "ghc-7.4.1"
32− # env: TEST=--disable-tests BENCH=--disable-benchmarks
33− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.4.1], sources: [hvr-ghc]}}
34− - compiler: "ghc-7.4.2"
35− # env: TEST=--disable-tests BENCH=--disable-benchmarks
36− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.4.2], sources: [hvr-ghc]}}
37− - compiler: "ghc-7.6.1"
38− # env: TEST=--disable-tests BENCH=--disable-benchmarks
39− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.1], sources: [hvr-ghc]}}
40− - compiler: "ghc-7.6.2"
41− # env: TEST=--disable-tests BENCH=--disable-benchmarks
42− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.2], sources: [hvr-ghc]}}
43− - compiler: "ghc-7.6.3"
44− # env: TEST=--disable-tests BENCH=--disable-benchmarks
45− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}}
46− - compiler: "ghc-7.8.1"
47− # env: TEST=--disable-tests BENCH=--disable-benchmarks
48− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.1], sources: [hvr-ghc]}}
49− - compiler: "ghc-7.8.2"
50− # env: TEST=--disable-tests BENCH=--disable-benchmarks
51− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.2], sources: [hvr-ghc]}}
52− - compiler: "ghc-7.8.3"
53− # env: TEST=--disable-tests BENCH=--disable-benchmarks
54− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.3], sources: [hvr-ghc]}}
55− - compiler: "ghc-7.8.4"
56− # env: TEST=--disable-tests BENCH=--disable-benchmarks
57− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
58− - compiler: "ghc-7.10.1"
59− # env: TEST=--disable-tests BENCH=--disable-benchmarks
60− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.1], sources: [hvr-ghc]}}
61− - compiler: "ghc-7.10.2"
62− # env: TEST=--disable-tests BENCH=--disable-benchmarks
63− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.2], sources: [hvr-ghc]}}
64− - compiler: "ghc-7.10.3"
65− # env: TEST=--disable-tests BENCH=--disable-benchmarks
66− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
67 - compiler: "ghc-8.0.1"
31 - compiler: "ghc-8.0.1"
68 # env: TEST=--disable-tests BENCH=--disable-benchmarks
32 # env: TEST=--disable-tests BENCH=--disable-benchmarks
69 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.1], sources: [hvr-ghc]}}
33 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.1], sources: [hvr-ghc]}}
Data/Time/LocalTime/TimeZone/Olson.hs+2−2
@@ -1,7 +1,7 @@
1-----------------------------------------------------------------------------
1-----------------------------------------------------------------------------
2-- |
2-- |
3-- Module : Data.Time.LocalTime.TimeZone.Olson
3-- Module : Data.Time.LocalTime.TimeZone.Olson
4−-- Copyright : Yitzchak Gale 2010
4+-- Copyright : Yitzchak Gale 2018
5--
5--
6-- Maintainer : Yitzchak Gale <gale@sefer.org>
6-- Maintainer : Yitzchak Gale <gale@sefer.org>
7-- Portability : portable
7-- Portability : portable
@@ -13,7 +13,7 @@
13-- converting the parsed data into @TimeZoneSeries@ and @TimeZone@
13-- converting the parsed data into @TimeZoneSeries@ and @TimeZone@
14-- objects.
14-- objects.
15
15
16−{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.
16+{- Copyright (c) 2018 Yitzchak Gale. All rights reserved.
17For licensing information, see the BSD3-style license in the file
17For licensing information, see the BSD3-style license in the file
18LICENSE that was originally distributed by the author together with
18LICENSE that was originally distributed by the author together with
19this file. -}
19this file. -}
Data/Time/LocalTime/TimeZone/Olson/Parse.hs+2−2
@@ -3,7 +3,7 @@
3-----------------------------------------------------------------------------
3-----------------------------------------------------------------------------
4-- |
4-- |
5-- Module : Data.Time.LocalTime.TimeZone.Olson.Parse
5-- Module : Data.Time.LocalTime.TimeZone.Olson.Parse
6−-- Copyright : Yitzchak Gale 2010
6+-- Copyright : Yitzchak Gale 2018
7--
7--
8-- Maintainer : Yitzchak Gale <gale@sefer.org>
8-- Maintainer : Yitzchak Gale <gale@sefer.org>
9-- Portability : portable
9-- Portability : portable
@@ -14,7 +14,7 @@
14-- <http://www.twinsun.com/tz/tz-link.htm>. Functions are provided for
14-- <http://www.twinsun.com/tz/tz-link.htm>. Functions are provided for
15-- converting the parsed data into 'TimeZoneSeries' objects.
15-- converting the parsed data into 'TimeZoneSeries' objects.
16
16
17−{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.
17+{- Copyright (c) 2018 Yitzchak Gale. All rights reserved.
18For licensing information, see the BSD3-style license in the file
18For licensing information, see the BSD3-style license in the file
19LICENSE that was originally distributed by the author together with
19LICENSE that was originally distributed by the author together with
20this file. -}
20this file. -}
Data/Time/LocalTime/TimeZone/Olson/Render.hs+2−2
@@ -2,7 +2,7 @@
2-----------------------------------------------------------------------------
2-----------------------------------------------------------------------------
3-- |
3-- |
4-- Module : Data.Time.LocalTime.TimeZone.Olson.Render
4-- Module : Data.Time.LocalTime.TimeZone.Olson.Render
5−-- Copyright : Yitzchak Gale 2010
5+-- Copyright : Yitzchak Gale 2018
6--
6--
7-- Maintainer : Yitzchak Gale <gale@sefer.org>
7-- Maintainer : Yitzchak Gale <gale@sefer.org>
8-- Portability : portable
8-- Portability : portable
@@ -12,7 +12,7 @@
12-- Unix-like systems. For more information about this format, see
12-- Unix-like systems. For more information about this format, see
13-- <http://www.twinsun.com/tz/tz-link.htm>.
13-- <http://www.twinsun.com/tz/tz-link.htm>.
14
14
15−{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.
15+{- Copyright (c) 2018ZZ Yitzchak Gale. All rights reserved.
16For licensing information, see the BSD3-style license in the file
16For licensing information, see the BSD3-style license in the file
17LICENSE that was originally distributed by the author together with
17LICENSE that was originally distributed by the author together with
18this file. -}
18this file. -}
Data/Time/LocalTime/TimeZone/Olson/Types.hs+18−2
@@ -1,8 +1,9 @@
1{-# OPTIONS_HADDOCK hide #-}
1{-# OPTIONS_HADDOCK hide #-}
2+{-# LANGUAGE CPP #-}
2-----------------------------------------------------------------------------
3-----------------------------------------------------------------------------
3-- |
4-- |
4-- Module : Data.Time.LocalTime.TimeZone.Olson.Types
5-- Module : Data.Time.LocalTime.TimeZone.Olson.Types
5−-- Copyright : Yitzchak Gale 2010
6+-- Copyright : Yitzchak Gale 2018
6--
7--
7-- Maintainer : Yitzchak Gale <gale@sefer.org>
8-- Maintainer : Yitzchak Gale <gale@sefer.org>
8-- Portability : portable
9-- Portability : portable
@@ -14,7 +15,7 @@
14--
15--
15-- Both Version 1 and Version 2 timezone data can be represented.
16-- Both Version 1 and Version 2 timezone data can be represented.
16
17
17−{- Copyright (c) 2010 Yitzchak Gale. All rights reserved.
18+{- Copyright (c) 2018 Yitzchak Gale. All rights reserved.
18For licensing information, see the BSD3-style license in the file
19For licensing information, see the BSD3-style license in the file
19LICENSE that was originally distributed by the author together with
20LICENSE that was originally distributed by the author together with
20this file. -}
21this file. -}
@@ -36,6 +37,9 @@ module Data.Time.LocalTime.TimeZone.Olson.Types
36)
37)
37where
38where
38
39
40+#if MIN_VERSION_base(4,11,0)
41+import Data.Semigroup (Semigroup(..))
42+#endif
39import Data.Monoid (Monoid(..))
43import Data.Monoid (Monoid(..))
40import Control.Monad (mplus)
44import Control.Monad (mplus)
41
45
@@ -71,6 +75,17 @@ data OlsonData =
71 }
75 }
72 deriving (Eq, Show)
76 deriving (Eq, Show)
73
77
78+#if MIN_VERSION_base(4,11,0)
79+instance Semigroup OlsonData where
80+ OlsonData a b c d <> OlsonData a' b' c' d' =
81+ OlsonData (a ++ map (shiftBy $ length b) a')
82+ (b ++ b') (c ++ c') (d `mplus` d')
83+ where
84+ shiftBy n trans = trans {transIndex = n + transIndex trans}
85+
86+instance Monoid OlsonData where
87+ mempty = OlsonData [] [] [] Nothing
88+#else
74instance Monoid OlsonData where
89instance Monoid OlsonData where
75 mempty = OlsonData [] [] [] Nothing
90 mempty = OlsonData [] [] [] Nothing
76 mappend (OlsonData a b c d ) (OlsonData a' b' c' d') =
91 mappend (OlsonData a b c d ) (OlsonData a' b' c' d') =
@@ -78,6 +93,7 @@ instance Monoid OlsonData where
78 (b ++ b') (c ++ c') (d `mplus` d')
93 (b ++ b') (c ++ c') (d `mplus` d')
79 where
94 where
80 shiftBy n trans = trans {transIndex = n + transIndex trans}
95 shiftBy n trans = trans {transIndex = n + transIndex trans}
96+#endif
81
97
82-- | A @Transition@ represents a moment when the clocks change in a
98-- | A @Transition@ represents a moment when the clocks change in a
83-- timezone. It consists of a Unix timestamp value that indicates the
99-- timezone. It consists of a Unix timestamp value that indicates the
LICENSE+1−1
@@ -1,4 +1,4 @@
1−Copyright (c) 2010-2017 Yitzchak Gale. All rights reserved.
1+Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved.
2
2
3Redistribution and use in source and binary forms, with or without
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are
4modification, are permitted provided that the following conditions are
README.md+1−1
@@ -19,7 +19,7 @@ See also the
19package for a way to include timezone informaton from a binary Olson
19package for a way to include timezone informaton from a binary Olson
20timezone file at compile time.
20timezone file at compile time.
21
21
22−Copyright (c) 2010-2017 Yitzchak Gale. All rights reserved.
22+Copyright (c) 2010-2018 Yitzchak Gale. All rights reserved.
23
23
24For licensing information, see the BSD3-style license in the file
24For licensing information, see the BSD3-style license in the file
25LICENSE that was originally distributed by the author together with
25LICENSE that was originally distributed by the author together with
timezone-olson.cabal+2−2
@@ -1,5 +1,5 @@
1Name: timezone-olson
1Name: timezone-olson
2−Version: 0.1.8
2+Version: 0.1.9
3Synopsis: A pure Haskell parser and renderer for binary Olson timezone files
3Synopsis: A pure Haskell parser and renderer for binary Olson timezone files
4Description: A parser and renderer for binary Olson timezone
4Description: A parser and renderer for binary Olson timezone
5 files whose format is specified by the tzfile(5)
5 files whose format is specified by the tzfile(5)
@@ -25,7 +25,7 @@ Category: Data
25Build-type: Simple
25Build-type: Simple
26Extra-source-files: README.md, catTZ.hs, hzdump.hs
26Extra-source-files: README.md, catTZ.hs, hzdump.hs
27Cabal-version: >=1.10
27Cabal-version: >=1.10
28−Tested-with: GHC > 7.4 && < 8.5
28+Tested-with: GHC > 8.0 && < 8.5
29
29
30Source-repository HEAD
30Source-repository HEAD
31 type: git
31 type: git