[GHC] #2507: quotation characters in error messages

GHC ghc-devs at haskell.org
Sun Sep 15 19:58:42 CEST 2013


#2507: quotation characters in error messages
-------------------------------------+------------------------------------
        Reporter:  Isaac Dupree      |            Owner:
            Type:  feature request   |           Status:  new
        Priority:  lowest            |        Milestone:  7.6.2
       Component:  Compiler          |          Version:  6.8.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:  #2811,#3398
-------------------------------------+------------------------------------

Comment (by goldfire):

 It might be worth noting that when I run ghc in a bash shell from within
 Emacs on my Mac, the Unicode quotes cause formatting codes to be printed
 in place of the quotes. For example:

 {{{
     The type signature for \342\200\233foo\342\200\231 lacks an
 accompanying binding
       (The type signature must be given where \342\200\233foo\342\200\231
 is declared)
 }}}

 I couldn't seem to disable Unicode printing in this case, which mattered,
 as I was planning on using ghc in this configuration for a presentation.
 As it turned out, I found an emacs-specific solution (included below for
 the curious; I forget the source, sorry), but I can imagine a scenario
 where there's no easy solution to this problem. Perhaps use something like
 `-fno-unicode-quotes`?

 Emacs solution that worked for me, added to my `.emacs` file:

 {{{
 (setq locale-coding-system 'utf-8)
 (set-terminal-coding-system 'utf-8-unix)
 (set-keyboard-coding-system 'utf-8)
 (set-selection-coding-system 'utf-8)
 (prefer-coding-system 'utf-8)
 }}}

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



More information about the ghc-tickets mailing list