diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-09-06 17:14:41 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-07 16:43:58 -0400 |
commit | 7918265d53db963bfd3dd529b1063fb844549733 (patch) | |
tree | 7c4743e2874ceb7bb1292e26fe4fac3f80572194 /compiler/GHC/Iface | |
parent | ee1cfaa990205dc96148ed20c2d6560b4808b0b7 (diff) | |
download | haskell-7918265d53db963bfd3dd529b1063fb844549733.tar.gz |
Remove Outputable Char instance
Use 'text' instead of 'ppr'.
Using 'ppr' on the list "hello" rendered as "h,e,l,l,o".
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r-- | compiler/GHC/Iface/Binary.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Iface/Ext/Binary.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Iface/Ext/Types.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Iface/Recomp.hs | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/compiler/GHC/Iface/Binary.hs b/compiler/GHC/Iface/Binary.hs index 8e6fb6f5b7..5d5bacc123 100644 --- a/compiler/GHC/Iface/Binary.hs +++ b/compiler/GHC/Iface/Binary.hs @@ -118,7 +118,7 @@ readBinIfaceHeader profile _name_cache checkHiWay traceBinIFace hi_path = do check_tag <- get bh let tag = profileBuildTag profile - wantedGot "Way" tag check_tag ppr + wantedGot "Way" tag check_tag text when (checkHiWay == CheckHiWay) $ errorOnMismatch "mismatched interface file profile tag" tag check_tag @@ -381,7 +381,7 @@ getSymtabName _name_cache _dict symtab bh = do in return $! case lookupKnownKeyName u of Nothing -> pprPanic "getSymtabName:unknown known-key unique" - (ppr i $$ ppr (unpkUnique u)) + (ppr i $$ ppr u) Just n -> n _ -> pprPanic "getSymtabName:unknown name tag" (ppr i) diff --git a/compiler/GHC/Iface/Ext/Binary.hs b/compiler/GHC/Iface/Ext/Binary.hs index 1e2e4f7127..86dc042e63 100644 --- a/compiler/GHC/Iface/Ext/Binary.hs +++ b/compiler/GHC/Iface/Ext/Binary.hs @@ -331,7 +331,7 @@ fromHieName nc hie_name = do KnownKeyName u -> case lookupKnownKeyName u of Nothing -> pprPanic "fromHieName:unknown known-key unique" - (ppr (unpkUnique u)) + (ppr u) Just n -> pure n -- ** Reading and writing `HieName`'s diff --git a/compiler/GHC/Iface/Ext/Types.hs b/compiler/GHC/Iface/Ext/Types.hs index a0a8a41ece..44619808af 100644 --- a/compiler/GHC/Iface/Ext/Types.hs +++ b/compiler/GHC/Iface/Ext/Types.hs @@ -774,7 +774,7 @@ hieNameOcc (KnownKeyName u) = case lookupKnownKeyName u of Just n -> nameOccName n Nothing -> pprPanic "hieNameOcc:unknown known-key unique" - (ppr (unpkUnique u)) + (ppr u) toHieName :: Name -> HieName toHieName name diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs index 1a978f9000..860833077f 100644 --- a/compiler/GHC/Iface/Recomp.hs +++ b/compiler/GHC/Iface/Recomp.hs @@ -653,14 +653,14 @@ checkDependencies hsc_env summary iface text "package " <> quotes (ppr old) <> text "no longer in dependencies" return $ needsRecompileBecause $ UnitDepRemoved old - check_packages (new:news) olds + check_packages ((new_name, new_unit):news) olds | Just (old, olds') <- uncons olds - , snd new == old = check_packages (dropWhile ((== (snd new)) . snd) news) olds' + , new_unit == old = check_packages (dropWhile ((== new_unit) . snd) news) olds' | otherwise = do trace_hi_diffs logger $ - text "imported package " <> quotes (ppr new) <> - text " not among previous dependencies" - return $ needsRecompileBecause $ ModulePackageChanged $ fst new + text "imported package" <+> text new_name <+> ppr new_unit <+> + text "not among previous dependencies" + return $ needsRecompileBecause $ ModulePackageChanged new_name needInterface :: Module -> (ModIface -> IO RecompileRequired) |