I just realised that it is actually legal to write this:
let _ = sum [1..100]
in "Hello"
The let-binding appears to do absolutely nothing.
But now I'm wondering about the exact semantics here. It is possible to write a program which contains a _
binding, and yet deleting that binding would visibly alter the meaning of said program?
Basically, I'm wondering whether it's safe to automatically delete such bindings. As far as I can tell, the value of this binding cannot possibly affect anything. However, it seems hypothetically possible that it's type might affect something else. Can anybody construct an example?