diff options
Diffstat (limited to 'src/Text/Pandoc/Compat')
-rw-r--r-- | src/Text/Pandoc/Compat/Locale.hs | 9 | ||||
-rw-r--r-- | src/Text/Pandoc/Compat/Monoid.hs | 15 | ||||
-rw-r--r-- | src/Text/Pandoc/Compat/Time.hs | 18 |
3 files changed, 24 insertions, 18 deletions
diff --git a/src/Text/Pandoc/Compat/Locale.hs b/src/Text/Pandoc/Compat/Locale.hs deleted file mode 100644 index ac791136c..000000000 --- a/src/Text/Pandoc/Compat/Locale.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE CPP #-} -module Text.Pandoc.Compat.Locale ( defaultTimeLocale ) -where - -#if MIN_VERSION_time(1,5,0) -import Data.Time.Format ( defaultTimeLocale ) -#else -import System.Locale ( defaultTimeLocale ) -#endif diff --git a/src/Text/Pandoc/Compat/Monoid.hs b/src/Text/Pandoc/Compat/Monoid.hs index cb7ea2527..4daceb8e1 100644 --- a/src/Text/Pandoc/Compat/Monoid.hs +++ b/src/Text/Pandoc/Compat/Monoid.hs @@ -1,19 +1,16 @@ {-# LANGUAGE CPP #-} -module Text.Pandoc.Compat.Monoid ( Monoid(..) - , (<>) - ) where +module Text.Pandoc.Compat.Monoid ( (<>) ) + where #if MIN_VERSION_base(4,5,0) -import Data.Monoid ((<>), Monoid(..)) -#else -import Data.Monoid (mappend, Monoid(..)) -#endif +import Data.Monoid ((<>)) -#if MIN_VERSION_base(4,5,0) #else +import Data.Monoid + infixr 6 <> --- | An infix synonym for 'mappend'. +--- | An infix synonym for 'mappend'. (<>) :: Monoid m => m -> m -> m (<>) = mappend {-# INLINE (<>) #-} diff --git a/src/Text/Pandoc/Compat/Time.hs b/src/Text/Pandoc/Compat/Time.hs new file mode 100644 index 000000000..aa08ca224 --- /dev/null +++ b/src/Text/Pandoc/Compat/Time.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE CPP #-} +#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 |