diff options
author | jackohughes <jack@jackohughes.com> | 2022-04-11 19:41:02 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-13 12:10:34 -0400 |
commit | 668a9ef496f9df7e628397c4de9a0a4fcdcd7e6a (patch) | |
tree | 11a79dacda0b6c7cf550dc5c6d34af82fa965620 /compiler/GHC/Tc | |
parent | 3bf938b6c5e1190f3a55e149deaec2f6309d398f (diff) | |
download | haskell-668a9ef496f9df7e628397c4de9a0a4fcdcd7e6a.tar.gz |
Fix printing of brackets in multiplicities (#20315)
Change mulArrow to allow for printing of correct application precedence
where necessary and update callers of mulArrow to reflect this.
As part of this, move mulArrow from GHC/Utils/Outputtable to GHC/Iface/Type.
Fixes #20315
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r-- | compiler/GHC/Tc/Types/Evidence.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Types/Evidence.hs b/compiler/GHC/Tc/Types/Evidence.hs index c6c0c7b0ca..837903a0f7 100644 --- a/compiler/GHC/Tc/Types/Evidence.hs +++ b/compiler/GHC/Tc/Types/Evidence.hs @@ -87,6 +87,8 @@ import GHC.Core import GHC.Core.Class (Class, classSCSelId ) import GHC.Core.FVs ( exprSomeFreeVars ) +import GHC.Iface.Type + import GHC.Utils.Misc import GHC.Utils.Panic import GHC.Utils.Outputable @@ -1034,7 +1036,7 @@ instance Outputable EvCallStack where instance Outputable EvTypeable where ppr (EvTypeableTyCon ts _) = text "TyCon" <+> ppr ts ppr (EvTypeableTyApp t1 t2) = parens (ppr t1 <+> ppr t2) - ppr (EvTypeableTrFun tm t1 t2) = parens (ppr t1 <+> mulArrow (ppr tm) <+> ppr t2) + ppr (EvTypeableTrFun tm t1 t2) = parens (ppr t1 <+> mulArrow (const ppr) tm <+> ppr t2) ppr (EvTypeableTyLit t1) = text "TyLit" <> ppr t1 |