- -- hasNoBinding returns True of an Id which may not have a
- -- binding, even though it is defined in this module. Notably,
- -- the constructors of a dictionary are in this situation.
-
--- Don't drop a binding for an exported Id,
--- if it otherwise looks dead.
-isExportedId :: Id -> Bool
-isExportedId id = isUserExportedId id -- Try this
-{-
- case idFlavour id of
- VanillaId -> False
- other -> True -- All the others are no-discard
--}
-
--- Say if an Id was exported by the user
--- Implies isExportedId (see mkId above)
-isUserExportedId :: Id -> Bool
-isUserExportedId id = isUserExportedName (idName id)
-\end{code}