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/Hs | |
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/Hs')
-rw-r--r-- | compiler/GHC/Hs/Type.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Hs/Type.hs b/compiler/GHC/Hs/Type.hs index de565fcae7..5cb4200ecd 100644 --- a/compiler/GHC/Hs/Type.hs +++ b/compiler/GHC/Hs/Type.hs @@ -107,6 +107,7 @@ import GHC.Core.TyCo.Rep ( Type(..) ) import GHC.Builtin.Types( manyDataConName, oneDataConName, mkTupleStr ) import GHC.Core.Ppr ( pprOccWithTick) import GHC.Core.Type +import GHC.Iface.Type import GHC.Hs.Doc import GHC.Types.Basic import GHC.Types.SrcLoc @@ -360,7 +361,7 @@ instance pprHsArrow :: (OutputableBndrId pass) => HsArrow (GhcPass pass) -> SDoc pprHsArrow (HsUnrestrictedArrow _) = arrow pprHsArrow (HsLinearArrow _) = lollipop -pprHsArrow (HsExplicitMult _ p _) = mulArrow (ppr p) +pprHsArrow (HsExplicitMult _ p _) = mulArrow (const ppr) p type instance XConDeclField (GhcPass _) = EpAnn [AddEpAnn] type instance XXConDeclField (GhcPass _) = DataConCantHappen |