-nameUnique :: Name -> Unique
-nameModAndOcc :: Name -> (Module, OccName) -- Globals only
-nameOccName :: Name -> OccName
-nameModule :: Name -> Module
-nameSrcLoc :: Name -> SrcLoc
-isLocallyDefinedName :: Name -> Bool
-isExportedName :: Name -> Bool
-isWiredInName :: Name -> Bool
-isLocalName :: Name -> Bool
-isGlobalName :: Name -> Bool
-isExternallyVisibleName :: Name -> Bool
-
-
-
-nameUnique (Local u _ _) = u
-nameUnique (Global u _ _ _) = u
-
-nameOccName (Local _ occ _) = occ
-nameOccName (Global _ _ occ _) = occ
-
-nameModule (Global _ mod occ _) = mod
-
-nameModAndOcc (Global _ mod occ _) = (mod,occ)
-
-isExportedName (Global _ _ _ (LocalDef _ Exported)) = True
-isExportedName other = False
-
-nameSrcLoc (Global _ _ _ (LocalDef loc _)) = loc
-nameSrcLoc (Global _ _ _ (NonLocalDef (UserImport _ loc _) _ _)) = loc
-nameSrcLoc (Global _ _ _ (WiredInTyCon _)) = mkBuiltinSrcLoc
-nameSrcLoc (Global _ _ _ (WiredInId _)) = mkBuiltinSrcLoc
-nameSrcLoc other = noSrcLoc
-
-isLocallyDefinedName (Local _ _ _) = True
-isLocallyDefinedName (Global _ _ _ (LocalDef _ _)) = True
-isLocallyDefinedName other = False
-
--- Things the compiler "knows about" are in some sense
--- "imported". When we are compiling the module where
--- the entities are defined, we need to be able to pick
--- them out, often in combination with isLocallyDefined.
-isWiredInName (Global _ _ _ (WiredInTyCon _)) = True
-isWiredInName (Global _ _ _ (WiredInId _)) = True
-isWiredInName _ = False
-
-maybeWiredInIdName :: Name -> Maybe Id
-maybeWiredInIdName (Global _ _ _ (WiredInId id)) = Just id
-maybeWiredInIdName other = Nothing
-
-maybeWiredInTyConName :: Name -> Maybe TyCon
-maybeWiredInTyConName (Global _ _ _ (WiredInTyCon tc)) = Just tc
-maybeWiredInTyConName other = Nothing
-
-
-isLocalName (Local _ _ _) = True
-isLocalName _ = False
-
-isSysLocalName (Local _ _ sys) = sys
-isSysLocalName other = False
-
-isGlobalName (Global _ _ _ _) = True
-isGlobalName other = False
-
--- Global names are by definition those that are visible
--- outside the module, *as seen by the linker*. Externally visible
--- does not mean visible at the source level (that's isExported).
-isExternallyVisibleName name = isGlobalName name