X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FHscStats.lhs;h=b96eb56b8c2e69b85446241c36d5ad6c5d4d7518;hb=4063e1d8501b38b5ed8d620dcd8e27adee0e7091;hp=d12831edb70ae478a0b541f58d54efc74515235b;hpb=8bde64892f4cd134d163954c49b1e30b1ee060ff;p=ghc-hetmet.git diff --git a/compiler/main/HscStats.lhs b/compiler/main/HscStats.lhs index d12831e..b96eb56 100644 --- a/compiler/main/HscStats.lhs +++ b/compiler/main/HscStats.lhs @@ -6,18 +6,16 @@ \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 import Outputable import SrcLoc -import Char import Bag import Util -import Pretty ( Doc ) import RdrName + +import Data.Char \end{code} %************************************************************************ @@ -27,8 +25,8 @@ import RdrName %************************************************************************ \begin{code} -ppSourceStats :: Bool -> Located (HsModule RdrName) -> PprStyle -> Doc -ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _ _)) +ppSourceStats :: Bool -> Located (HsModule RdrName) -> SDoc +ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _)) = (if short then hcat else vcat) (map pp_val [("ExportAll ", export_all), -- 1 if no export list @@ -122,7 +120,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