Skip to content

record labels are incorrectly quoted in errors #3479

Description

@hdgarrood

The function Language.PureScript.Parser.Lexer.isUnquotedKey does not correctly encode the fact that record labels must be quoted if they begin with numbers or uppercase letters. This causes error messages to produce invalid pretty-printed code in these (admittedly unusual) cases. For example:

test :: { "Oops" :: Int }
test = { }

produces

  Type of expression lacks required label Oops.

while checking that expression {}
  has type { Oops :: Int
           }
in value declaration test

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