on master help sign in
Kill several redundant-import warnings
620a3afHerbert Valerio Riedel
Data/Text/Internal/Builder.hs+1−1
@@ -94,7 +94,7 @@ instance Monoid Builder where
94 {-# INLINE mempty #-}
94 {-# INLINE mempty #-}
95 mappend = append
95 mappend = append
96 {-# INLINE mappend #-}
96 {-# INLINE mappend #-}
97− mconcat = foldr mappend mempty
97+ mconcat = foldr mappend Data.Monoid.mempty
98 {-# INLINE mconcat #-}
98 {-# INLINE mconcat #-}
99
99
100instance String.IsString Builder where
100instance String.IsString Builder where
Data/Text/Internal/Builder/Functions.hs+2−1
@@ -23,7 +23,8 @@ module Data.Text.Internal.Builder.Functions
23
23
24import Data.Monoid (mappend)
24import Data.Monoid (mappend)
25import Data.Text.Lazy.Builder (Builder)
25import Data.Text.Lazy.Builder (Builder)
26−import GHC.Base
26+import GHC.Base (chr#,ord#,(+#),Int(I#),Char(C#))
27+import Prelude ()
27
28
28-- | Unsafe conversion for decimal digits.
29-- | Unsafe conversion for decimal digits.
29{-# INLINE i2d #-}
30{-# INLINE i2d #-}
Data/Text/Internal/Read.hs+2−2
@@ -18,7 +18,7 @@ module Data.Text.Internal.Read
18 , perhaps
18 , perhaps
19 ) where
19 ) where
20
20
21−import Control.Applicative (Applicative(..))
21+import Control.Applicative as App (Applicative(..))
22import Control.Arrow (first)
22import Control.Arrow (first)
23import Control.Monad (ap)
23import Control.Monad (ap)
24import Data.Char (ord)
24import Data.Char (ord)
@@ -38,7 +38,7 @@ instance Applicative (IParser t) where
38 (<*>) = ap
38 (<*>) = ap
39
39
40instance Monad (IParser t) where
40instance Monad (IParser t) where
41− return = pure
41+ return = App.pure
42 m >>= k = P $ \t -> case runP m t of
42 m >>= k = P $ \t -> case runP m t of
43 Left err -> Left err
43 Left err -> Left err
44 Right (a,t') -> runP (k a) t'
44 Right (a,t') -> runP (k a) t'
Data/Text/Lazy/Builder/Int.hs+3−3
@@ -35,7 +35,7 @@ import Control.Monad.ST
35
35
36#ifdef __GLASGOW_HASKELL__
36#ifdef __GLASGOW_HASKELL__
37# if defined(INTEGER_GMP)
37# if defined(INTEGER_GMP)
38−import GHC.Integer.GMP.Internals
38+import GHC.Integer.GMP.Internals (Integer(S#))
39# elif defined(INTEGER_SIMPLE)
39# elif defined(INTEGER_SIMPLE)
40import GHC.Integer
40import GHC.Integer
41# else
41# else
@@ -55,7 +55,7 @@ decimal :: Integral a => a -> Builder
55{-# RULES "decimal/Int16" decimal = boundedDecimal :: Int16 -> Builder #-}
55{-# RULES "decimal/Int16" decimal = boundedDecimal :: Int16 -> Builder #-}
56{-# RULES "decimal/Int32" decimal = boundedDecimal :: Int32 -> Builder #-}
56{-# RULES "decimal/Int32" decimal = boundedDecimal :: Int32 -> Builder #-}
57{-# RULES "decimal/Int64" decimal = boundedDecimal :: Int64 -> Builder #-}
57{-# RULES "decimal/Int64" decimal = boundedDecimal :: Int64 -> Builder #-}
58−{-# RULES "decimal/Word" decimal = positive :: Word -> Builder #-}
58+{-# RULES "decimal/Word" decimal = positive :: Data.Word.Word -> Builder #-}
59{-# RULES "decimal/Word8" decimal = positive :: Word8 -> Builder #-}
59{-# RULES "decimal/Word8" decimal = positive :: Word8 -> Builder #-}
60{-# RULES "decimal/Word16" decimal = positive :: Word16 -> Builder #-}
60{-# RULES "decimal/Word16" decimal = positive :: Word16 -> Builder #-}
61{-# RULES "decimal/Word32" decimal = positive :: Word32 -> Builder #-}
61{-# RULES "decimal/Word32" decimal = positive :: Word32 -> Builder #-}
@@ -247,7 +247,7 @@ integer base i
247 PAIR(x,y) -> pblock q <> pblock r <> putB ns
247 PAIR(x,y) -> pblock q <> pblock r <> putB ns
248 where q = fromInteger x
248 where q = fromInteger x
249 r = fromInteger y
249 r = fromInteger y
250− putB _ = mempty
250+ putB _ = Data.Monoid.mempty
251
251
252 int :: Int -> Builder
252 int :: Int -> Builder
253 int x | base == 10 = decimal x
253 int x | base == 10 = decimal x
Data/Text/Lazy/Encoding.hs+2−2
@@ -62,7 +62,7 @@ import qualified Data.ByteString.Lazy.Internal as B
62import qualified Data.ByteString.Unsafe as B
62import qualified Data.ByteString.Unsafe as B
63#if MIN_VERSION_bytestring(0,10,4)
63#if MIN_VERSION_bytestring(0,10,4)
64import Data.Word (Word8)
64import Data.Word (Word8)
65−import Data.Monoid (mappend, mempty)
65+import Data.Monoid (Monoid(..))
66import qualified Data.ByteString.Builder as B
66import qualified Data.ByteString.Builder as B
67import qualified Data.ByteString.Builder.Extra as B (safeStrategy, toLazyByteStringWith)
67import qualified Data.ByteString.Builder.Extra as B (safeStrategy, toLazyByteStringWith)
68import qualified Data.ByteString.Builder.Prim as BP
68import qualified Data.ByteString.Builder.Prim as BP
@@ -161,7 +161,7 @@ encodeUtf8 lt@(Chunk t _) =
161
161
162encodeUtf8Builder :: Text -> B.Builder
162encodeUtf8Builder :: Text -> B.Builder
163encodeUtf8Builder =
163encodeUtf8Builder =
164− foldrChunks (\c b -> TE.encodeUtf8Builder c `mappend` b) mempty
164+ foldrChunks (\c b -> TE.encodeUtf8Builder c `mappend` b) Data.Monoid.mempty
165
165
166{-# INLINE encodeUtf8BuilderEscaped #-}
166{-# INLINE encodeUtf8BuilderEscaped #-}
167encodeUtf8BuilderEscaped :: BP.BoundedPrim Word8 -> Text -> B.Builder
167encodeUtf8BuilderEscaped :: BP.BoundedPrim Word8 -> Text -> B.Builder
Data/Text/Lazy/Read.hs+1−1
@@ -56,7 +56,7 @@ decimal :: Integral a => Reader a
56{-# SPECIALIZE decimal :: Reader Int32 #-}
56{-# SPECIALIZE decimal :: Reader Int32 #-}
57{-# SPECIALIZE decimal :: Reader Int64 #-}
57{-# SPECIALIZE decimal :: Reader Int64 #-}
58{-# SPECIALIZE decimal :: Reader Integer #-}
58{-# SPECIALIZE decimal :: Reader Integer #-}
59−{-# SPECIALIZE decimal :: Reader Word #-}
59+{-# SPECIALIZE decimal :: Reader Data.Word.Word #-}
60{-# SPECIALIZE decimal :: Reader Word8 #-}
60{-# SPECIALIZE decimal :: Reader Word8 #-}
61{-# SPECIALIZE decimal :: Reader Word16 #-}
61{-# SPECIALIZE decimal :: Reader Word16 #-}
62{-# SPECIALIZE decimal :: Reader Word32 #-}
62{-# SPECIALIZE decimal :: Reader Word32 #-}
Data/Text/Read.hs+1−1
@@ -55,7 +55,7 @@ decimal :: Integral a => Reader a
55{-# SPECIALIZE decimal :: Reader Int32 #-}
55{-# SPECIALIZE decimal :: Reader Int32 #-}
56{-# SPECIALIZE decimal :: Reader Int64 #-}
56{-# SPECIALIZE decimal :: Reader Int64 #-}
57{-# SPECIALIZE decimal :: Reader Integer #-}
57{-# SPECIALIZE decimal :: Reader Integer #-}
58−{-# SPECIALIZE decimal :: Reader Word #-}
58+{-# SPECIALIZE decimal :: Reader Data.Word.Word #-}
59{-# SPECIALIZE decimal :: Reader Word8 #-}
59{-# SPECIALIZE decimal :: Reader Word8 #-}
60{-# SPECIALIZE decimal :: Reader Word16 #-}
60{-# SPECIALIZE decimal :: Reader Word16 #-}
61{-# SPECIALIZE decimal :: Reader Word32 #-}
61{-# SPECIALIZE decimal :: Reader Word32 #-}