Major patch to fix reporting of unused imports
[ghc-hetmet.git] / compiler / main / HscStats.lhs
index d12831e..3bcaac4 100644 (file)
@@ -6,8 +6,6 @@
 \begin{code}
 module HscStats ( ppSourceStats ) where
 
--- XXX This define is a bit of a hack, and should be done more nicely
-#define FAST_STRING_NOT_NEEDED 1
 #include "HsVersions.h"
 
 import HsSyn
@@ -16,7 +14,6 @@ import SrcLoc
 import Char
 import Bag
 import Util
-import Pretty ( Doc )
 import RdrName
 \end{code}
 
@@ -27,7 +24,7 @@ import RdrName
 %************************************************************************
 
 \begin{code}
-ppSourceStats :: Bool -> Located (HsModule RdrName) -> PprStyle -> Doc
+ppSourceStats :: Bool -> Located (HsModule RdrName) -> SDoc
 ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _ _))
  = (if short then hcat else vcat)
         (map pp_val
@@ -122,7 +119,7 @@ ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _ _))
     sig_info (InlineSig _ _)    = (0,0,0,1)
     sig_info _                  = (0,0,0,0)
 
-    import_info (L _ (ImportDecl _ _ qual as spec))
+    import_info (L _ (ImportDecl _ _ _ qual as spec))
        = add6 (1, qual_info qual, as_info as, 0,0,0) (spec_info spec)
     qual_info False  = 0
     qual_info True   = 1