[commit: packages/bytestring] master: Fix warnings for ghc-7.10 (02381c3)

git at git.haskell.org git at git.haskell.org
Fri Mar 20 19:36:41 UTC 2015


Repository : ssh://git@git.haskell.org/bytestring

On branch  : master
Link       : http://git.haskell.org/packages/bytestring.git/commitdiff/02381c3bfe37b974deb27e107ee0c868ddd3b0c9

>---------------------------------------------------------------

commit 02381c3bfe37b974deb27e107ee0c868ddd3b0c9
Author: Duncan Coutts <duncan at community.haskell.org>
Date:   Fri Mar 20 16:45:38 2015 +0000

    Fix warnings for ghc-7.10


>---------------------------------------------------------------

02381c3bfe37b974deb27e107ee0c868ddd3b0c9
 Data/ByteString.hs                  | 2 ++
 Data/ByteString/Builder.hs          | 4 +++-
 Data/ByteString/Builder/ASCII.hs    | 5 +++++
 Data/ByteString/Builder/Internal.hs | 7 +++++--
 Data/ByteString/Internal.hs         | 2 ++
 Data/ByteString/Lazy.hs             | 2 ++
 Data/ByteString/Lazy/Internal.hs    | 2 ++
 7 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/Data/ByteString.hs b/Data/ByteString.hs
index bf33a99..42263a6 100644
--- a/Data/ByteString.hs
+++ b/Data/ByteString.hs
@@ -254,7 +254,9 @@ import System.IO                (stdin,stdout,hClose,hFileSize
                                 ,IOMode(..))
 import System.IO.Error          (mkIOError, illegalOperationErrorType)
 
+#if !(MIN_VERSION_base(4,8,0))
 import Data.Monoid              (Monoid(..))
+#endif
 
 #if !defined(__GLASGOW_HASKELL__)
 import System.IO.Unsafe
diff --git a/Data/ByteString/Builder.hs b/Data/ByteString/Builder.hs
index 9307872..dccc88c 100644
--- a/Data/ByteString/Builder.hs
+++ b/Data/ByteString/Builder.hs
@@ -266,7 +266,9 @@ import           Foreign
 
 -- HADDOCK only imports
 import qualified Data.ByteString               as S (concat)
-import           Data.Monoid
+#if !(MIN_VERSION_base(4,8,0))
+import           Data.Monoid (Monoid(..))
+#endif
 import           Data.Foldable                      (foldMap)
 import           Data.List                          (intersperse)
 
diff --git a/Data/ByteString/Builder/ASCII.hs b/Data/ByteString/Builder/ASCII.hs
index e0d6bdf..e5370fa 100644
--- a/Data/ByteString/Builder/ASCII.hs
+++ b/Data/ByteString/Builder/ASCII.hs
@@ -86,14 +86,19 @@ import           Foreign
 
 
 #if defined(__GLASGOW_HASKELL__) && defined(INTEGER_GMP)
+
+#if !(MIN_VERSION_base(4,8,0))
 import           Data.Monoid (mappend)
+# endif
 import           Foreign.C.Types
 
 import qualified Data.ByteString.Builder.Prim.Internal          as P
 import           Data.ByteString.Builder.Prim.Internal.UncheckedShifts
                    ( caseWordSize_32_64 )
 
+# if __GLASGOW_HASKELL__ < 710
 import           GHC.Num     (quotRemInteger)
+# endif
 import           GHC.Types   (Int(..))
 
 
diff --git a/Data/ByteString/Builder/Internal.hs b/Data/ByteString/Builder/Internal.hs
index d52c626..838ec9f 100644
--- a/Data/ByteString/Builder/Internal.hs
+++ b/Data/ByteString/Builder/Internal.hs
@@ -129,10 +129,13 @@ module Data.ByteString.Builder.Internal (
 ) where
 
 import           Control.Arrow (second)
-import           Control.Applicative (Applicative(..), (<$>))
--- import           Control.Exception (return)
 
+#if !(MIN_VERSION_base(4,8,0))
 import           Data.Monoid
+import           Control.Applicative (Applicative(..))
+#endif
+import           Control.Applicative ((<$>))
+
 import qualified Data.ByteString               as S
 import qualified Data.ByteString.Internal      as S
 import qualified Data.ByteString.Lazy.Internal as L
diff --git a/Data/ByteString/Internal.hs b/Data/ByteString/Internal.hs
index 90e2424..0346d01 100644
--- a/Data/ByteString/Internal.hs
+++ b/Data/ByteString/Internal.hs
@@ -93,7 +93,9 @@ import Foreign.C.Types          (CInt, CSize, CULong)
 #endif
 import Foreign.C.String         (CString)
 
+#if !(MIN_VERSION_base(4,8,0))
 import Data.Monoid              (Monoid(..))
+#endif
 import Control.DeepSeq          (NFData(rnf))
 
 #if MIN_VERSION_base(3,0,0)
diff --git a/Data/ByteString/Lazy.hs b/Data/ByteString/Lazy.hs
index b001d7c..ad8938b 100644
--- a/Data/ByteString/Lazy.hs
+++ b/Data/ByteString/Lazy.hs
@@ -222,7 +222,9 @@ import qualified Data.ByteString.Internal as S
 import qualified Data.ByteString.Unsafe as S
 import Data.ByteString.Lazy.Internal
 
+#if !(MIN_VERSION_base(4,8,0))
 import Data.Monoid              (Monoid(..))
+#endif
 import Control.Monad            (mplus)
 
 import Data.Word                (Word8)
diff --git a/Data/ByteString/Lazy/Internal.hs b/Data/ByteString/Lazy/Internal.hs
index 9ed6d05..550e90f 100644
--- a/Data/ByteString/Lazy/Internal.hs
+++ b/Data/ByteString/Lazy/Internal.hs
@@ -53,7 +53,9 @@ import qualified Data.ByteString          as S (length, take, drop)
 import Data.Word        (Word8)
 import Foreign.Storable (Storable(sizeOf))
 
+#if !(MIN_VERSION_base(4,8,0))
 import Data.Monoid      (Monoid(..))
+#endif
 import Control.DeepSeq  (NFData, rnf)
 
 #if MIN_VERSION_base(3,0,0)



More information about the ghc-commits mailing list