From 9cad495eb208a78eb822647618c34bc7d5f36589 Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Fri, 19 Aug 2016 04:57:32 -0400 Subject: [PATCH] Conditionally import Data.Monoid.<> depending on version of base Fixes #64 --- app/Main.hs | 1 + src/Common.hs | 9 +++++++++ unused.cabal | 1 + 3 files changed, 11 insertions(+) create mode 100644 src/Common.hs diff --git a/app/Main.hs b/app/Main.hs index 62ec7a0..15c8860 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,6 +1,7 @@ module Main where import App (runProgram, Options(Options)) +import Common import qualified Data.Maybe as M import Options.Applicative import Unused.CLI (SearchRunner(..)) diff --git a/src/Common.hs b/src/Common.hs new file mode 100644 index 0000000..12216b9 --- /dev/null +++ b/src/Common.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE CPP #-} + +module Common + ( (<>) + ) where + +#if MIN_VERSION_base(4, 8, 0) +import Data.Monoid ((<>)) +#endif diff --git a/unused.cabal b/unused.cabal index 0793fff..3c58205 100644 --- a/unused.cabal +++ b/unused.cabal @@ -59,6 +59,7 @@ library , Unused.CLI.ProgressIndicator , Unused.CLI.ProgressIndicator.Internal , Unused.CLI.ProgressIndicator.Types + , Common build-depends: base >= 4.7 && < 5 , process , containers