Commits

Anonymous committed f7fe077

Clean up some warnings with inports

  • Participants
  • Parent commits 8503dd9

Comments (0)

Files changed (5)

File Data/Text.hs

 
 import Prelude (Char,Bool,Int,Maybe,String,
                 Eq,(==),
-                Show,showsPrec,show,not,
-                Read,readsPrec,read,
+                Show,showsPrec,
+                Read,readsPrec,
                 (&&),(||),(+),(-),($),(<),(>),(<=),(>=),(.),(>>=),
-                return,otherwise,seq,fromIntegral)
+                return,otherwise,seq,
+                IO, FilePath)
 
 import Data.Char (isSpace)
-import Control.Monad.ST(ST(..))
+import Control.Monad.ST(ST)
 import Data.Array.Base(unsafeNewArray_,unsafeWrite,unsafeAt)
-import Data.Array.ST(STUArray(..), runSTUArray)
+import Data.Array.ST(STUArray, runSTUArray)
 import qualified Data.ByteString as B
-import Data.ByteString(ByteString(..))
+import Data.ByteString(ByteString)
 import qualified Data.List as L
 import Data.Monoid(Monoid(..))
-import Data.Word(Word16(..))
-import System.IO hiding (readFile)
+import Data.Word(Word16)
 
 import qualified Data.Text.Fusion as S
 import Data.Text.Fusion (Stream(..),Step(..),Encoding(..),

File Data/Text/Fusion.hs

 {-# OPTIONS_GHC -fglasgow-exts #-}
 {-# LANGUAGE BangPatterns #-}
+--TODO: eliminate the need to supress these warnings:
+{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-unused-matches #-}
 
 module Data.Text.Fusion where
 
 import Data.Char
 import Control.Exception(assert)
 import Control.Monad(liftM2)
-import Control.Monad.ST(runST,ST(..))
+import Control.Monad.ST(runST,ST)
 import Data.Array.Base
 import Data.Bits
 import qualified Data.ByteString as B
 import Data.ByteString.Internal(ByteString(..),mallocByteString,memcpy)
 import qualified Data.List as L
-import Data.Word(Word8(..),Word16(..),Word32(..))
-import Foreign.ForeignPtr(withForeignPtr,ForeignPtr(..))
+import Data.Word(Word8, Word16, Word32)
+import Foreign.ForeignPtr(withForeignPtr,ForeignPtr)
 import Foreign.Storable(pokeByteOff)
 import GHC.Exts
 import System.IO.Unsafe(unsafePerformIO)

File Data/Text/Internal.hs

 module Data.Text.Internal where
 
 import Data.Array.ST(newArray_,runSTUArray)
-import Data.Array.Unboxed(UArray(..))
-import Data.Word(Word16(..))
+import Data.Array.Unboxed(UArray)
+import Data.Word(Word16)
 
 data Text = Text !(UArray Int Word16) {-# UNPACK #-}!Int {-# UNPACK #-}!Int
 

File Data/Text/Utf32.hs

 module Data.Text.Utf32 where
 
-import Data.Bits
-import Data.Char
-import Data.Word
+import Data.Word (Word32)
 
 validate    :: Word32 -> Bool
 validate x1 = (x1 >= 0x0 && x1 < 0xD800) || (x1 > 0xDFFF && x1 <= 0x10FFFF)

File Data/Text/Utf8.hs

 
 import Data.Char(ord)
 import Data.Bits
-import Data.Word
 
 import GHC.Exts
 import GHC.Prim