[GHC] #11660: Remove Type pretty-printer in favor of IfaceType
GHC
ghc-devs at haskell.org
Sat Oct 15 13:41:13 UTC 2016
#11660: Remove Type pretty-printer in favor of IfaceType
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: task | Status: patch
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #12550, #12447, | Differential Rev(s): Phab:D2528
#11786, #11549, #12024, #12697, |
#12510 |
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
I've updated Phab:D2528 with the current state of my branch, which almost
passes the testsuite. There 21 testsuite failures, nearly all of which are
trivial changes in parentheses. In fact, I am quite tempted to accept the
new output since it looks significantly more consistent than the previous
output.
However, there is one rather tricky testsuite failure that I'm a bit
unsure how to handle. Namely, when we go to print an equality we look at
the types involved to determine what operator to print. However, since we
only have `IfaceType`s we can't see through type synonyms. This means that
if we have an equality,
{{{
(a :: GHC.Types.*) ~ (b :: GHC.Types.⋆)
}}}
we will render it as a heterogeneous equality (with a kind annotation on
each operand) since the kinds look different (although in reality are
synonyms).
The solution for this that I am currently leaning towards is to represent
equalities explicitly in `IfaceType` and ensure that they carry their
"flavor" for pretty-printing purposes.
**Failing tests**: `TEST="TypeSkolEscape T10632 T7939 T2431 ghci059 T7525
T7019a tcfail130 T9222 T8912 T8958 T12634 T2766 IPFail ContextStack2
T11252 ClassOperator tcfail041 tcrun045 tcfail211 T10858 T5837"`
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11660#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list