[project @ 2002-05-01 17:56:52 by sof]
authorsof <unknown>
Wed, 1 May 2002 17:56:58 +0000 (17:56 +0000)
committersof <unknown>
Wed, 1 May 2002 17:56:58 +0000 (17:56 +0000)
mapM ~> mapM_

ghc/compiler/compMan/CmLink.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/main/Main.hs
ghc/compiler/usageSP/UsageSPLint.lhs

index 151099b..962c052 100644 (file)
@@ -188,7 +188,7 @@ unload Interactive dflags linkables pls
           | linkableInSet l linkables
                = return True
           | otherwise
-               = do mapM unloadObj [ f | DotO f <- objs ]
+               = do mapM_ unloadObj [ f | DotO f <- objs ]
                     return False
 #else
 unload Interactive dflags linkables pls = panic "CmLink.unload: no interpreter"
index d2a96fc..9134440 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-}
 -----------------------------------------------------------------------------
--- $Id: InteractiveUI.hs,v 1.123 2002/05/01 15:48:48 simonmar Exp $
+-- $Id: InteractiveUI.hs,v 1.124 2002/05/01 17:56:54 sof Exp $
 --
 -- GHC Interactive User Interface
 --
@@ -797,7 +797,7 @@ setProg _ = do
 setOptions wds =
    do -- first, deal with the GHCi opts (+s, +t, etc.)
       let (plus_opts, minus_opts)  = partition isPlus wds
-      mapM setOpt plus_opts
+      mapM_ setOpt plus_opts
 
       -- now, the GHC flags
       pkgs_before <- io (readIORef v_Packages)
@@ -831,7 +831,7 @@ unsetOptions str
          then io (putStrLn ("unknown option: `" ++ head rest2 ++ "'"))
          else do
 
-       mapM unsetOpt plus_opts
+       mapM_ unsetOpt plus_opts
  
        -- can't do GHC flags for now
        if (not (null minus_opts))
@@ -907,7 +907,7 @@ showBindings = do
        unqual = cmGetPrintUnqual cms
        showBinding b = putStrLn (showSDocForUser unqual (ppr (ifaceTyThing b)))
 
-  io (mapM showBinding (cmGetBindings cms))
+  io (mapM_ showBinding (cmGetBindings cms))
   return ()
 
 -----------------------------------------------------------------------------
@@ -1090,7 +1090,7 @@ linkPackage dflags pkg
            loadDynamics dirs dlls
        
        -- After loading all the DLLs, we can load the static objects.
-       mapM loadObj objs
+       mapM_ loadObj objs
 
         maybePutStr dflags "linking ... "
         ok <- resolveObjs
index e53ec3f..0e4910a 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
 
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.105 2002/05/01 09:30:05 simonmar Exp $
+-- $Id: Main.hs,v 1.106 2002/05/01 17:56:57 sof Exp $
 --
 -- GHC Driver program
 --
@@ -308,7 +308,7 @@ main =
 beginMake :: [String] -> IO ()
 beginMake fileish_args
   = do let (objs, mods) = partition objish_file fileish_args
-       mapM (add v_Ld_inputs) objs
+       mapM_ (add v_Ld_inputs) objs
 
        case mods of
         []    -> throwDyn (UsageError "no input files")
index 97da3ee..387fb8d 100644 (file)
@@ -128,7 +128,7 @@ lintTyUSPAnnotsN fom fex = lintN
                                           do { let thelint = if isFunTyCon tc
                                                              then lintTyUSPAnnots fom fex
                                                              else lintN
-                                             ; mapM thelint tys
+                                             ; mapM_ thelint tys
                                              ; return ()
                                              }
     lintN     (FunTy ty1 ty2)           = do { lintTyUSPAnnots fom fex ty1
@@ -210,9 +210,7 @@ lintTyUSPConst (TyVarTy _)                         = do { return () }
 lintTyUSPConst (AppTy ty1 ty2)                     = do { lintTyUSPConst ty1
                                                         ; lintTyUSPConst ty2
                                                         }
-lintTyUSPConst (TyConApp tc tys)                   = do { mapM lintTyUSPConst tys
-                                                        ; return ()
-                                                        }
+lintTyUSPConst (TyConApp tc tys)                   = mapM_ lintTyUSPConst tys
 lintTyUSPConst (FunTy ty1 ty2)                     = do { lintTyUSPConst ty1
                                                         ; lintTyUSPConst ty2
                                                         }