Add DEBUG-only flag -dsuppress-uniques to suppress printing of uniques
[ghc-hetmet.git] / compiler / basicTypes / Unique.lhs
index 1926f5c..5f9f668 100644 (file)
@@ -57,6 +57,7 @@ module Unique (
 
 #include "HsVersions.h"
 
+import StaticFlags
 import BasicTypes
 import FastString
 import Outputable
@@ -197,6 +198,11 @@ We do sometimes make strings with @Uniques@ in them:
 \begin{code}
 pprUnique :: Unique -> SDoc
 pprUnique uniq
+#ifdef DEBUG
+  | opt_SuppressUniques
+  = empty      -- Used exclusively to suppress uniques so you 
+  | otherwise  -- can compare output easily
+#endif
   = case unpkUnique uniq of
       (tag, u) -> finish_ppr tag u (text (iToBase62 u))