Skip to content

[Discussion] Character class for apostrophe #549

Closed
@gracjan

Description

@gracjan

Apostrophe is seriously overloaded character in Haskell. Here it goes:

  • 'x', 'X' - a char constant
  • 'xf' - Template Haskell Name for xf'
  • ''XF' - Template Haskell Type for XF'
  • '\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 _ or w?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions