[project @ 2002-08-29 15:44:11 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / MkIface.lhs
index 1bf3a35..f2b908e 100644 (file)
@@ -38,7 +38,7 @@ import CmdLineOpts
 import Id              ( idType, idInfo, isImplicitId, idCgInfo,
                          isLocalId, idName,
                        )
-import DataCon         ( dataConId, dataConSig, dataConFieldLabels, dataConStrictMarks )
+import DataCon         ( dataConWorkId, dataConSig, dataConFieldLabels, dataConStrictMarks )
 import IdInfo          -- Lots
 import Var              ( Var )
 import CoreSyn         ( CoreRule(..), IdCoreRule )
@@ -61,6 +61,7 @@ import Util           ( sortLt, dropList )
 import Binary          ( getBinFileWithDict )
 import BinIface                ( writeBinIface )
 import ErrUtils                ( dumpIfSet_dyn )
+import FastString
 
 import Monad           ( when )
 import Maybe           ( catMaybes )
@@ -219,7 +220,7 @@ ifaceTyThing (AClass clas) = cls_decl
     tycon     = classTyCon clas
     data_con  = head (tyConDataCons tycon)
     sys_names = mkClassDeclSysNames (getName tycon, getName data_con, 
-                                    getName (dataConId data_con), map getName sc_sels)
+                                    getName (dataConWorkId data_con), map getName sc_sels)
 
     toClassOpSig (sel_id, def_meth)
        = ASSERT(sel_tyvars == clas_tyvars)
@@ -278,7 +279,7 @@ ifaceTyThing (ATyCon tycon) = ty_decl
     ifaceConDecls (DataCons cs) = DataCons (map ifaceConDecl cs)
 
     ifaceConDecl data_con 
-       = ConDecl (getName data_con) (getName (dataConId data_con))
+       = ConDecl (getName data_con) (getName (dataConWorkId data_con))
                  (toHsTyVars ex_tyvars)
                  (toHsContext ex_theta)
                  details noSrcLoc
@@ -377,7 +378,7 @@ ifaceRule (id, Rule name act bndrs args rhs)
 
 bogusIfaceRule :: (NamedThing a) => a -> RuleDecl Name pat
 bogusIfaceRule id
-  = IfaceRule SLIT("bogus") NeverActive [] (getName id) [] (UfVar (getName id)) noSrcLoc
+  = IfaceRule FSLIT("bogus") NeverActive [] (getName id) [] (UfVar (getName id)) noSrcLoc
 \end{code}
 
 
@@ -554,7 +555,7 @@ dump_rules rs = vcat [ptext SLIT("{-# RULES"),
 pprIface :: ModIface -> SDoc
 pprIface iface
  = vcat [ ptext SLIT("__interface")
-               <+> doubleQuotes (ptext (mi_package iface))
+               <+> doubleQuotes (ftext (mi_package iface))
                <+> ppr (mi_module iface) <+> ppr (vers_module version_info)
                <+> pp_sub_vers
                <+> (if mi_orphan iface then char '!' else empty)
@@ -671,11 +672,11 @@ pprRulesAndDeprecs rules deprecs
     pp_deprecs deprecs   = ptext SLIT("__D") <+> guts
                          where
                            guts = case deprecs of
-                                       DeprecAll txt  -> doubleQuotes (ptext txt)
+                                       DeprecAll txt  -> doubleQuotes (ftext txt)
                                        DeprecSome env -> ppr_deprec_env env
 
-ppr_deprec_env :: NameEnv (Name, FAST_STRING) -> SDoc
+ppr_deprec_env :: NameEnv (Name, FastString) -> SDoc
 ppr_deprec_env env = vcat (punctuate semi (map pp_deprec (nameEnvElts env)))
                   where
-                    pp_deprec (name, txt) = pprOcc name <+> doubleQuotes (ptext txt)
+                    pp_deprec (name, txt) = pprOcc name <+> doubleQuotes (ftext txt)
 \end{code}