[GHC] #8809: Prettier error messages?

GHC ghc-devs at haskell.org
Sun Jan 15 17:24:24 UTC 2017


#8809: Prettier error messages?
-------------------------------------+-------------------------------------
        Reporter:  joelteon          |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.9
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:  13122
 Related Tickets:                    |  Differential Rev(s):
  #8809,#10073,#10179,#12906         |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 Here is how I see this ticket. There are two suggestions:

 1. Make it possible to output error messages as JSON (what I want and easy
 with current infrastructure).
 2. Add more semantic information to error messages (ie attaching the
 actually expressions to SDocs, what Ben is mainly talking about, idris
 style).

 Ben in his last comment is saying that if 2. is implemented then 1. comes
 for free (I think). The main advantage of 2. is that you can build
 interfaces which use the additional localised information to provide
 different information to users, ie highlighting, hovers etc. This seems
 right to me but implementing 2. is a significant amount of work compared
 to 1. and I can't imagine the exact design off the top of my head.

 My essential point is that 1. should not be blocked by 2. Once 2. is
 implemented then 1. can be reimplemented in terms of 2. There seems to be
 suggestions of how to resolve the `pretty` issue but even after that there
 is still an extremely large amount of work to embed the right information
 in the SDoc.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8809#comment:59>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list