[GHC] #15985: `pprint EqualityT` infinitely loops
GHC
ghc-devs at haskell.org
Mon Dec 3 12:47:19 UTC 2018
#15985: `pprint EqualityT` infinitely loops
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.8.1
Component: Template Haskell | Version: 8.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5403
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"89d80921d9328499ffca9877e7dea540350be9c1/ghc" 89d8092/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="89d80921d9328499ffca9877e7dea540350be9c1"
Fix embarrassing infinite loop in pprParendType
Summary:
`pprParendType` was missing an explicit case for
`EqualityT`, which caused it to fall through to a catch-all case
that invokes `ppr`. But `ppr` itself does not have a case for a
partial application of `EqualityT`, so //it// falls back to
`pprParendType`, resulting in an infinite loop!
The fix is simple: add a case for `EqualityT` in `pprParendType`.
While I was in the neighborhood, I removed the catch-call case in
`pprParendType` to make this sort of mistake less likely to happen
in the future.
Test Plan: make test TEST=T15985
Reviewers: bgamari, monoidal, simonpj
Reviewed By: monoidal, simonpj
Subscribers: rwbarton, carter
GHC Trac Issues: #15985
Differential Revision: https://phabricator.haskell.org/D5403
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15985#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list