Skip to content

Commit dc683fc

Browse files
committed
Merge pull request haskell-github#100 from pharpend/base-4.8
Fix haskell-github#99
2 parents 5fb85b7 + 5c720f5 commit dc683fc

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

Github/Data.hs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
1+
{-# LANGUAGE CPP, DeriveDataTypeable, OverloadedStrings #-}
22

33
-- | This module re-exports the @Github.Data.Definitions@ module, adding
44
-- instances of @FromJSON@ to it. If you wish to use the data without the
55
-- instances, use the @Github.Data.Definitions@ module instead.
66

77
module Github.Data (module Github.Data.Definitions) where
88

9-
import Data.Time
109
import Control.Applicative
1110
import Control.Monad
1211
import qualified Data.Text as T
1312
import Data.Aeson.Types
14-
import System.Locale (defaultTimeLocale)
1513
import qualified Data.Vector as V
1614
import qualified Data.HashMap.Lazy as Map
1715
import Data.Hashable (Hashable)
1816

17+
#if MIN_VERSION_base(4,8,0)
18+
import Data.Time
19+
#else
20+
import Data.Time
21+
import System.Locale (defaultTimeLocale)
22+
#endif
23+
1924
import Github.Data.Definitions
2025

2126
instance FromJSON GithubDate where

Github/Issues.hs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE OverloadedStrings #-}
1+
{-# LANGUAGE CPP, OverloadedStrings #-}
22
-- | The issues API as described on <http://developer.github.com/v3/issues/>.
33
module Github.Issues (
44
issue
@@ -16,8 +16,13 @@ module Github.Issues (
1616
import Github.Data
1717
import Github.Private
1818
import Data.List (intercalate)
19-
import Data.Time.Format (formatTime)
19+
#if MIN_VERSION_base(4, 8, 0)
20+
import Data.Time (defaultTimeLocale)
21+
#else
2022
import System.Locale (defaultTimeLocale)
23+
#endif
24+
25+
import Data.Time.Format (formatTime)
2126
import Data.Time.Clock (UTCTime(..))
2227

2328
-- | A data structure for describing how to filter issues. This is used by

Github/Private.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE OverloadedStrings, StandaloneDeriving, DeriveDataTypeable #-}
2-
{-# LANGUAGE CPP #-}
2+
{-# LANGUAGE CPP, FlexibleContexts #-}
33
module Github.Private where
44

55
import Github.Data

github.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name: github
77
-- The package version. See the Haskell package versioning policy
88
-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
99
-- standards guiding when and how versions should be incremented.
10-
Version: 0.13.1
10+
Version: 0.13.2
1111

1212
-- A short (one-line) description of the package.
1313
Synopsis: Access to the Github API, v3.

0 commit comments

Comments
 (0)