[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 15:03:28 UTC 2010


The following commit has been merged in the master branch:
commit 08d833180e705a3c4e2c8a83abd40dd04da9fb4d
Author: John Goerzen <jgoerzen at complete.org>
Date:   Mon Oct 10 19:05:00 2005 +0100

    Various adjustments to eliminate some warnings with ghc -Wall

diff --git a/MissingH/Bits.hs b/MissingH/Bits.hs
index 9cfafb5..112278d 100644
--- a/MissingH/Bits.hs
+++ b/MissingH/Bits.hs
@@ -42,7 +42,7 @@ Example:
 -}
 getBytes :: (Integral a, Bounded a, Bits a) => a -> [a]
 getBytes input = 
-    let getByte x 0 = []
+    let getByte _ 0 = []
         getByte x remaining = (x .&. 0xff) : getByte (shiftR x 8) (remaining - 1)
         in
         if (bitSize input `mod` 8) /= 0
diff --git a/MissingH/Checksum/CRC32/Posix.hs b/MissingH/Checksum/CRC32/Posix.hs
index 31d46d8..e124397 100644
--- a/MissingH/Checksum/CRC32/Posix.hs
+++ b/MissingH/Checksum/CRC32/Posix.hs
@@ -45,9 +45,9 @@ import Data.Bits
 import Data.Word
 
 iter_crc32       :: Word32 -> Char -> Word32
-iter_crc32 sum ch = (sum `shiftL` 8) `xor`
-                    crctab ! fromIntegral ((sum `shiftR` 24) `xor`
-                    (fromIntegral (fromEnum ch)))
+iter_crc32 sumval ch = (sumval `shiftL` 8) `xor`
+                       crctab ! fromIntegral ((sumval `shiftR` 24) `xor`
+                                              (fromIntegral (fromEnum ch)))
 
 
 calc_crc32            :: [Char] -> Word32 -> Word32 -> Word32
diff --git a/MissingH/ConfigParser/Lexer.hs b/MissingH/ConfigParser/Lexer.hs
index e3eebed..dd08fd6 100644
--- a/MissingH/ConfigParser/Lexer.hs
+++ b/MissingH/ConfigParser/Lexer.hs
@@ -42,7 +42,6 @@ module MissingH.ConfigParser.Lexer
 
 import Text.ParserCombinators.Parsec
 import MissingH.Parsec
-import Data.Maybe
 
 data CPTok = IGNOREDATA
            | NEWSECTION String
diff --git a/MissingH/ConfigParser/Types.hs b/MissingH/ConfigParser/Types.hs
index 61356f2..6a75e9f 100644
--- a/MissingH/ConfigParser/Types.hs
+++ b/MissingH/ConfigParser/Types.hs
@@ -42,7 +42,6 @@ module MissingH.ConfigParser.Types (
 import Data.FiniteMap
 import Data.Char
 import Control.Monad.Error
-import MissingH.Either
 
 {- | Internal output from parser -}
 type ParseOutput = [(String, [(String, String)])]
diff --git a/MissingH/GetOpt.hs b/MissingH/GetOpt.hs
index 40ed57b..a7eb408 100644
--- a/MissingH/GetOpt.hs
+++ b/MissingH/GetOpt.hs
@@ -71,8 +71,8 @@ validateCmdLine order options header func =
     do res <- parseCmdLine order options header
        case func res of
          Nothing -> return res
-         Just error -> ioError (userError (error ++ "\n" ++
-                                           usageInfo header options))
+         Just errormsg -> ioError (userError (errormsg ++ "\n" ++
+                                              usageInfo header options))
 
 {- | A type to standardize some common uses of GetOpt.
 
diff --git a/MissingH/IO/HVIO.hs b/MissingH/IO/HVIO.hs
index 5dcff80..83362cc 100644
--- a/MissingH/IO/HVIO.hs
+++ b/MissingH/IO/HVIO.hs
@@ -263,8 +263,8 @@ class (Show a) => HVIO a where
     -- raised; fewer bytes than requested are returned on EOF.
     vGetBuf :: a -> Ptr b -> Int -> IO Int
 
-    vSetBuffering x _ = return ()
-    vGetBuffering x = return NoBuffering
+    vSetBuffering _ _ = return ()
+    vGetBuffering _ = return NoBuffering
 
     vShow x = return (show x)
 
@@ -491,8 +491,8 @@ To create an empty buffer, pass the initial value @\"\"@. -}
 newMemoryBuffer :: String               -- ^ Initial Contents
                 -> (String -> IO ())    -- ^ close func
                 -> IO MemoryBuffer
-newMemoryBuffer init closefunc = do ref <- newIORef (True, (0, init))
-                                    return (MemoryBuffer closefunc ref)
+newMemoryBuffer initval closefunc = do ref <- newIORef (True, (0, initval))
+                                       return (MemoryBuffer closefunc ref)
 
 {- | Default (no-op) memory buf close function. -}
 mbDefaultCloseFunc :: String -> IO ()
@@ -533,14 +533,14 @@ instance HVIO MemoryBuffer where
                         vioc_set (vrv h) (-1, "")
                         vClose h
                         return retval
-    vIsReadable h = return True
+    vIsReadable _ = return True
 
     vPutStr h s = do (pos, buf) <- vioc_get (vrv h)
                      let (pre, post) = splitAt pos buf
                      let newbuf = pre ++ s ++ (drop (length buf) post)
                      vioc_set (vrv h) (pos + (length s), newbuf)
     vPutChar h c = vPutStr h [c]
-    vIsWritable h = return True
+    vIsWritable _ = return True
     vTell h = do v <- vioc_get (vrv h)
                  return . fromIntegral $ (fst v)
     vSeek h seekmode seekposp = 
@@ -554,7 +554,7 @@ instance HVIO MemoryBuffer where
                                 then replicate (newpos - (length buf)) '\0'
                                 else []
            vioc_set (vrv h) (newpos, buf2)
-    vIsSeekable h = return True
+    vIsSeekable _ = return True
 
 ----------------------------------------------------------------------
 -- Pipes
@@ -639,7 +639,7 @@ pwmv (PipeWriter x) = do mv1 <- vioc_get x
 
 
 instance Show PipeWriter where
-    show x = "<PipeWriter>"
+    show _ = "<PipeWriter>"
 
 instance HVIO PipeWriter where
     vClose h = do o <- vIsOpen h
diff --git a/MissingH/IO/PosixConsts.hs b/MissingH/IO/PosixConsts.hs
index 28c38ba..8c835d1 100644
--- a/MissingH/IO/PosixConsts.hs
+++ b/MissingH/IO/PosixConsts.hs
@@ -33,7 +33,6 @@ by default.
 
 module MissingH.IO.PosixConsts where
 import System.Posix.Types
-import Data.Bits
 
 blockSpecialMode :: FileMode
 blockSpecialMode = 0o0060000
diff --git a/MissingH/IO/StatCompat.hs b/MissingH/IO/StatCompat.hs
index 3fe1a3e..ca62a78 100644
--- a/MissingH/IO/StatCompat.hs
+++ b/MissingH/IO/StatCompat.hs
@@ -36,7 +36,6 @@ module MissingH.IO.StatCompat
 where
 import System.Posix.Types
 import MissingH.IO.PosixConsts
-import Data.Bits
 #ifndef mingw32_HOST_OS
 import System.Posix.Files(intersectFileModes)
 #endif
diff --git a/MissingH/Parsec.hs b/MissingH/Parsec.hs
index 031dfbe..afb762f 100644
--- a/MissingH/Parsec.hs
+++ b/MissingH/Parsec.hs
@@ -105,7 +105,7 @@ notMatching p errormsg =
                       x <- maybeRead
                       case x of
                              Nothing -> return ()
-                             Just x -> unexpected errormsg
+                             Just _ -> unexpected errormsg
         in
         try workerFunc
 

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list