Add data type information to VectInfo
[ghc-hetmet.git] / compiler / iface / LoadIface.lhs
index 1c8b410..8ca7b41 100644 (file)
@@ -38,7 +38,6 @@ import InstEnv
 import FamInstEnv
 import Name
 import NameEnv
-import NameSet
 import MkId
 import Module
 import OccName
@@ -52,7 +51,6 @@ import Outputable
 import BinIface
 import Panic
 
-import Control.Monad (when)
 import Data.List
 import Data.Maybe
 import Data.IORef
@@ -369,8 +367,7 @@ loadDecl ignore_prags mod (_version, decl)
        --      * location
        -- imported name, to fix the module correctly in the cache
     mk_new_bndr mod occ 
-       = newGlobalBinder mod occ 
-                         (importedSrcLoc (showSDoc (ppr (moduleName mod))))
+       = newGlobalBinder mod occ (importedSrcSpan (moduleNameFS (moduleName mod)))
                        -- ToDo: qualify with the package name if necessary
 
     doc = ptext SLIT("Declaration for") <+> ppr (ifName decl)
@@ -658,8 +655,15 @@ pprFixities fixes = ptext SLIT("fixities") <+> pprWithCommas pprFix fixes
                    pprFix (occ,fix) = ppr fix <+> ppr occ 
 
 pprVectInfo :: IfaceVectInfo -> SDoc
-pprVectInfo (IfaceVectInfo names) = 
-  ptext SLIT("Closured converted:") <+> hsep (map ppr names)
+pprVectInfo (IfaceVectInfo { ifaceVectInfoCCVar        = vars
+                           , ifaceVectInfoCCTyCon      = tycons
+                           , ifaceVectInfoCCTyConReuse = tyconsReuse
+                           }) = 
+  vcat 
+  [ ptext SLIT("CC'ed variables:") <+> hsep (map ppr vars)
+  , ptext SLIT("CC'ed tycons:") <+> hsep (map ppr tycons)
+  , ptext SLIT("CC reused tycons:") <+> hsep (map ppr tyconsReuse)
+  ]
 
 pprDeprecs NoDeprecs       = empty
 pprDeprecs (DeprecAll txt)  = ptext SLIT("Deprecate all") <+> doubleQuotes (ftext txt)