Bryan O'Sullivan avatar Bryan O'Sullivan committed 88405de

Fix warnings reported by GHC HEAD.

Comments (0)

Files changed (7)

Data/Text/Array.hs

 #if defined(__GLASGOW_HASKELL__)
 #include "MachDeps.h"
 
-import GHC.Base (ByteArray#, MutableByteArray#, Int(..), indexIntArray#,
-                 indexWord16Array#, newByteArray#, readIntArray#,
-                 readWord16Array#, unsafeCoerce#, writeIntArray#,
-                 writeWord16Array#, (+#), (*#))
+import GHC.Base (ByteArray#, MutableByteArray#, Int(..),
+                 indexWord16Array#, newByteArray#,
+                 readWord16Array#, unsafeCoerce#,
+                 writeWord16Array#, (*#))
 import GHC.Prim (Int#)
 import GHC.ST (ST(..), runST)
 import GHC.Word (Word16(..))
 
 import Control.Exception (assert)
 import Data.Typeable (Typeable1(..), Typeable2(..), TyCon, mkTyCon, mkTyConApp)
-import Data.Word (Word16)
 import Prelude hiding (length, read)
 
 #include "Typeable.h"
 #if defined(__GLASGOW_HASKELL__)
 
 wORD16_SCALE :: Int# -> Int#
-wORD16_SCALE n# = scale# *# n# where I# scale# = SIZEOF_WORD16
+wORD16_SCALE n# = scale# *# n# where !(I# scale#) = SIZEOF_WORD16
 
 -- | Create an uninitialized mutable array.
 unsafeNew :: forall s e. Elt e => Int -> ST s (MArray s e)

Data/Text/Encoding/Fusion.hs

     ) where
 
 import Control.Exception (assert)
-import Data.ByteString as B
 import Data.ByteString.Internal (ByteString(..), mallocByteString, memcpy)
 import Data.Text.Fusion (Step(..), Stream(..))
 import Data.Text.Fusion.Size

Data/Text/Encoding/Utf16.hs

 chr2 :: Word16 -> Word16 -> Char
 chr2 (W16# a#) (W16# b#) = C# (chr# (upper# +# lower# +# 0x10000#))
     where
-      x# = word2Int# a#
-      y# = word2Int# b#
-      upper# = uncheckedIShiftL# (x# -# 0xD800#) 10#
-      lower# = y# -# 0xDC00#
+      !x# = word2Int# a#
+      !y# = word2Int# b#
+      !upper# = uncheckedIShiftL# (x# -# 0xD800#) 10#
+      !lower# = y# -# 0xDC00#
 {-# INLINE chr2 #-}
 
 validate1    :: Word16 -> Bool

Data/Text/Encoding/Utf8.hs

 chr2       :: Word8 -> Word8 -> Char
 chr2 (W8# x1#) (W8# x2#) = C# (chr# (z1# +# z2#))
     where
-      y1# = word2Int# x1#
-      y2# = word2Int# x2#
-      z1# = uncheckedIShiftL# (y1# -# 0xC0#) 6#
-      z2# = y2# -# 0x80#
+      !y1# = word2Int# x1#
+      !y2# = word2Int# x2#
+      !z1# = uncheckedIShiftL# (y1# -# 0xC0#) 6#
+      !z2# = y2# -# 0x80#
 {-# INLINE chr2 #-}
 
 chr3          :: Word8 -> Word8 -> Word8 -> Char
 chr3 (W8# x1#) (W8# x2#) (W8# x3#) = C# (chr# (z1# +# z2# +# z3#))
     where
-      y1# = word2Int# x1#
-      y2# = word2Int# x2#
-      y3# = word2Int# x3#
-      z1# = uncheckedIShiftL# (y1# -# 0xE0#) 12#
-      z2# = uncheckedIShiftL# (y2# -# 0x80#) 6#
-      z3# = y3# -# 0x80#
+      !y1# = word2Int# x1#
+      !y2# = word2Int# x2#
+      !y3# = word2Int# x3#
+      !z1# = uncheckedIShiftL# (y1# -# 0xE0#) 12#
+      !z2# = uncheckedIShiftL# (y2# -# 0x80#) 6#
+      !z3# = y3# -# 0x80#
 {-# INLINE chr3 #-}
 
 chr4             :: Word8 -> Word8 -> Word8 -> Word8 -> Char
 chr4 (W8# x1#) (W8# x2#) (W8# x3#) (W8# x4#) =
     C# (chr# (z1# +# z2# +# z3# +# z4#))
     where
-      y1# = word2Int# x1#
-      y2# = word2Int# x2#
-      y3# = word2Int# x3#
-      y4# = word2Int# x4#
-      z1# = uncheckedIShiftL# (y1# -# 0xF0#) 18#
-      z2# = uncheckedIShiftL# (y2# -# 0x80#) 12#
-      z3# = uncheckedIShiftL# (y3# -# 0x80#) 6#
-      z4# = y4# -# 0x80#
+      !y1# = word2Int# x1#
+      !y2# = word2Int# x2#
+      !y3# = word2Int# x3#
+      !y4# = word2Int# x4#
+      !z1# = uncheckedIShiftL# (y1# -# 0xF0#) 18#
+      !z2# = uncheckedIShiftL# (y2# -# 0x80#) 12#
+      !z3# = uncheckedIShiftL# (y3# -# 0x80#) 6#
+      !z4# = y4# -# 0x80#
 {-# INLINE chr4 #-}
 
 validate1    :: Word8 -> Bool

Data/Text/Lazy.hs

     -- , sort
     ) where
 
-import Prelude (Char, Bool(..), Int, Maybe(..), String,
+import Prelude (Char, Bool(..), Maybe(..), String,
                 Eq(..), Ord(..), Read(..), Show(..),
                 (&&), (+), (-), (.), ($), (++),
                 div, flip, fromIntegral, not, otherwise)

Data/Text/Lazy/Internal.hs

     ) where
 
 import qualified Data.Text.Internal as T
-import qualified Data.Text as T
+import Data.Text ()
 import Data.Typeable (Typeable)
 import Data.Word (Word16)
 import Foreign.Storable (sizeOf)

Data/Text/Lazy/Search.hs

 import Data.Int (Int64)
 import Data.Word (Word16, Word64)
 import qualified Data.Text.Internal as T
-import qualified Data.Text as T
 import Data.Text.Fusion.Internal (PairS(..))
 import Data.Text.Lazy.Internal (Text(..), foldlChunks)
 import Data.Bits ((.|.), (.&.))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.