- -- 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.
-
-isDictFunId id = case idFlavour id of
- DictFunId -> True
- other -> False
-
--- Don't drop a binding for an exported Id,
--- if it otherwise looks dead.
--- Perhaps a better name would be isDiscardableId
-isExportedId :: Id -> Bool
-isExportedId id = case idFlavour id of
- VanillaId -> False
- other -> True
-
-isLocalId :: Id -> Bool
--- True of Ids that are locally defined, but are not constants
--- like data constructors, record selectors, and the like.
--- See comments with CoreFVs.isLocalVar
-isLocalId id
-#ifdef DEBUG
- | not (isId id) = pprTrace "isLocalid" (ppr id) False
- | otherwise
-#endif
- = case idFlavour id of
- VanillaId -> True
- ExportedId -> True
- SpecPragmaId -> True
- other -> False
-\end{code}
-
-
-isImplicitId tells whether an Id's info is implied by other
-declarations, so we don't need to put its signature in an interface
-file, even if it's mentioned in some other interface unfolding.