Opened 4 years ago

Closed 12 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: Unknown

comment:2 Changed 4 years ago by igloo

Milestone: 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 3 years ago by thoughtpolice


Moving to 7.10.1

comment:6 Changed 2 years ago by thoughtpolice


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 20 months ago by thomie

Architecture: x86Unknown/Multiple
Keywords: unicode added
Operating System: LinuxUnknown/Multiple

comment:8 Changed 18 months ago by thoughtpolice


Milestone renamed

comment:9 Changed 17 months ago by thomie

Component: CompilerCompiler (Parser)

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

Milestone: 8.0.1

comment:12 Changed 12 months ago by thomie

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

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

In 2aee419/ghc:

Allow combining characters in identifiers (#7650)

Reviewed by: austin, rwbarton

Differential Revision:

comment:14 Changed 12 months ago by thomie

Milestone: 8.2.1
Resolution: fixed
Status: newclosed
Type: bugfeature 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.