diff options
Diffstat (limited to 'src/Text/Pandoc/Compat')
-rw-r--r-- | src/Text/Pandoc/Compat/Directory.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/Compat/Except.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/Compat/Monoid.hs | 17 | ||||
-rw-r--r-- | src/Text/Pandoc/Compat/TagSoupEntity.hs | 1 |
4 files changed, 18 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Compat/Directory.hs b/src/Text/Pandoc/Compat/Directory.hs index c8f3cc047..61dd5c525 100644 --- a/src/Text/Pandoc/Compat/Directory.hs +++ b/src/Text/Pandoc/Compat/Directory.hs @@ -5,6 +5,7 @@ module Text.Pandoc.Compat.Directory ( getModificationTime ) #if MIN_VERSION_directory(1,2,0) import System.Directory + #else import qualified System.Directory as S import Data.Time.Clock (UTCTime) diff --git a/src/Text/Pandoc/Compat/Except.hs b/src/Text/Pandoc/Compat/Except.hs index 5c1214f47..9ce7c0d36 100644 --- a/src/Text/Pandoc/Compat/Except.hs +++ b/src/Text/Pandoc/Compat/Except.hs @@ -9,7 +9,6 @@ module Text.Pandoc.Compat.Except ( ExceptT , catchError ) where -import Prelude #if MIN_VERSION_mtl(2,2,1) import Control.Monad.Except diff --git a/src/Text/Pandoc/Compat/Monoid.hs b/src/Text/Pandoc/Compat/Monoid.hs new file mode 100644 index 000000000..4daceb8e1 --- /dev/null +++ b/src/Text/Pandoc/Compat/Monoid.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE CPP #-} +module Text.Pandoc.Compat.Monoid ( (<>) ) + where + +#if MIN_VERSION_base(4,5,0) +import Data.Monoid ((<>)) + +#else +import Data.Monoid + +infixr 6 <> + +--- | An infix synonym for 'mappend'. +(<>) :: Monoid m => m -> m -> m +(<>) = mappend +{-# INLINE (<>) #-} +#endif diff --git a/src/Text/Pandoc/Compat/TagSoupEntity.hs b/src/Text/Pandoc/Compat/TagSoupEntity.hs index 30889e915..80985aef9 100644 --- a/src/Text/Pandoc/Compat/TagSoupEntity.hs +++ b/src/Text/Pandoc/Compat/TagSoupEntity.hs @@ -2,7 +2,6 @@ module Text.Pandoc.Compat.TagSoupEntity (lookupEntity ) where -import Prelude import qualified Text.HTML.TagSoup.Entity as TE lookupEntity :: String -> Maybe Char |