Warning fix for unused and redundant imports
[ghc-hetmet.git] / compiler / deSugar / DsListComp.lhs
index 6a25a75..a98aef6 100644 (file)
@@ -21,7 +21,6 @@ import DsMonad                -- the monadery used in the desugarer
 import DsUtils
 
 import DynFlags
-import StaticFlags
 import CoreUtils
 import Var
 import Type
@@ -50,7 +49,7 @@ dsListComp lquals body elt_ty
     let
        quals = map unLoc lquals
     in
-    if opt_RulesOff || dopt Opt_IgnoreInterfacePragmas dflags
+    if not (dopt Opt_RewriteRules dflags) || dopt Opt_IgnoreInterfacePragmas dflags
        -- Either rules are switched off, or we are ignoring what there are;
        -- Either way foldr/build won't happen, so use the more efficient
        -- Wadler-style desugaring