Opened 4 years ago

Closed 8 months ago

#7650 closed feature request (fixed)

can't use combining characters in identifiers

Reported by: guest Owned by: thomie
Priority: normal Milestone: 8.2.1
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): Phab:D1938
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 (14)

comment:1 Changed 4 years ago by igloo

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

comment:2 Changed 4 years ago by igloo

  • Milestone set to 7.8.1

Thanks for the report.

comment:3 Changed 4 years ago by batterseapower

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

comment:4 Changed 3 years ago by nomeata

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

comment:5 Changed 2 years ago by thoughtpolice

  • Milestone changed from 7.8.3 to 7.10.1

Moving to 7.10.1

comment:6 Changed 22 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 16 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 14 months ago by thoughtpolice

  • Milestone changed from 7.12.1 to 8.0.1

Milestone renamed

comment:9 Changed 13 months ago by thomie

  • Component changed from Compiler to Compiler (Parser)

comment:10 Changed 9 months 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 9 months ago by thomie

  • Milestone 8.0.1 deleted

comment:12 Changed 8 months ago by thomie

  • Differential Rev(s) set to Phab:D1938
  • Owner set to thomie

comment:13 Changed 8 months ago by Thomas Miedema <thomasmiedema@…>

In 2aee419/ghc:

Allow combining characters in identifiers (#7650)

Reviewed by: austin, rwbarton

Differential Revision:

comment:14 Changed 8 months ago by thomie

  • Milestone set to 8.2.1
  • Resolution set to fixed
  • Status changed from new to closed
  • Type changed from bug to feature request

I guess this is a feature, so don't merge to 8.0. See #11609 for documentation (todo).

Note: See TracTickets for help on using tickets.