Skip to content

Pretty-printer incorrectly considers reserved ps names as needing quoting #3482

Description

@hdgarrood

I've just realised that, since #699, the function isUnquotedKey is still more conservative than necessary when it is deciding what can be used as an unquoted record label with respect to reserved PureScript identifiers. For example:

> {} :: { data :: Int }
Error found:
in module $PSCI
at  line 1, column 1 - line 1, column 3

  Type of expression lacks required label "data".

while checking that expression {}
  has type { "data" :: Int
           }              
in value declaration it

"data" doesn't need quoting in the error, because we do in fact allow it as an unquoted record key.

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