[commit: packages/time] format-widths, ghc, improve-leapseconds, master, posix-perf, tasty, wip/travis: Fix -Wall warnings (ae16651)

git at git.haskell.org git at git.haskell.org
Fri Apr 21 16:48:48 UTC 2017


Repository : ssh://git@git.haskell.org/time

On branches: format-widths,ghc,improve-leapseconds,master,posix-perf,tasty,wip/travis
Link       : http://git.haskell.org/packages/time.git/commitdiff/ae16651f2429c01af64184318d06bed2023cd380

>---------------------------------------------------------------

commit ae16651f2429c01af64184318d06bed2023cd380
Author: Ian Lynagh <igloo at earth.li>
Date:   Tue Apr 10 18:22:40 2007 -0700

    Fix -Wall warnings
    
    darcs-hash:20070411012240-3fd76-b092e0f174e882a180df231c955a3456d2ddeb65


>---------------------------------------------------------------

ae16651f2429c01af64184318d06bed2023cd380
 Setup.hs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Setup.hs b/Setup.hs
index 9ef61d3..3c31867 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -4,7 +4,6 @@ import Control.Exception
 import Data.List
 import Distribution.Simple
 import Distribution.PackageDescription
-import Distribution.PreProcess
 import Distribution.Setup
 import Distribution.Simple.LocalBuildInfo
 import System.Cmd
@@ -30,7 +29,8 @@ withCurrentDirectory path f = do
 
 runTestScript :: Args -> Bool -> PackageDescription -> LocalBuildInfo
               -> IO ExitCode
-runTestScript args flag pd lbi = withCurrentDirectory "test" (system "make")
+runTestScript _args _flag _pd _lbi
+ = withCurrentDirectory "test" (system "make")
 
 extractGhcArgs :: [String] -> ([String], [String])
 extractGhcArgs = extractPrefixArgs "--ghc-option="
@@ -39,11 +39,11 @@ extractConfigureArgs :: [String] -> ([String], [String])
 extractConfigureArgs = extractPrefixArgs "--configure-option="
 
 extractPrefixArgs :: String -> [String] -> ([String], [String])
-extractPrefixArgs prefix args
+extractPrefixArgs the_prefix args
  = let f [] = ([], [])
        f (x:xs) = case f xs of
                       (wantedArgs, otherArgs) ->
-                          case removePrefix prefix x of
+                          case removePrefix the_prefix x of
                               Just wantedArg ->
                                   (wantedArg:wantedArgs, otherArgs)
                               Nothing ->
@@ -52,6 +52,7 @@ extractPrefixArgs prefix args
 
 removePrefix :: String -> String -> Maybe String
 removePrefix "" ys = Just ys
+removePrefix _  "" = Nothing
 removePrefix (x:xs) (y:ys)
  | x == y = removePrefix xs ys
  | otherwise = Nothing



More information about the ghc-commits mailing list