Silence some warnings
authorIan Lynagh <igloo@earth.li>
Tue, 12 Dec 2006 17:34:04 +0000 (17:34 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 12 Dec 2006 17:34:04 +0000 (17:34 +0000)
utils/nofib-analyse/CmdLine.hs
utils/nofib-analyse/GenUtils.lhs

index 5be7d32..3861a30 100644 (file)
@@ -19,18 +19,26 @@ import System.IO.Unsafe             ( unsafePerformIO )
 -----------------------------------------------------------------------------
 -- Command line arguments
 
 -----------------------------------------------------------------------------
 -- Command line arguments
 
+args :: [String]
 args = unsafePerformIO getArgs
 args = unsafePerformIO getArgs
+
+flags :: [CLIFlags]
+other_args :: [String]
+cmdline_errors :: [String]
 (flags, other_args, cmdline_errors) = getOpt Permute argInfo args 
 
 (flags, other_args, cmdline_errors) = getOpt Permute argInfo args 
 
-default_tooquick_threshold = 0.2 {- secs -} :: Float
+default_tooquick_threshold, tooquick_threshold :: Float
+default_tooquick_threshold = 0.2 {- secs -}
 tooquick_threshold
  = case [ i | OptIgnoreSmallTimes i <- flags ] of
        [] -> default_tooquick_threshold
        (i:_) -> i
 
 tooquick_threshold
  = case [ i | OptIgnoreSmallTimes i <- flags ] of
        [] -> default_tooquick_threshold
        (i:_) -> i
 
+devs, nodevs :: Bool
 devs   = OptDeviations   `elem` flags
 nodevs = OptNoDeviations `elem` flags
 
 devs   = OptDeviations   `elem` flags
 nodevs = OptNoDeviations `elem` flags
 
+default_title, reportTitle :: String
 default_title = "NoFib Results"
 reportTitle = case [ t | OptTitle t <- flags ] of
         []    -> default_title
 default_title = "NoFib Results"
 reportTitle = case [ t | OptTitle t <- flags ] of
         []    -> default_title
index 540199f..0dcb844 100644 (file)
@@ -85,7 +85,7 @@ HBC has it in one of its builtin modules
 
 > maybeMap :: (a -> b) -> Maybe a -> Maybe b
 > maybeMap f (Just a) = Just (f a)
 
 > maybeMap :: (a -> b) -> Maybe a -> Maybe b
 > maybeMap f (Just a) = Just (f a)
-> maybeMap f Nothing  = Nothing
+> maybeMap _ Nothing  = Nothing
 
 > joinMaybe :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a 
 > joinMaybe _ Nothing  Nothing  = Nothing
 
 > joinMaybe :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a 
 > joinMaybe _ Nothing  Nothing  = Nothing
@@ -102,12 +102,12 @@ This will never terminate.
 > mkClosure :: (a -> a -> Bool) -> (a -> a) -> a -> a
 > mkClosure eq f = match . iterate f
 >   where
 > mkClosure :: (a -> a -> Bool) -> (a -> a) -> a -> a
 > mkClosure eq f = match . iterate f
 >   where
->       match (a:b:c) | a `eq` b = a
+>       match (a:b:_) | a `eq` b = a
 >       match (_:c)              = match c
 
 > foldb :: (a -> a -> a) -> [a] -> a
 >       match (_:c)              = match c
 
 > foldb :: (a -> a -> a) -> [a] -> a
-> foldb f [] = error "can't reduce an empty list using foldb"
-> foldb f [x] = x
+> foldb _ [] = error "can't reduce an empty list using foldb"
+> foldb _ [x] = x
 > foldb f l  = foldb f (foldb' l)
 >    where 
 >       foldb' (x:y:x':y':xs) = f (f x y) (f x' y') : foldb' xs
 > foldb f l  = foldb f (foldb' l)
 >    where 
 >       foldb' (x:y:x':y':xs) = f (f x y) (f x' y') : foldb' xs
@@ -133,7 +133,7 @@ Sorting is something almost every program needs, and this is the
 quickest sorting function I know of.
 
 > sortWith :: (a -> a -> Bool) -> [a] -> [a]
 quickest sorting function I know of.
 
 > sortWith :: (a -> a -> Bool) -> [a] -> [a]
-> sortWith le [] = []
+> sortWith _ [] = []
 > sortWith le lst = foldb (mergeWith le) (splitList lst)
 >   where
 >       splitList (a1:a2:a3:a4:a5:xs) = 
 > sortWith le lst = foldb (mergeWith le) (splitList lst)
 >   where
 >       splitList (a1:a2:a3:a4:a5:xs) =