Fix #15527 by pretty-printing an RdrName prefixly
ClosedPublic

Authored by RyanGlScott on Aug 15 2018, 3:32 PM.

Details

Summary

When (.) @Int is used without enabling TypeApplications,
the resulting error message will pretty-print the (symbolic)
RdrName (.). However, it does so without parenthesizing it, which
causes the pretty-printed expression to appear as .@Int. Yuck.

Since the expression in a type application will always be prefix,
we can fix this issue by using pprPrefixOcc instead of plain ol'
ppr.

Test Plan

make test TEST=T15527

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
RyanGlScott created this revision.Aug 15 2018, 3:32 PM
monoidal accepted this revision.Aug 15 2018, 7:12 PM
This revision is now accepted and ready to land.Aug 15 2018, 7:12 PM
simonpj accepted this revision.Aug 16 2018, 3:23 AM
This revision was automatically updated to reflect the committed changes.