Opened 3 years ago

Last modified 13 days ago

#7650 new bug

can't use combining characters in identifiers

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler (Parser) Version: 7.6.2
Keywords: unicode Cc: hvr
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


ghc doesn't let me use combining characters in unicode identifiers. Here's a test case with U+308 (COMBINING DIAERESIS) but it affects all accents:

% cat comb.hs
main = print spın̈alTap
    where spın̈alTap = 11
 % ghc comb.hs
[1 of 1] Compiling Main             ( comb.hs, comb.o )

comb.hs:1:18: lexical error at character '\776'

(This is actually with ghc 7.6.2 but the Version drop-down only goes up to 7.6.1.)

Change History (11)

comment:1 Changed 3 years ago by igloo

  • difficulty set to Unknown
  • Version changed from 7.6.1 to 7.6.2

comment:2 Changed 3 years ago by igloo

  • Milestone set to 7.8.1

Thanks for the report.

comment:3 Changed 3 years ago by batterseapower

Possibly fixable by rewriting the lexer to use alex 3...

comment:4 Changed 2 years ago by nomeata

GHC already uses alex-3.1.0; that alone did not fix it.

comment:5 Changed 22 months ago by thoughtpolice

  • Milestone changed from 7.8.3 to 7.10.1

Moving to 7.10.1

comment:6 Changed 14 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:7 Changed 8 months ago by thomie

  • Architecture changed from x86 to Unknown/Multiple
  • Keywords unicode added
  • Operating System changed from Linux to Unknown/Multiple

comment:8 Changed 5 months ago by thoughtpolice

  • Milestone changed from 7.12.1 to 8.0.1

Milestone renamed

comment:9 Changed 5 months ago by thomie

  • Component changed from Compiler to Compiler (Parser)

comment:10 Changed 2 weeks ago by bgamari

  • Cc hvr added

Here is an example of the sort of Unicode questions that would be nice to fix in Haskell'.

comment:11 Changed 13 days ago by thomie

  • Milestone 8.0.1 deleted
Note: See TracTickets for help on using tickets.