[GHC] #5518: Some unicode symbols are not allow in literal characters or strings

GHC ghc-devs at haskell.org
Mon Aug 13 16:33:24 UTC 2018


#5518: Some unicode symbols are not allow in literal characters or strings
---------------------------------+--------------------------------------
        Reporter:  ertai         |                Owner:  (none)
            Type:  bug           |               Status:  closed
        Priority:  normal        |            Milestone:
       Component:  Compiler      |              Version:  7.0.3
      Resolution:  fixed         |             Keywords:
Operating System:  Linux         |         Architecture:  x86_64 (amd64)
 Type of failure:  None/Unknown  |            Test Case:
      Blocked By:                |             Blocking:
 Related Tickets:                |  Differential Rev(s):
       Wiki Page:                |
---------------------------------+--------------------------------------

Comment (by joeyh):

 Similarly, with ghc 8.2.2 (debian), this is not accepted:

 main = putChar '🥖'

 That's U+1F956 baguette. ghc says:

 lexical error in string/character literal at character '\129366'

 My system is fully utf-8 enabled and the original problem character works
 ok.

 Guess this is just lag getting the unicode character tables updated.
 However, while it seems reasonable for ghc to not let me define a function
 eg

 (🥖) = (</>)

 since it doesn't know what kind of symbol baguette is, it seems much less
 reasonable to not accept any unicode inside a string.

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


More information about the ghc-tickets mailing list