Ben Gamari pushed to branch wip/T25989 at Glasgow Haskell Compiler / GHC
Commits:
-
d27adfc6
by Ben Gamari at 2025-04-24T13:40:00-04:00
1 changed file:
Changes:
... | ... | @@ -302,8 +302,12 @@ instance Uniquable Unique where |
302 | 302 | |
303 | 303 | showUnique :: Unique -> String
|
304 | 304 | showUnique uniq
|
305 | - = case unpkUnique uniq of
|
|
306 | - (tag, u) -> tag : w64ToBase62 u
|
|
305 | + = tagStr ++ w64ToBase62 u
|
|
306 | + where
|
|
307 | + (tag, u) = unpkUnique uniq
|
|
308 | + tagStr
|
|
309 | + | tag < 'A' || tag > 'z' = show (ord tag) ++ "_"
|
|
310 | + | otherwise = [tag]
|
|
307 | 311 | |
308 | 312 | pprUniqueAlways :: IsLine doc => Unique -> doc
|
309 | 313 | -- The "always" means regardless of -dsuppress-uniques
|