summaryrefslogtreecommitdiff
path: root/compiler/vectorise
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-18 14:59:12 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-18 16:01:53 +0100
commitd4a1964300295bfe700caa89f5d28c53eb74bdef (patch)
tree2afbbf41aad8cc65c0a60d859d5cec4e56532bb2 /compiler/vectorise
parent51da4ee2401983359db9caad3902a98a8f505431 (diff)
downloadhaskell-d4a1964300295bfe700caa89f5d28c53eb74bdef.tar.gz
Refactor the way dump flags are handled
We were being inconsistent about how we tested whether dump flags were enabled; in particular, sometimes we also checked the verbosity, and sometimes we didn't. This lead to oddities such as "ghc -v4" printing an "Asm code" section which didn't contain any code, and "-v4" enabled some parts of "-ddump-deriv" but not others. Now all the tests use dopt, which also takes the verbosity into account as appropriate.
Diffstat (limited to 'compiler/vectorise')
-rw-r--r--compiler/vectorise/Vectorise/Monad/Base.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/vectorise/Vectorise/Monad/Base.hs b/compiler/vectorise/Vectorise/Monad/Base.hs
index 177b078a95..3cb6adb7a6 100644
--- a/compiler/vectorise/Vectorise/Monad/Base.hs
+++ b/compiler/vectorise/Vectorise/Monad/Base.hs
@@ -130,9 +130,9 @@ traceVt herald doc
-- |Dump the given program conditionally.
--
-dumpOptVt :: GeneralFlag -> String -> SDoc -> VM ()
+dumpOptVt :: DumpFlag -> String -> SDoc -> VM ()
dumpOptVt flag header doc
- = do { b <- liftDs $ goptM flag
+ = do { b <- liftDs $ doptM flag
; if b
then dumpVt header doc
else return ()