nickel
nickel copied to clipboard
Invalid record field accesses can produce confusing errors
Nickel currently parses, e.g., record.5 as a function application of record to the number .5, leading to a confusing error message:
error: not a function
┌─ repl-input-2:1:14
│
1 │ let record = {}
│ ^^ this term is applied, but it is not a function
│
┌─ repl-input-3:1:1
│
1 │ record.5
│ -------- applied here
We may want to make the parser slightly stricter to produce a better error message.