Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
manual: document exception A | exception B #2187
This is a small documentation follow-up for #1568 (exception pattern under or-patterns) .
This PR adds an example of such pattern in the tutorial and, more importantly, replaces the current example of invalid exception pattern with
I have also updated the grammar description to directly mention exception patterns under or-patterns.
The case where both sides of the or-pattern are
The case that's really worth documenting is where one side is an
let find x l = match List.assoc x l with | None | exception Not_found -> None | Some _ as v -> v