[GHC] #10050: template haskell Ppr missing parentheses for SigT
GHC
ghc-devs at haskell.org
Fri Jan 30 23:24:47 UTC 2015
#10050: template haskell Ppr missing parentheses for SigT
-------------------------------------+-------------------------------------
Reporter: aavogt | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by adamse):
The printing of `SigE` happens in
[https://github.com/ghc/ghc/blob/master/libraries/template-
haskell/Language/Haskell/TH/Ppr.hs#L172]
and `SigT` happens in [https://github.com/ghc/ghc/blob/master/libraries
/template-haskell/Language/Haskell/TH/Ppr.hs#L507].
If it is always correct to put parens around a `Type :: Kind` signature
the fix could go in the latter place otherwise `pprExp` of `SigE` could
inspect the second argument to `SigE` to see if it is a `SigT` and only
then put parens around it.
What would be the correct solution?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10050#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list