From: sof Date: Thu, 21 Jan 1999 19:59:22 +0000 (+0000) Subject: [project @ 1999-01-21 19:59:20 by sof] X-Git-Tag: Approx_2487_patches~29 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3c1e70b86cb5c4b000c75c0f720556683d4053be;p=ghc-hetmet.git [project @ 1999-01-21 19:59:20 by sof] Removed unused args from Id.mkIdVisible and Name.mkNameVisible. Perpetuated Name.mkTopName hack in Name.mkNameVisible. --- diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index 56afa7a..2b8271e 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -174,9 +174,8 @@ omitIfaceSigForId id \end{code} \begin{code} -mkIdVisible :: Module -> Unique -> Id -> Id -mkIdVisible mod u id - = setIdName id (mkNameVisible mod u (idName id)) +mkIdVisible :: Module -> Id -> Id +mkIdVisible mod id = setIdName id (mkNameVisible mod (idName id)) \end{code} %************************************************************************ diff --git a/ghc/compiler/basicTypes/Name.lhs b/ghc/compiler/basicTypes/Name.lhs index a84e626..806c992 100644 --- a/ghc/compiler/basicTypes/Name.lhs +++ b/ghc/compiler/basicTypes/Name.lhs @@ -231,10 +231,12 @@ getNameProvenance (Local _ _ _) = LocalDef noSrcLoc NotExported \begin{code} -- make the Name globally visible regardless. -mkNameVisible :: Module -> Unique -> Name -> Name -mkNameVisible mod occ_uniq nm@(Global _ _ _ _) = nm -mkNameVisible mod occ_uniq nm@(Local uniq occ _) - = Global uniq mod occ (LocalDef noSrcLoc Exported) +mkNameVisible :: Module -> Name -> Name +mkNameVisible mod nm@(Global _ _ _ _) = nm +mkNameVisible mod nm@(Local uniq occ _) = Global uniq mod g_occ (LocalDef noSrcLoc Exported) + where + -- See mkTopName comment. A hack. + g_occ = varOcc (_PK_ (occNameString occ ++ show uniq)) \end{code}