TH pretty-printer is missing parens around the LinearTypes' multiplicity
Summary
The function Language.Haskell.TH.pprint
, when given a MulArrowT
constructor application, prints the arrow multiplicity type without any parens even when it should parenthesize it.
Steps to reproduce
$ ghci -XLinearTypes -XTemplateHaskell
ghci> :module +Language.Haskell.TH
ghci> runQ [t| forall a m n. a %(m n) -> a |] >>= putStrLn . pprint
forall a_0 m_1 n_2 . a_0 %m_1 n_2 -> a_0
Expected behavior
forall a_0 m_1 n_2 . a_0 %(m_1 n_2) -> a_0
Environment
- GHC version used: 9.2.3
Optional:
- Operating System: Fedora Linux
- System Architecture: x86_64