3 ms·
> I was really confused about a nonsense error in a match statement until I realized that it was because of a nested match statement. This kind of confusion in
by yawaramin 1y ago
> I was really confused about a nonsense error in a match statement until I realized that it was because of a nested match statement.
This kind of confusion instantly goes away when you use auto-formatting with ocamlformat, which is the recommended formatting tool for the OCaml platform. It would line up your match cases in such a way that you would be able to almost immediately tell that the compiler is interpreting the dangling cases as part of the inner match.