| 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"
{-# 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
--
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)
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))
unqual = cmGetPrintUnqual cms
showBinding b = putStrLn (showSDocForUser unqual (ppr (ifaceTyThing b)))
- io (mapM showBinding (cmGetBindings cms))
+ io (mapM_ showBinding (cmGetBindings cms))
return ()
-----------------------------------------------------------------------------
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
{-# 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
--
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")
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
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
}