diff options
Diffstat (limited to 'src/Text/Pandoc/Compat')
-rw-r--r-- | src/Text/Pandoc/Compat/Time.hs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Compat/Time.hs b/src/Text/Pandoc/Compat/Time.hs new file mode 100644 index 000000000..b1cde82a4 --- /dev/null +++ b/src/Text/Pandoc/Compat/Time.hs @@ -0,0 +1,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 |