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.
I've just realised that, since #699, the function
isUnquotedKeyis 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" doesn't need quoting in the error, because we do in fact allow it as an unquoted record key.