Is annotating and checking purity of functions feasible?

Although this conversation is a bit stale by now, I just came across this. Since I can’t find your commit upstream in the OCaml standard library, I was wondering what your long term review of the alert is. Although I haven’t tried it in OCaml, having the compiler warn about exceptions and possibly effects is a really nice feature in Swift and Rust and improves the confidence while writing code a lot. Possibly reducing unforeseen runtime errors as well.