Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
54b5950e
by Sylvain Henry at 2025-09-17T04:45:18-04:00
2 changed files:
Changes:
| ... | ... | @@ -336,8 +336,9 @@ hiModuleNameMismatchWarn requested_mod read_mod |
| 336 | 336 | ]
|
| 337 | 337 | ]
|
| 338 | 338 | | otherwise =
|
| 339 | - -- ToDo: This will fail to have enough qualification when the package IDs
|
|
| 340 | - -- are the same
|
|
| 339 | + -- Display fully qualified unit names. Otherwise we may not have enough
|
|
| 340 | + -- qualification and the printed names could look exactly the same.
|
|
| 341 | + pprRawUnitIds $
|
|
| 341 | 342 | withPprStyle (mkUserStyle alwaysQualify AllTheWay) $
|
| 342 | 343 | -- we want the Modules below to be qualified with package names,
|
| 343 | 344 | -- so reset the NamePprCtx setting.
|
| ... | ... | @@ -345,7 +346,6 @@ hiModuleNameMismatchWarn requested_mod read_mod |
| 345 | 346 | , ppr requested_mod
|
| 346 | 347 | , text "differs from name found in the interface file"
|
| 347 | 348 | , ppr read_mod
|
| 348 | - , parens (text "if these names look the same, try again with -dppr-debug")
|
|
| 349 | 349 | ]
|
| 350 | 350 | |
| 351 | 351 | dynamicHashMismatchError :: Module -> ModLocation -> SDoc
|
| ... | ... | @@ -66,6 +66,7 @@ module GHC.Unit.State ( |
| 66 | 66 | pprUnitInfoForUser,
|
| 67 | 67 | pprModuleMap,
|
| 68 | 68 | pprWithUnitState,
|
| 69 | + pprRawUnitIds,
|
|
| 69 | 70 | |
| 70 | 71 | -- * Utils
|
| 71 | 72 | unwireUnit)
|
| ... | ... | @@ -2269,3 +2270,7 @@ pprWithUnitState :: UnitState -> SDoc -> SDoc |
| 2269 | 2270 | pprWithUnitState state = updSDocContext (\ctx -> ctx
|
| 2270 | 2271 | { sdocUnitIdForUser = \fs -> pprUnitIdForUser state (UnitId fs)
|
| 2271 | 2272 | })
|
| 2273 | + |
|
| 2274 | +-- | Print raw unit-ids, without removing the hash
|
|
| 2275 | +pprRawUnitIds :: SDoc -> SDoc
|
|
| 2276 | +pprRawUnitIds = updSDocContext (\ctx -> ctx { sdocUnitIdForUser = ftext }) |