Add version guards for Monoid imports

This commit is contained in:
Tissevert 2020-12-09 11:06:47 +01:00
parent fc054ee575
commit 49f819c54c
3 changed files with 9 additions and 0 deletions

View file

@ -1,9 +1,12 @@
{-# LANGUAGE CPP #-}
module Arguments ( module Arguments (
Arguments(..) Arguments(..)
, get , get
) where ) where
#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>)) import Data.Monoid ((<>))
#endif
import Data.Version (showVersion) import Data.Version (showVersion)
import Control.Applicative ((<|>), (<**>), optional) import Control.Applicative ((<|>), (<**>), optional)
import Options.Applicative ( import Options.Applicative (

View file

@ -1,6 +1,7 @@
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Blog.Path ( module Blog.Path (
Path(..) Path(..)
, build , build
@ -11,7 +12,9 @@ import qualified Arguments as Arguments (Arguments(..))
import Control.Monad (join) import Control.Monad (join)
import Control.Monad.Except (MonadError(..), ExceptT(..), runExceptT) import Control.Monad.Except (MonadError(..), ExceptT(..), runExceptT)
import Data.Aeson (ToJSON(..), (.=), pairs) import Data.Aeson (ToJSON(..), (.=), pairs)
#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>)) import Data.Monoid ((<>))
#endif
import Files (File(..), filePath) import Files (File(..), filePath)
import GHC.Generics (Generic) import GHC.Generics (Generic)

View file

@ -1,6 +1,7 @@
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Blog.Skin ( module Blog.Skin (
Skin(..) Skin(..)
, build , build
@ -11,7 +12,9 @@ import qualified Arguments (bannerPath, favicon, cardImage, headPath, previewArt
import Control.Monad (filterM) import Control.Monad (filterM)
import Data.Aeson (ToJSON(..), (.=), pairs) import Data.Aeson (ToJSON(..), (.=), pairs)
import Data.Maybe (listToMaybe) import Data.Maybe (listToMaybe)
#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>)) import Data.Monoid ((<>))
#endif
import Files (absoluteLink) import Files (absoluteLink)
import GHC.Generics (Generic) import GHC.Generics (Generic)
import Prelude hiding (head) import Prelude hiding (head)