Ticket #5510 (closed feature request: wontfix)

Opened 20 months ago

Last modified 19 months ago

Representation of GHC Errors

Reported by: mgsloan1 Owned by:
Priority: normal Milestone:
Component: GHC API Version: 7.2.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I propose to add a data representation of GHC's errors to the API. This would facilitate external machine-processing of error messages and allow for internationalization of error messages, if this is desirable.

I'm writing an error message parser, but it seems like exporting an ADT representation of the errors would be less error-prone.

Change History

Changed 20 months ago by simonpj

Changing all GHC's errors to use a data type instead would be a major task. There are so many of them! And they change frequently. Any change to an error message would then involve

  • Changing the data type
  • Changing its pretty printer
  • Recompiling every module that could generate errors (because the data type changed)

Moreover, the text of the message would be generated in the pretty printer, far away from the module that generated it in the first place. When changing the latter, that makes it harder to see what error messages will arise from a paricular event.

So I think it's laudable in principle -- it would allow clients of the GHC API to take different action depending on what kind of error arise -- but I think it would be quite a big deal in practice.

Maybe you can say more about your application? Maybe something less large scale woudl suffice.

Changed 19 months ago by igloo

  • status changed from new to closed
  • resolution set to wontfix

No response from submitter, so closing.

Note: See TracTickets for help on using tickets.