Commit d2d3b719 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Avoid a needless trip via SDoc when showing a Unique

parent 1c490467
...@@ -78,7 +78,6 @@ import DynFlags ...@@ -78,7 +78,6 @@ import DynFlags
import SrcLoc import SrcLoc
import BasicTypes import BasicTypes
import Outputable import Outputable
import Unique
import FastString import FastString
import ListSetOps import ListSetOps
import Util import Util
...@@ -736,8 +735,7 @@ mkStableIdFromString :: String -> Type -> SrcSpan -> (OccName -> OccName) -> TcM ...@@ -736,8 +735,7 @@ mkStableIdFromString :: String -> Type -> SrcSpan -> (OccName -> OccName) -> TcM
mkStableIdFromString str sig_ty loc occ_wrapper = do mkStableIdFromString str sig_ty loc occ_wrapper = do
uniq <- newUnique uniq <- newUnique
mod <- getModule mod <- getModule
let uniq_str = showSDoc (pprUnique uniq) :: String let occ = mkVarOcc (str ++ '_' : show uniq) :: OccName
occ = mkVarOcc (str ++ '_' : uniq_str) :: OccName
gnm = mkExternalName uniq mod (occ_wrapper occ) loc :: Name gnm = mkExternalName uniq mod (occ_wrapper occ) loc :: Name
id = mkExportedLocalId gnm sig_ty :: Id id = mkExportedLocalId gnm sig_ty :: Id
return id return id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment