Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Types/Unique.hs
    ... ... @@ -302,8 +302,14 @@ 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
    +    -- Avoid emitting non-printable characters in pretty uniques.
    
    309
    +    -- See #25989.
    
    310
    +    tagStr
    
    311
    +      | tag < 'A' || tag > 'z' = show (ord tag) ++ "_"
    
    312
    +      | otherwise              = [tag]
    
    307 313
     
    
    308 314
     pprUniqueAlways :: IsLine doc => Unique -> doc
    
    309 315
     -- The "always" means regardless of -dsuppress-uniques