Don't filter out allegedly-irrelevant bindings with -dppr-debug
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 29 Oct 2014 17:50:44 +0000 (17:50 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 4 Nov 2014 10:38:00 +0000 (10:38 +0000)
compiler/typecheck/TcErrors.lhs

index 0596e0c..d2d8133 100644 (file)
@@ -40,6 +40,7 @@ import FastString
 import Outputable
 import SrcLoc
 import DynFlags
+import StaticFlags      ( opt_PprStyle_Debug )
 import ListSetOps       ( equivClasses )
 
 import Data.Maybe
@@ -1422,7 +1423,8 @@ relevantBindings want_filtering ctxt ct
                                  <+> ppr (getSrcLoc id)))]
                   new_seen = tvs_seen `unionVarSet` id_tvs
 
-            ; if (want_filtering && id_tvs `disjointVarSet` ct_tvs)
+            ; if (want_filtering && not opt_PprStyle_Debug 
+                                 && id_tvs `disjointVarSet` ct_tvs)
                        -- We want to filter out this binding anyway
                        -- so discard it silently
               then go tidy_env n_left tvs_seen docs discards tc_bndrs