Closed
Description
Apostrophe is seriously overloaded character in Haskell. Here it goes:
'x'
,'X'
- a char constant'xf'
- Template Haskell Name forxf'
''XF'
- Template Haskell Type forXF'
'\1231'
- a char constant'\SOH'
- a char constant''
- illegal, somewhat char- '1x' - illegal
'''XF
- illegal
So apostrophe is a:
- symbol constituent (
xf'
) - string quote (
'x'
) - expression prefix (
'xf
''XF
) - illegal
Most of the above can be fixed by syntax-propertize
. There are two questions though:
- what should be the default syntax class for apostrophe?
- what should be the syntax class for apostrophe in illegal cases?
- should apostrophe that is part of identifiers have syntax class
_
orw
?