[project @ 2001-02-20 15:36:55 by simonpj]
[ghc-hetmet.git] / ghc / compiler / basicTypes / Id.lhs
index 4026676..13443a9 100644 (file)
@@ -24,7 +24,6 @@ module Id (
        -- Predicates
        isImplicitId, isDeadBinder,
        externallyVisibleId,
-       isIP,
        isSpecPragmaId, isRecordSelector,
        isPrimOpId, isPrimOpId_maybe, isDictFunId,
        isDataConId, isDataConId_maybe, 
@@ -88,8 +87,7 @@ import IdInfo
 import Demand          ( Demand )
 import Name            ( Name, OccName,
                          mkSysLocalName, mkLocalName,
-                         nameIsLocallyDefined,
-                         getOccName, isIPOcc
+                         getOccName
                        ) 
 import OccName         ( UserFS )
 import PrimRep         ( PrimRep )
@@ -161,6 +159,7 @@ mkTemplateLocals tys = zipWith (mkSysLocal SLIT("tpl"))
                               tys
 
 mkTemplateLocalsNum :: Int -> [Type] -> [Id]
+-- The Int gives the starting point for unique allocation
 mkTemplateLocalsNum n tys = zipWith (mkSysLocal SLIT("tpl"))
                               (getNumBuiltinUniques n (length tys))
                               tys
@@ -280,15 +279,6 @@ file, even if it's mentioned in some other interface unfolding.
 \begin{code}
 isImplicitId :: Id -> Bool
 isImplicitId id
-  = ASSERT2( not (omit && nameIsLocallyDefined (idName id)
-                       && idTyGenInfo id /= TyGenNever),
-             ppr id )
-    -- mustn't omit type signature for a name whose type might change!
-    omit
-  where
-    omit = isImplicitId' id
-
-isImplicitId' id
   = case idFlavour id of
        RecordSelId _   -> True -- Includes dictionary selectors
         PrimOpId _      -> True
@@ -298,21 +288,13 @@ isImplicitId' id
                -- remember that all type and class decls appear in the interface file.
                -- The dfun id must *not* be omitted, because it carries version info for
                -- the instance decl
-
-       ConstantId -> False     -- Ordinary Ids
-       DictFunId  -> False
-       
-       ExportedId   -> False   -- I don't think these happen
-       VanillaId    -> False   -- ditto
-       SpecPragmaId -> False   -- ditto
+       other           -> False
 \end{code}
 
 \begin{code}
 isDeadBinder :: Id -> Bool
 isDeadBinder bndr | isId bndr = isDeadOcc (idOccInfo bndr)
                  | otherwise = False   -- TyVars count as not dead
-
-isIP id = isIPOcc (getOccName id)
 \end{code}