change wording of error message
When a body contains multiple expressions, the error reads
Either simplify this block to a single expression, or mark the outer expression with block: to indicate this is deliberate.
I don't like the use of simplify. In fact, there's a good chance they'll need to "complexify" the code to keep and then combine the multiple expressions. I would indeed remove a verb entirely: we shouldn't tell them what to do, we should just tell them what the result should be (in the former case).
Note that a 019 student just read this as "Pyret is asking me to use block" (emphasis mine).
Could you suggest a complete wording of the message that you would like to see? Given that many of our messages do display a suggested course of repair, what should we say here?
About to hit the road, so I'm going to ask @jswrenn to take a first stab at proposing an alternative (since he's also the moral arbiter of messages).
Maybe I'm misunderstanding, but I thought this attempt to recreate Shriram's issue should generate the error:
fun f(x):
a = 4
r = 5
x
end
Shouldn't this need a block?
a = 4 is a statement, not an expression. Needs to be two expressions that evaluate to a value, like
fun(x):
x + 1
x + 2
end
(Which is likely an error)