Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/86add45dbfb6f962b65e371143dd467ae783f9e7

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

commit 86add45dbfb6f962b65e371143dd467ae783f9e7
Author: Ian Lynagh <[email protected]>
Date:   Sun Jun 5 14:09:53 2011 +0100

    Make dumpIfSet_dyn_or use dumpSDoc
    
    This means that for example
        ghc -ddump-simpl -ddump-to-file ...
    now puts the simpl output in a file, rather htan sending it to stdout.

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

 compiler/main/ErrUtils.lhs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs
index 1c7a389..a0a9f0e 100644
--- a/compiler/main/ErrUtils.lhs
+++ b/compiler/main/ErrUtils.lhs
@@ -190,11 +190,11 @@ dumpIfSet_dyn dflags flag hdr doc
   = return ()
 
 dumpIfSet_dyn_or :: DynFlags -> [DynFlag] -> String -> SDoc -> IO ()
-dumpIfSet_dyn_or dflags flags hdr doc
-  | or [dopt flag dflags | flag <- flags]
-  || verbosity dflags >= 4 
-  = printDump (mkDumpDoc hdr doc)
-  | otherwise = return ()
+dumpIfSet_dyn_or _ [] _ _ = return ()
+dumpIfSet_dyn_or dflags (flag : flags) hdr doc
+    = if dopt flag dflags || verbosity dflags >= 4
+      then dumpSDoc dflags flag hdr doc
+      else dumpIfSet_dyn_or dflags flags hdr doc
 
 mkDumpDoc :: String -> SDoc -> SDoc
 mkDumpDoc hdr doc 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to