[project @ 1996-04-20 10:37:06 by partain]
[ghc-hetmet.git] / ghc / compiler / main / MkIface.lhs
index 46bb220..8cd4e60 100644 (file)
@@ -8,7 +8,7 @@
 
 module MkIface ( mkInterface ) where
 
-import PrelInfo                ( mkLiftTy, pRELUDE_CORE, pRELUDE_BUILTIN )
+import PrelInfo                ( mkLiftTy, pRELUDE_BUILTIN )
 import HsSyn           ( FixityDecl(..), RenamedFixityDecl(..), MonoBinds,
                          RenamedMonoBinds(..), Name, RenamedPat(..), Sig
                        )
@@ -138,7 +138,7 @@ mkInterface modname export_list_fns inline_env tycon_specs
            else
               let
                   eq_fn = if isTopLevId i -- can't trust uniqs
-                          then (\ x y -> getOrigName x == getOrigName y)
+                          then (\ x y -> origName x == origName y)
                           else eqId
               in
               case [ x | x <- better_ids, x `eq_fn` i ] of
@@ -271,7 +271,7 @@ do_import_decls mod_name vals classes tycons
     print_a_decl (ielist@((m,_,_) : _))
       |  m == mod_name
       || (not compiling_the_prelude &&
-         (m == pRELUDE_CORE || m == pRELUDE_BUILTIN))
+         ({-OLD:m == pRELUDE_CORE ||-} m == pRELUDE_BUILTIN))
       = ppNil
 
       | otherwise
@@ -281,7 +281,7 @@ do_import_decls mod_name vals classes tycons
                  ]
       where
        isnt_tycon_ish :: FAST_STRING -> Bool
-       isnt_tycon_ish str = not (isConop str)
+       isnt_tycon_ish str = not (isLexCon str)
 
        grab_non_Nothings :: [[Maybe FAST_STRING]] -> [FAST_STRING]
 
@@ -289,7 +289,7 @@ do_import_decls mod_name vals classes tycons
 
        pp_str :: FAST_STRING -> Pretty
        pp_str pstr
-         = if isAvarop pstr then ppStr ("("++str++")") else ppPStr pstr
+         = if isLexVarSym pstr then ppStr ("("++str++")") else ppPStr pstr
          where
            str = _UNPK_ pstr
 \end{code}
@@ -325,8 +325,8 @@ get_tycon_pair tycon
     (orig_mod, nm_to_print) }
 
 generic_pair thing
-  = case (getOrigName       thing) of { (orig_mod, orig_nm) ->
-    case (getOccurrenceName thing) of { occur_name ->
+  = case (moduleNamePair       thing) of { (orig_mod, orig_nm) ->
+    case (getOccName thing) of { occur_name ->
     (orig_mod, orig_nm) }}
 \end{code}
 
@@ -381,7 +381,7 @@ do_value better_id_fn inline_env val
   = let
        sty         = PprInterface
        better_val  = better_id_fn val
-       name_str    = getOccurrenceName better_val -- NB: not orig name!
+       name_str    = getOccName better_val -- NB: not orig name!
 
        id_info     = getIdInfo better_val
 
@@ -412,10 +412,10 @@ do_value better_id_fn inline_env val
                    ppPStr SLIT("::"), pprGenType sty val_ty])
            pp_id_info
 
--- sadly duplicates Outputable.pprNonOp (ToDo)
+-- sadly duplicates Name.pprNonSym (ToDo)
 
 ppr_non_op str
-  = if isAvarop str -- NOT NEEDED: || isAconop
+  = if isLexVarSym str -- NOT NEEDED: || isAconop
     then ppBesides [ppLparen, ppPStr str, ppRparen]
     else ppPStr str
 \end{code}
@@ -513,10 +513,10 @@ is_exportable_tycon_or_class export_list_fns tc
            export_list_fns tc
 
 in_export_list_or_among_dotdot_modules ignore_Mdotdots (in_export_list, among_dotdot_modules) tc
-  = if in_export_list (getOccurrenceName tc) then
+  = if in_export_list (getOccName tc) then
        True
     else
---     pprTrace "in_export:" (ppAbove (ppr PprDebug ignore_Mdotdots) (ppPStr (getOccurrenceName tc))) (
+--     pprTrace "in_export:" (ppAbove (ppr PprDebug ignore_Mdotdots) (ppPStr (getOccName  tc))) (
     if ignore_Mdotdots then
        False
     else
@@ -528,7 +528,7 @@ is_mentionable tc
   where
     from_PreludeCore_or_Builtin thing
       = let
-           mod_name = fst (getOrigName thing)
+           mod_name = fst (moduleNamePair thing)
        in
        mod_name == pRELUDE_CORE || mod_name == pRELUDE_BUILTIN