From 3c1e70b86cb5c4b000c75c0f720556683d4053be Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 21 Jan 1999 19:59:22 +0000 Subject: [PATCH] [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. --- ghc/compiler/basicTypes/Id.lhs | 5 ++--- ghc/compiler/basicTypes/Name.lhs | 10 ++++++---- 2 files changed, 8 insertions(+), 7 deletions(-) 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} -- 1.7.10.4