X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FName.lhs;h=c8a382bfac00a7834207dec88a25879b65890e6f;hb=d4e0a55c3761544989209a2180d6d0489470db3d;hp=b5e120a1ec867ba5b5226117097796a891b40633;hpb=90515a133ec54390e18e8e9145a389397359f6bd;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Name.lhs b/ghc/compiler/basicTypes/Name.lhs index b5e120a..c8a382b 100644 --- a/ghc/compiler/basicTypes/Name.lhs +++ b/ghc/compiler/basicTypes/Name.lhs @@ -23,8 +23,9 @@ module Name ( tidyTopName, nameOccName, nameModule, setNameOcc, nameRdrName, setNameModule, - isUserExportedName, isUserImportedName, isUserImportedExplicitlyName, nameSrcLoc, - isLocallyDefinedName, isDynName, + isUserExportedName, isUserImportedName, isUserImportedExplicitlyName, + maybeUserImportedFrom, + nameSrcLoc, isLocallyDefinedName, isDynName, isSystemName, isLocalName, isGlobalName, isExternallyVisibleName, @@ -431,6 +432,9 @@ isUserImportedExplicitlyName other = False isUserImportedName (Name { n_prov = NonLocalDef (UserImport _ _ _) _ }) = True isUserImportedName other = False +maybeUserImportedFrom (Name { n_prov = NonLocalDef (UserImport m _ _) _ }) = Just m +maybeUserImportedFrom other = Nothing + isDynName :: Name -> Bool -- Does this name come from a DLL? isDynName nm = not (isLocallyDefinedName nm) &&