[GHC] #8809: Prettier error messages?
GHC
ghc-devs at haskell.org
Thu Nov 17 09:39:36 UTC 2016
#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:
Related Tickets: | Differential Rev(s):
#8809,#10073,#10179 |
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I'm delighted to see activity on the "better error messages" front. Thank
you!
There are two separate lines of thought here:
1. Using colour etc in `SDoc`, in a way that is portable across platforms.
This seems to be non-trivial (comment:33 and comment:34), but it's non-
controversial and it'd be great to have. I think Phab:D2716 and
Phab:D2717 are about this.
2. Some infrastructure to allow more info to be displayed in error
messages. That's what Phab:D2718 is about.
I suggest we split (2) into a separate ticket. On (1) let's just do it.
On the (2) front, I confess that I'm not keen on the approach shown in
Phab:D2718, which allows an `SDoc` to contain an I/O action. It smells
wrong in principle to me; it would fork GHC away from our goal of using
the Hackage `pretty` library (#10735); and I think we can do better.
I would love to make progress on adopting David Christiansen's idea for
pretty printing, which he calls "A pretty printer that says what it
means":
* [https://www.youtube.com/watch?v=m7BBCcIDXSg Video],
* [https://hackerfall.com/story/a-pretty-printer-that-says-what-it-means
Blog post]
* [https://wiki.haskell.org/wikiupload/4/4c/Hiw-2015-david-
christiansen.pdf Slides]
* [https://github.com/david-christiansen/hindent Git repo for hindent, an
extensible Haskell pretty printer]
That's what Ben is alluding to in comment:31.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8809#comment:35>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list