Opened 8 years ago

Closed 8 years ago

#5657 closed bug (fixed)

section suggestion adds backticks to operators

Reported by: tinctorius Owned by: simonmar
Priority: high Milestone: 7.4.1
Component: Compiler Version: 7.2.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case: rename/should_fail/T5657
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


(I'm reporting this bug as suggested by Andreas Hammar.)

When the compiler is presented with


the following errors are given:

    Failed to load interface for `LT'
    Use -v to see a list of the files searched for.

    A section must be enclosed in parentheses thus: (`LT..` GT)

The latter error incorrectly endows LT.. with backticks; this suggestion will not parse. Instead, this is expected:

    A section must be enclosed in parentheses thus: (LT.. GT)

Change History (5)

comment:1 Changed 8 years ago by simonpj

difficulty: Unknown
Milestone: 7.4.1
Owner: set to simonmar
Priority: normalhigh

comment:2 Changed 8 years ago by maeder

It should be easy to change the printing of a qualified symbol within a section (namely without backticks).

A more smart fix would be to change the internal qualified symbol "LT.." into the two tokens, after a "[", because a (qualified) symbol can never follow "[" AFAICS!

(Btw I vote against

comment:3 Changed 8 years ago by simonpj@…

commit c492e50bd681551e14f12d9fe7479d986b47e9dc

Author: Simon Peyton Jones <>
Date:   Mon Dec 19 16:45:13 2011 +0000

    Tidy up pretty-printing for variables
    We already have a class OutputableBndr; this patch adds
    methods pprInfixOcc and pprPrefixOcc, so that we can get
    rid of the hideous hack (the old) Outputable.pprHsVar.
    The hack was exposed by Trac #5657, which is thereby fixed.

 compiler/basicTypes/Name.lhs    |    3 +++
 compiler/basicTypes/RdrName.lhs |    3 +++
 compiler/coreSyn/CoreSyn.lhs    |    2 ++
 compiler/coreSyn/PprCore.lhs    |    3 +++
 compiler/hsSyn/HsDecls.lhs      |    4 ++--
 compiler/hsSyn/HsExpr.lhs       |   10 +++++-----
 compiler/hsSyn/HsImpExp.lhs     |    8 ++++----
 compiler/typecheck/TcHsSyn.lhs  |    2 +-
 compiler/types/TypeRep.lhs      |    4 +++-
 compiler/utils/Outputable.lhs   |   28 ++++++----------------------
 10 files changed, 32 insertions(+), 35 deletions(-)

comment:4 Changed 8 years ago by simonpj

Status: newmerge
Test Case: rename/should_fail/T5657

Done! Thanks for pointing out the infelicity. (It required a slightly more structural clean up than I thought, but it's been a long-standing wartlet.)


comment:5 Changed 8 years ago by igloo

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.