[project @ 1999-07-12 14:40:08 by simonmar]
[ghc-hetmet.git] / ghc / compiler / basicTypes / Id.lhs
index 1c8e026..aa086a1 100644 (file)
@@ -22,6 +22,7 @@ module Id (
 
        -- Predicates
        omitIfaceSigForId,
+       exportWithOrigOccName,
        externallyVisibleId,
        idFreeTyVars, 
 
@@ -248,6 +249,12 @@ omitIfaceSigForId id
                -- the instance decl
 
        other          -> False -- Don't omit!
+
+-- Certain names must be exported with their original occ names, because
+-- these names are bound by either a class declaration or a data declaration
+-- or an explicit user export.
+exportWithOrigOccName :: Id -> Bool
+exportWithOrigOccName id = omitIfaceSigForId id || isUserExportedId id
 \end{code}