aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Compat/Time.hs
blob: 1de19780188fe26485a49f6d6a95f8ae41a2b9f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{-# LANGUAGE CPP #-}

{-
This compatibility module is needed because, in time 1.5, the
`defaultTimeLocale` function was moved from System.Locale (in the
old-locale library) into Data.Time.

We support both behaviors because time 1.4 is a boot library for GHC
7.8. time 1.5 is a boot library for GHC 7.10.

When support is dropped for GHC 7.8, this module may be obsoleted.
-}

#if MIN_VERSION_time(1,5,0)
module Text.Pandoc.Compat.Time (
  module Data.Time
)
where
import Data.Time

#else
module Text.Pandoc.Compat.Time (
  module Data.Time,
  defaultTimeLocale
)
where
import Data.Time
import System.Locale ( defaultTimeLocale )

#endif