[GHC] #8809: Prettier error messages?

GHC ghc-devs at haskell.org
Thu Nov 17 03:41:15 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 Rufflewind):

 Replying to [comment:32 Phyx-]:
 > This looks nice, I don't know what the plans are, but I'd love for us to
 stop diverging on Windows support for stuff like this (VT100 escape
 sequences are supported fine on Windows 10 builds 10586 and later, or any
 console with ANSICON, ConEMU or xterm such as the standard MSYS2 console).
 I can help with the detection if you don't know how. I'll also be pushing
 an update to the `Win32` package which adds a function
 `isVT100ConsoleSupported`. The definition can be in-lined and used.

 I omitted support for Windows because I wanted to do it via
 `SetConsoleTextAttribute`, which would require further changes to `Doc`
 and its friends.  I didn't realize it was still possible to
 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` though − I had assumed it was a
 legacy feature that MS wanted to go away.  That being said, the
 [https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-
 ubuntu-on-windo/suggestions/15617610--re-enable-enable-virtual-terminal-
 processing-by change in 10586 was actually a mistake].  It is still
 necessary to manually `ENABLE_VIRTUAL_TERMINAL_PROCESSING`.

 Actually, for `Win32` it would be really nice to have `GetConsoleMode`.
 Then it'd be possible to color detection on Windows (heavily inspired by
 LLVM):

 {{{#!c
 DWORD mode = 0;
 HANDLE handle = GetStdHandle(STD_ERROR_HANDLE);
 if (handle == INVALID_HANDLE_VALUE) {
     return 0;
 }
 if (GetConsoleMode, &mode) == 0) {
     return 0;
 }
 return 1;
 }}}

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


More information about the ghc-tickets mailing list