[GHC] #9752: Output unicode characters

GHC ghc-devs at haskell.org
Sat Nov 1 18:16:56 UTC 2014


#9752: Output unicode characters
-------------------------------------+-------------------------------------
              Reporter:  pokiaka     |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:  unicode, stderr,
      Operating System:  Windows     |  errors, output, printing, encoding,
       Type of failure:  Incorrect   |  utf, utf8
  result at runtime                  |     Architecture:  Unknown/Multiple
             Test Case:              |       Difficulty:  Easy (less than 1
              Blocking:              |  hour)
Differential Revisions:              |       Blocked By:
                                     |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by pokiaka):

 Replying to [comment:1 thomie]:
 > Could you add an example please?

 Definitely.

 Source:
 {{{
 {-# LANGUAGE UnicodeSyntax #-}
 module Example where
 (∈) = elem
 oops = 20 ∈ (10,20,30)
 }}}

 Output:
 {{{
 [1 of 1] Compiling Example          ( Example.hs, Example.o )

 Example.hs:4:13:
     Couldn't match expected type `[a0]' with actual type `(t0, t1, t2)'
     In the second argument of `(<stderr>: commitBuffer: invalid argument
 (invalid character)
 }}}

 As you can see, it prints the error where it should have printed `∈`, and
 then immediately stopped printing, discarding any next messages.<br />
 Same behavior on GHCi, and WinGHCi, of course.

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


More information about the ghc-tickets mailing list