Make runghc warning-free and turn -Wall on in the Makefile
authorIan Lynagh <igloo@earth.li>
Sat, 18 Aug 2007 22:42:46 +0000 (22:42 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 18 Aug 2007 22:42:46 +0000 (22:42 +0000)
utils/runghc/Makefile
utils/runghc/runghc.hs

index 1a176a0..7ea6c09 100644 (file)
@@ -14,6 +14,7 @@ include $(GHC_COMPAT_DIR)/compat.mk
 # $(GhcHcOpts) because it is linked to the compiler, and hence
 # we must also build with $(GhcHcOpts) here:
 SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage1HcOpts)
 # $(GhcHcOpts) because it is linked to the compiler, and hence
 # we must also build with $(GhcHcOpts) here:
 SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage1HcOpts)
+SRC_HC_OPTS += -Wall
 
 binary-dist:
        $(INSTALL_DIR)                $(BIN_DIST_DIR)/utils/runghc
 
 binary-dist:
        $(INSTALL_DIR)                $(BIN_DIST_DIR)/utils/runghc
index 9346390..a55fdca 100644 (file)
@@ -40,10 +40,8 @@ main :: IO ()
 main = do
     args <- getArgs
     case args of
 main = do
     args <- getArgs
     case args of
-        ("-f" : ghc : args) -> do
-            doIt ghc args
-        ('-' : 'f' : ghc) : args -> do
-            doIt (dropWhile isSpace ghc) args
+        "-f" : ghc : args'        -> doIt ghc args'
+        ('-' : 'f' : ghc) : args' -> doIt (dropWhile isSpace ghc) args'
         _ -> do
             mb_ghc <- findExecutable "ghc"
             case mb_ghc of
         _ -> do
             mb_ghc <- findExecutable "ghc"
             case mb_ghc of