Closed ceedubs closed 2 months ago
The current output is:
The last element of a block must be an expression, but this is a definition:
3 | x = 3
Try adding an expression at the end of the block. It should be of type Nat.
@ceedubs Is this good?
Yeah this is great!
If you accidentally end an expression/block with a variable assignment, the error message should be more helpful.
example
Here's an example of the current behavior (a trunk build from 2022-08-23):
scratch file
ucm output
notes
This is especially easy to encounter when you are debugging code. Sometimes I'll find myself changing the last line of an expression from:
to:
When I get done debugging I often remove the trace and the line below it and forget to change the
result = foo 3
line to no longer perform assignment.