Re: [GHC] #9947: Unicode «other number» characters not consistently accepted in identifiers

GHC ghc-devs at haskell.org
Wed Mar 11 14:32:22 UTC 2015


#9947: Unicode «other number» characters not consistently accepted in identifiers
-------------------------------------+-------------------------------------
        Reporter:  zardoz            |                   Owner:
            Type:  bug               |                  Status:  infoneeded
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
  (Parser)                           |                Keywords:
      Resolution:                    |            Architecture:
Operating System:  Unknown/Multiple  |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #4373             |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):

 * status:  new => infoneeded
 * related:   => #4373


Comment:

 I can not reproduce your problem. U+2460 and U+00B2 are treated in the
 same way:  allowed in variable identifiers, not allowed in operator
 identifiers. Just like numbers.

 This compiles:
 {{{#!hs
 -- Superscript two (U+00B2)
 -- Block: Latin-1 Supplement
 -- General Category: OtherNumber (No)
 -- Haskell: number
 xB2 = '²'
 xB2_² = 4
 -- Error (numbers not allowed in operators):
 -- data a +² b = XB2 a b


 -- Circle digit 1 (U+2460)
 -- Block: Enclosed Alphanumerics
 -- General Category: OtherNumber (No)
 -- Haskell: number
 x2460 = '①'
 x2460_① = 1
 -- Error (numbers not allowed in operators):
 --data a +① b = X2460 a b
 }}}

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


More information about the ghc-tickets mailing list