diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-04-13 16:31:01 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-04-14 07:37:55 -0400 |
commit | 6d13094019f6dab9c3af834ed543a699b4ed710e (patch) | |
tree | 5422c3161fea0f50e80eeb7d2453bb24f0af5dbc /compiler/GHC/Tc | |
parent | e8029816fda7602a8163c4d2703ff02982a3e48c (diff) | |
download | haskell-wip/T18052.tar.gz |
Fix #18052 by using pprPrefixOcc in more placeswip/T18052
This fixes several small oversights in the choice of pretty-printing
function to use. Fixes #18052.
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index a27aab1730..4e5f2be37d 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -2122,7 +2122,7 @@ tcRnStmt hsc_env rdr_stmt } where bad_unboxed id = addErr (sep [text "GHCi can't bind a variable of unlifted type:", - nest 2 (ppr id <+> dcolon <+> ppr (idType id))]) + nest 2 (pprPrefixOcc id <+> dcolon <+> ppr (idType id))]) {- -------------------------------------------------------------------------- @@ -2903,7 +2903,7 @@ ppr_types debug type_env -- etc are suppressed (unless -dppr-debug), -- because they appear elsewhere - ppr_sig id = hang (ppr id <+> dcolon) 2 (ppr (tidyTopType (idType id))) + ppr_sig id = hang (pprPrefixOcc id <+> dcolon) 2 (ppr (tidyTopType (idType id))) ppr_tycons :: Bool -> [FamInst] -> TypeEnv -> SDoc ppr_tycons debug fam_insts type_env @@ -2921,7 +2921,7 @@ ppr_tycons debug fam_insts type_env | otherwise = isExternalName (tyConName tycon) && not (tycon `elem` fi_tycons) ppr_tc tc - = vcat [ hang (ppr (tyConFlavour tc) <+> ppr tc + = vcat [ hang (ppr (tyConFlavour tc) <+> pprPrefixOcc (tyConName tc) <> braces (ppr (tyConArity tc)) <+> dcolon) 2 (ppr (tidyTopType (tyConKind tc))) , nest 2 $ @@ -2955,7 +2955,7 @@ ppr_patsyns type_env = ppr_things "PATTERN SYNONYMS" ppr_ps (typeEnvPatSyns type_env) where - ppr_ps ps = ppr ps <+> dcolon <+> pprPatSynType ps + ppr_ps ps = pprPrefixOcc ps <+> dcolon <+> pprPatSynType ps ppr_insts :: [ClsInst] -> SDoc ppr_insts ispecs |